feat: add bed_id and locker_id to Occupancy entity
This commit is contained in:
@@ -9,6 +9,8 @@ import {
|
|||||||
import { Student } from './student.entity';
|
import { Student } from './student.entity';
|
||||||
import { Room } from './room.entity';
|
import { Room } from './room.entity';
|
||||||
import { Tenant } from './tenant.entity';
|
import { Tenant } from './tenant.entity';
|
||||||
|
import { Bed } from './bed.entity';
|
||||||
|
import { Locker } from './locker.entity';
|
||||||
import { Department } from './department.entity';
|
import { Department } from './department.entity';
|
||||||
|
|
||||||
@Entity('occupancies')
|
@Entity('occupancies')
|
||||||
@@ -40,6 +42,20 @@ export class Occupancy {
|
|||||||
@Column({ type: 'text', nullable: true })
|
@Column({ type: 'text', nullable: true })
|
||||||
notes: string;
|
notes: string;
|
||||||
|
|
||||||
|
@Column({ name: 'bed_id', type: 'integer', nullable: true })
|
||||||
|
bedId: number;
|
||||||
|
|
||||||
|
@ManyToOne(() => Bed, { nullable: true })
|
||||||
|
@JoinColumn({ name: 'bed_id' })
|
||||||
|
bed: Bed;
|
||||||
|
|
||||||
|
@Column({ name: 'locker_id', type: 'integer', nullable: true })
|
||||||
|
lockerId: number;
|
||||||
|
|
||||||
|
@ManyToOne(() => Locker, { nullable: true })
|
||||||
|
@JoinColumn({ name: 'locker_id' })
|
||||||
|
locker: Locker;
|
||||||
|
|
||||||
@Column({ name: 'rental_type', length: 10, default: 'short' })
|
@Column({ name: 'rental_type', length: 10, default: 'short' })
|
||||||
rentalType: string;
|
rentalType: string;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user