feat(referral_hospital): add new column of type

This commit is contained in:
avicenan
2026-06-16 15:01:04 +09:00
parent d221f813b8
commit 71ddd37828
3 changed files with 18 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import {
UpdateDateColumn, UpdateDateColumn,
DeleteDateColumn, DeleteDateColumn,
} from "typeorm"; } from "typeorm";
import { RefferalHospitalType } from "../types/referral_hospital_type";
@Entity("refferal_hospital") @Entity("refferal_hospital")
export class RefferalHospital { export class RefferalHospital {
@ -18,6 +19,13 @@ export class RefferalHospital {
@Column({ type: "text", nullable: false }) @Column({ type: "text", nullable: false })
refferal_hospital_name!: string; refferal_hospital_name!: string;
@Column({
type: "enum",
enum: RefferalHospitalType,
nullable: true,
})
type?: RefferalHospitalType;
// Tanggal pembuatan grup pasien // Tanggal pembuatan grup pasien
@CreateDateColumn() @CreateDateColumn()
created_at!: Date; created_at!: Date;

View File

@ -75,4 +75,4 @@ export * from "../types/diagnosis_type";
export * from "../types/notification_priority"; export * from "../types/notification_priority";
export * from "../types/card_print_queue_status"; export * from "../types/card_print_queue_status";
export * from "../types/card_print_queue_type"; export * from "../types/card_print_queue_type";
export * from "../types/referral_hospital_type";

View File

@ -0,0 +1,9 @@
/**
* Type of referral hospital.
*/
export enum RefferalHospitalType {
PRIVATE_CLINIC = "private_clinic",
PRIVATE_DOCTOR = "private_doctor",
CENTRO_SAUDE = "centro_saude",
HOSPITAL_REFERRAL = "hospital_referral",
}