update: Add service class relation to room entity and update related code
This commit is contained in:
@ -6,6 +6,7 @@ import { Status } from "../types/status";
|
|||||||
import { Department } from "./department";
|
import { Department } from "./department";
|
||||||
import { Service } from "./service";
|
import { Service } from "./service";
|
||||||
import { RoomStock } from "./pharmacy-logistic/room_stock";
|
import { RoomStock } from "./pharmacy-logistic/room_stock";
|
||||||
|
import { ServiceClass } from "./service_class";
|
||||||
|
|
||||||
@Entity("rooms")
|
@Entity("rooms")
|
||||||
export class Room {
|
export class Room {
|
||||||
@ -49,6 +50,10 @@ export class Room {
|
|||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
department: Department;
|
department: Department;
|
||||||
|
|
||||||
|
@ManyToOne(() => ServiceClass, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
serviceclass: ServiceClass;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
length: 64,
|
length: 64,
|
||||||
|
|||||||
Reference in New Issue
Block a user