forked from wangziqi/gongxue-base
feat: add department_id to all business entities
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
import { Student } from './student.entity';
|
||||
import { Room } from './room.entity';
|
||||
import { Tenant } from './tenant.entity';
|
||||
import { Department } from './department.entity';
|
||||
|
||||
@Entity('occupancies')
|
||||
export class Occupancy {
|
||||
@@ -59,4 +60,11 @@ export class Occupancy {
|
||||
@ManyToOne(() => Room, (r) => r.occupancies)
|
||||
@JoinColumn({ name: 'room_id' })
|
||||
room: Room;
|
||||
|
||||
@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