room to pharmacy
This commit is contained in:
45
src/entity/room_to_pharmacy.ts
Normal file
45
src/entity/room_to_pharmacy.ts
Normal 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;
|
||||
}
|
||||
@ -34,6 +34,7 @@ export * from "../entity/patient_group"
|
||||
export * from "../entity/patient_guarantor"
|
||||
export * from "../entity/user_to_room"
|
||||
export * from "../entity/refferal_hospital"
|
||||
export * from "../entity/room_to_pharmacy"
|
||||
|
||||
export * from "../types/action";
|
||||
export * from "../types/error";
|
||||
@ -42,3 +43,4 @@ export * from "../types/role";
|
||||
export * from "../types/status";
|
||||
export * from "../types/email";
|
||||
export * from "../types/telegram";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user