Files
lcbp3/backend/src/modules/document-numbering/interfaces/document-numbering.interface.ts
admin aa96cd90e3
Some checks failed
Spec Validation / validate-markdown (push) Has been cancelled
Spec Validation / validate-diagrams (push) Has been cancelled
Spec Validation / check-todos (push) Has been cancelled
251209:1453 Frontend: progress nest = UAT & Bug Fixing
2025-12-09 14:53:42 +07:00

34 lines
1.3 KiB
TypeScript

// File: src/modules/document-numbering/interfaces/document-numbering.interface.ts
export interface GenerateNumberContext {
projectId: number;
originatorId: number; // องค์กรผู้ส่ง
typeId: number; // ประเภทเอกสาร (Correspondence Type ID)
subTypeId?: number; // (Optional) Sub Type ID (สำหรับ Transmittal)
rfaTypeId?: number; // [v1.5.1] RFA Type: SHD, RPT, MAT (0 = not RFA)
disciplineId?: number; // (Optional) Discipline ID (สาขางาน)
year?: number; // (Optional) ถ้าไม่ส่งจะใช้ปีปัจจุบัน
// [v1.5.1] Recipient organization for counter key
recipientOrganizationId?: number; // Primary recipient (-1 = all orgs)
// [P0-4] Audit tracking fields
userId?: number; // User requesting the number
ipAddress?: string; // IP address of the requester
// สำหรับกรณีพิเศษที่ต้องการ Override ค่าบางอย่าง
customTokens?: Record<string, string>;
}
export interface DecodedTokens {
projectCode: string;
orgCode: string;
typeCode: string;
disciplineCode: string;
subTypeCode: string;
subTypeNumber: string;
year: string;
yearShort: string;
recipientCode: string; // [P1-4] Recipient organization code
}