forked from wangziqi/gongxue-base
- Delete department.entity.ts, user-department.entity.ts - Remove Department/UserDepartment from entities/index.ts - Remove departmentId column from 18 entities (AttendanceRecord, ArchiveAttachment, Bill, ClassSchedule, Classroom, ClassroomRental, Deposit, DepositInstallment, ExamScore, LearningRecord, Occupancy, PersonalExpense, ResultArchive, Room, RoomExpense, Student, StudentEnrollment, StudentProfile, StudentReport) - Remove departments/ module entirely - Delete campus-scope.ts, campus-scope.middleware.ts (request-utils.ts kept — it's just IP extraction) - Simplify common.module.ts to empty module - Remove CampusScopeMiddleware from app.module.ts - Remove all CampusScope injections and filter calls across all services - Remove departmentId from all DTOs and controllers - Simplify dingtalk/wecom sync to only sync users (no dept table) - Update seed module to remove department seeding - Clean frontend compilation
46 lines
1010 B
TypeScript
46 lines
1010 B
TypeScript
import {
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
Column,
|
|
CreateDateColumn,
|
|
UpdateDateColumn,
|
|
ManyToOne,
|
|
JoinColumn,
|
|
} from 'typeorm';
|
|
import { Student } from './student.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;
|
|
|
|
|
|
@CreateDateColumn({ name: 'created_at' })
|
|
createdAt: Date;
|
|
|
|
@UpdateDateColumn({ name: 'updated_at' })
|
|
updatedAt: Date;
|
|
}
|