From ab64ca370a88c94d7d9b366b713c54dd1f11b841 Mon Sep 17 00:00:00 2001 From: wayanrivan Date: Mon, 30 Mar 2026 08:24:53 +0700 Subject: [PATCH] update: Add service class relation to room entity and update related code --- src/entity/room.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/entity/room.ts b/src/entity/room.ts index ba9c411..d11ec8f 100644 --- a/src/entity/room.ts +++ b/src/entity/room.ts @@ -6,6 +6,7 @@ import { Status } from "../types/status"; import { Department } from "./department"; import { Service } from "./service"; import { RoomStock } from "./pharmacy-logistic/room_stock"; +import { ServiceClass } from "./service_class"; @Entity("rooms") export class Room { @@ -49,6 +50,10 @@ export class Room { @JoinColumn() department: Department; + @ManyToOne(() => ServiceClass, { onDelete: "NO ACTION", nullable: true }) + @JoinColumn() + serviceclass: ServiceClass; + @Column({ nullable: false, length: 64,