feat: add new card print queues for card printing

This commit is contained in:
avicenan
2026-06-10 23:44:24 +09:00
parent b7753b9874
commit 36503209d6
3 changed files with 88 additions and 0 deletions

View File

@ -0,0 +1,79 @@
import {
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
DeleteDateColumn,
} from "typeorm";
import { CardPrintQueueStatus } from "../types/card_print_queue_status";
@Entity("card_print_queues")
export class CardPrintQueue {
@PrimaryGeneratedColumn("uuid")
id!: string;
@Column({ type: "text", nullable: true })
mrn?: string;
@Column({ type: "text", nullable: true })
municipiu_code?: string;
@Column({ type: "text", nullable: true })
posto_adm_code?: string;
@Column({ type: "text", nullable: true })
name?: string;
@Column({ type: "text", nullable: true })
address?: string;
@Column({ type: "text", nullable: true })
municipiu?: string;
@Column({ type: "text", nullable: true })
posto_adm?: string;
@Column({ type: "text", nullable: true })
suco?: string;
@Column({ type: "text", nullable: true })
aldeia?: string;
@Column({ type: "text", nullable: true })
sexo?: string;
@Column({ type: "text", nullable: true })
birthdate?: string;
@Column({ type: "text", nullable: true })
patient_id?: string;
@Column({ type: "text", nullable: true })
facility_code?: string;
@Column({
type: "enum",
enum: CardPrintQueueStatus,
default: CardPrintQueueStatus.PENDING,
})
status!: CardPrintQueueStatus;
@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

@ -60,6 +60,7 @@ export * from "../entity/room_number";
export * from "../entity/medical_form"; export * from "../entity/medical_form";
export * from "../entity/main_disease"; export * from "../entity/main_disease";
export * from "../entity/card_key_sets"; export * from "../entity/card_key_sets";
export * from "../entity/card_print_queue";
export * from "../types/public"; export * from "../types/public";
export * from "../types/action"; export * from "../types/action";
@ -72,3 +73,4 @@ export * from "../types/telegram";
export * from "../types/specialist_form"; export * from "../types/specialist_form";
export * from "../types/diagnosis_type"; export * from "../types/diagnosis_type";
export * from "../types/notification_priority"; export * from "../types/notification_priority";
export * from "../types/card_print_queue_status";

View File

@ -0,0 +1,7 @@
export enum CardPrintQueueStatus {
PENDING = "pending",
IN_PROGRESS = "in_progress",
COMPLETED = "completed",
FAILED = "failed",
BLOCKED = "blocked",
}