diff --git a/src/entity/cashier/cashier.ts b/src/entity/cashier/cashier.ts index 1974ce1..f02688d 100644 --- a/src/entity/cashier/cashier.ts +++ b/src/entity/cashier/cashier.ts @@ -13,6 +13,7 @@ import { import { EmrRegistration } from "../emr/emr_registration"; import { Room } from "../room"; import { CashierItem } from "./cashier_item"; +import { BillingStatus } from "../../types/billing_status"; @Entity("cashiers", { schema: "cashier" }) export class Cashier { @@ -51,8 +52,8 @@ export class Cashier { }) balance_due: number; - @Column({ nullable: true, type: "text" }) - status: string; + @Column({ nullable: true }) + status: BillingStatus; @Column() @CreateDateColumn() diff --git a/src/entity/cashier/cashier_item.ts b/src/entity/cashier/cashier_item.ts index c84c5aa..16fab4d 100644 --- a/src/entity/cashier/cashier_item.ts +++ b/src/entity/cashier/cashier_item.ts @@ -16,6 +16,7 @@ import { Service } from "../service"; import { ServiceType } from "../service_type"; import { ItemType } from "../pharmacy/item_type"; import { ItemMaster } from "../pharmacy/item_master"; +import { BillingItemStatus } from "../../types/billing_item_status"; @Entity("cashier_item", { schema: "cashier" }) export class CashierItem { @@ -96,8 +97,8 @@ export class CashierItem { }) balance_due: number; - @Column({ nullable: true, type: "text" }) - status: string; + @Column({ nullable: true }) + status: BillingItemStatus; @Column({ nullable: true, length: 256 }) category: string; diff --git a/src/schema/cashier.ts b/src/schema/cashier.ts index b375b89..e90c79d 100644 --- a/src/schema/cashier.ts +++ b/src/schema/cashier.ts @@ -2,3 +2,6 @@ export * from "../entity/cashier/cashier"; export * from "../entity/cashier/cashier_item"; export * from "../entity/cashier/payment_received"; export * from "../entity/cashier/payment_received_item"; + +export * from "../types/billing_status"; +export * from "../types/billing_item_status"; diff --git a/src/types/billing_item_status.ts b/src/types/billing_item_status.ts new file mode 100644 index 0000000..681537b --- /dev/null +++ b/src/types/billing_item_status.ts @@ -0,0 +1,9 @@ +/** + * Workflow status for cashier billing item. + * Paid: billing item has been fully paid + * Unpaid: billing item has not been paid + */ +export enum BillingItemStatus { + PAID = "PAID", + UNPAID = "UNPAID", +} \ No newline at end of file