feat(surgery-rooms): add new entity of surgery room as child of rooms
This commit is contained in:
40
src/entity/surgery_room.ts
Normal file
40
src/entity/surgery_room.ts
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn } from "typeorm";
|
||||||
|
import { Room } from "./room";
|
||||||
|
|
||||||
|
@Entity("surgery_rooms")
|
||||||
|
export class SurgeryRoom {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => Room, { onDelete: "NO ACTION" })
|
||||||
|
@JoinColumn()
|
||||||
|
room: Room;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
type: "text",
|
||||||
|
})
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deleted_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by: string;
|
||||||
|
}
|
||||||
|
|
||||||
@ -12,6 +12,7 @@ export * from "../entity/application";
|
|||||||
export * from "../entity/currencies";
|
export * from "../entity/currencies";
|
||||||
export * from "../entity/inpatient_rooms";
|
export * from "../entity/inpatient_rooms";
|
||||||
export * from "../entity/inpatient_room_beds";
|
export * from "../entity/inpatient_room_beds";
|
||||||
|
export * from "../entity/surgery_room";
|
||||||
export * from "../entity/nationality";
|
export * from "../entity/nationality";
|
||||||
export * from "../entity/diagnosis";
|
export * from "../entity/diagnosis";
|
||||||
export * from "../entity/diagnostic_procedure";
|
export * from "../entity/diagnostic_procedure";
|
||||||
|
|||||||
Reference in New Issue
Block a user