feat: complete student archive subsystem — 7 entities, PDF report, frontend profile page
This commit is contained in:
52
apps/server/src/entities/learning-record.entity.ts
Normal file
52
apps/server/src/entities/learning-record.entity.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
ManyToOne,
|
||||
JoinColumn,
|
||||
} from 'typeorm';
|
||||
import { Student } from './student.entity';
|
||||
import { Department } from './department.entity';
|
||||
|
||||
@Entity('learning_records')
|
||||
export class LearningRecord {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Column({ name: 'student_id', type: 'integer' })
|
||||
studentId: number;
|
||||
|
||||
@ManyToOne(() => Student, { eager: true })
|
||||
@JoinColumn({ name: 'student_id' })
|
||||
student: Student;
|
||||
|
||||
@Column({ name: 'record_date', type: 'date', nullable: true })
|
||||
recordDate: string;
|
||||
|
||||
@Column({ name: 'record_type', length: 50, nullable: true })
|
||||
recordType: string;
|
||||
|
||||
@Column({ type: 'text', nullable: true })
|
||||
content: string;
|
||||
|
||||
@Column({ name: 'follow_up_method', length: 50, nullable: true })
|
||||
followUpMethod: string;
|
||||
|
||||
@Column({ name: 'next_step', type: 'text', nullable: true })
|
||||
nextStep: string;
|
||||
|
||||
@Column({ name: 'department_id', type: 'integer', nullable: true })
|
||||
departmentId: number;
|
||||
|
||||
@ManyToOne(() => Department, { nullable: true })
|
||||
@JoinColumn({ name: 'department_id' })
|
||||
department: Department;
|
||||
|
||||
@CreateDateColumn({ name: 'created_at' })
|
||||
createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({ name: 'updated_at' })
|
||||
updatedAt: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user