forked from wangziqi/gongxue-base
feat: add department_id to all business entities
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
} from 'typeorm';
|
||||
import { Student } from './student.entity';
|
||||
import { DepositInstallment } from './deposit-installment.entity';
|
||||
import { Department } from './department.entity';
|
||||
|
||||
@Entity('deposits')
|
||||
export class Deposit {
|
||||
@@ -68,4 +69,10 @@ export class Deposit {
|
||||
@JoinColumn({ name: 'student_id' })
|
||||
student: Student;
|
||||
|
||||
@Column({ name: 'department_id', type: 'integer', nullable: true })
|
||||
departmentId: number;
|
||||
|
||||
@ManyToOne(() => Department, { nullable: true })
|
||||
@JoinColumn({ name: 'department_id' })
|
||||
department: Department;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user