From bbabd02aafa7b180528e42ce8ef192e9ecc41a8c Mon Sep 17 00:00:00 2001 From: Narul Hidayah Date: Thu, 11 Jun 2026 09:50:39 +0900 Subject: [PATCH] card management --- .../card-management/healthcare_facility.ts | 19 +------------------ src/entity/card_print_queue.ts | 12 ++++++++++++ src/schema/card_management.ts | 2 -- src/types/healthcare_facility_status.ts | 4 ---- src/types/healthcare_facility_type.ts | 6 ------ 5 files changed, 13 insertions(+), 30 deletions(-) delete mode 100644 src/types/healthcare_facility_status.ts delete mode 100644 src/types/healthcare_facility_type.ts diff --git a/src/entity/card-management/healthcare_facility.ts b/src/entity/card-management/healthcare_facility.ts index aec55b6..1b48711 100644 --- a/src/entity/card-management/healthcare_facility.ts +++ b/src/entity/card-management/healthcare_facility.ts @@ -11,9 +11,8 @@ import { } from "typeorm"; import { Munisipo } from "../munisipo"; import { Administrativu } from "../administrativu"; -import { HealthcareFacilityStatus } from "../../types/healthcare_facility_status"; -import { HealthcareFacilityType } from "../../types/healthcare_facility_type"; +/** Minimal cache — synced from external master; no local type/status enums */ @Entity({ schema: "card_management", name: "healthcare_facility" }) @Index(["code"], { unique: true }) export class HealthcareFacility { @@ -26,14 +25,6 @@ export class HealthcareFacility { @Column({ type: "text", nullable: false }) name: string; - @Column({ - type: "enum", - enum: HealthcareFacilityType, - nullable: false, - default: HealthcareFacilityType.HOSPITAL, - }) - type: HealthcareFacilityType; - @ManyToOne(() => Munisipo, { onDelete: "NO ACTION", nullable: true }) @JoinColumn() municipio: Munisipo; @@ -42,14 +33,6 @@ export class HealthcareFacility { @JoinColumn() administrativu: Administrativu; - @Column({ - type: "enum", - enum: HealthcareFacilityStatus, - nullable: false, - default: HealthcareFacilityStatus.ACTIVE, - }) - status: HealthcareFacilityStatus; - @Column() @CreateDateColumn() created_at: Date; diff --git a/src/entity/card_print_queue.ts b/src/entity/card_print_queue.ts index bb37689..b831c8e 100644 --- a/src/entity/card_print_queue.ts +++ b/src/entity/card_print_queue.ts @@ -54,6 +54,18 @@ export class CardPrintQueue { @Column({ type: "text", nullable: true }) facility_code?: string; + @Column({ type: "bigint", nullable: true }) + running_number?: string; + + @Column({ type: "text", nullable: true }) + card_number?: string; + + @Column({ type: "text", nullable: true }) + provision_job_id?: string; + + @Column({ type: "text", nullable: true }) + error_message?: string; + @Column({ type: "enum", enum: CardPrintQueueStatus, diff --git a/src/schema/card_management.ts b/src/schema/card_management.ts index 7823823..685cf55 100644 --- a/src/schema/card_management.ts +++ b/src/schema/card_management.ts @@ -1,6 +1,4 @@ export * from "../types/card_inventory_status"; -export * from "../types/healthcare_facility_status"; -export * from "../types/healthcare_facility_type"; export * from "../entity/card-management/card_inventory"; export * from "../entity/card-management/healthcare_facility"; export * from "../entity/card-management/running_number_log"; diff --git a/src/types/healthcare_facility_status.ts b/src/types/healthcare_facility_status.ts deleted file mode 100644 index 5d9f5c7..0000000 --- a/src/types/healthcare_facility_status.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum HealthcareFacilityStatus { - ACTIVE = "ACTIVE", - INACTIVE = "INACTIVE", -} diff --git a/src/types/healthcare_facility_type.ts b/src/types/healthcare_facility_type.ts deleted file mode 100644 index 3586ff8..0000000 --- a/src/types/healthcare_facility_type.ts +++ /dev/null @@ -1,6 +0,0 @@ -export enum HealthcareFacilityType { - HOSPITAL = "HOSPITAL", - CLINIC = "CLINIC", - HEALTH_CENTER = "HEALTH_CENTER", - OTHER = "OTHER", -}