room to pharmacy

This commit is contained in:
Muhammad Rayhan Ardiansyah
2026-03-18 09:26:56 +07:00
parent 2d36b697ea
commit 455d29cbad
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,45 @@
import {
Entity,
PrimaryGeneratedColumn,
ManyToOne,
JoinColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
DeleteDateColumn,
} from "typeorm";
import { Room } from "./room";
@Entity("room_to_pharmacy")
export class RoomToPharmacy {
@PrimaryGeneratedColumn("uuid")
id!: string;
// Room asal
@ManyToOne(() => Room, { nullable: false })
@JoinColumn({ name: "room_id" })
room!: Room;
// Room tujuan
@ManyToOne(() => Room, { nullable: false })
@JoinColumn({ name: "pharmacy_room_id" })
pharmacy_room!: Room;
@CreateDateColumn()
created_at!: Date;
@Column({ nullable: true, length: 256 })
created_by?: string;
@UpdateDateColumn({ nullable: true })
updated_at?: Date;
@Column({ nullable: true, length: 256 })
updated_by?: string;
@DeleteDateColumn({ nullable: true })
deleted_at?: Date;
@Column({ nullable: true, length: 256 })
deleted_by?: string;
}

View File

@ -34,6 +34,7 @@ export * from "../entity/patient_group"
export * from "../entity/patient_guarantor" export * from "../entity/patient_guarantor"
export * from "../entity/user_to_room" export * from "../entity/user_to_room"
export * from "../entity/refferal_hospital" export * from "../entity/refferal_hospital"
export * from "../entity/room_to_pharmacy"
export * from "../types/action"; export * from "../types/action";
export * from "../types/error"; export * from "../types/error";
@ -42,3 +43,4 @@ export * from "../types/role";
export * from "../types/status"; export * from "../types/status";
export * from "../types/email"; export * from "../types/email";
export * from "../types/telegram"; export * from "../types/telegram";