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
39 lines
856 B
TypeScript
39 lines
856 B
TypeScript
import {
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
Column,
|
|
CreateDateColumn,
|
|
ManyToOne,
|
|
JoinColumn,
|
|
} from 'typeorm';
|
|
import { Deposit } from './deposit.entity';
|
|
|
|
@Entity('deposit_installments')
|
|
export class DepositInstallment {
|
|
@PrimaryGeneratedColumn()
|
|
id: number;
|
|
|
|
@Column({ name: 'deposit_id' })
|
|
depositId: number;
|
|
|
|
@Column({ type: 'decimal', precision: 10, scale: 2 })
|
|
amount: number;
|
|
|
|
@Column({ name: 'due_date', type: 'date' })
|
|
dueDate: string;
|
|
|
|
@Column({ name: 'paid_date', type: 'date', nullable: true })
|
|
paidDate: string;
|
|
|
|
@Column({ type: 'varchar', length: 20, default: 'pending' })
|
|
status: string; // pending | paid
|
|
|
|
@CreateDateColumn({ name: 'created_at' })
|
|
createdAt: Date;
|
|
|
|
@ManyToOne(() => Deposit, (d) => d.installments, { onDelete: 'CASCADE' })
|
|
@JoinColumn({ name: 'deposit_id' })
|
|
deposit: Deposit;
|
|
|
|
}
|