feat: add department_id to all business entities
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
JoinColumn,
|
||||
Check,
|
||||
} from 'typeorm';
|
||||
import { Department } from './department.entity';
|
||||
|
||||
export enum ScheduleType {
|
||||
INTERNAL = 'INTERNAL',
|
||||
@@ -79,4 +80,11 @@ export class ClassSchedule {
|
||||
|
||||
@UpdateDateColumn({ name: 'updated_at' })
|
||||
updatedAt: Date;
|
||||
|
||||
@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