690328:1547 Fixing Refactor uuid by Kimi #10
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
export interface Role {
|
||||
roleId: number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
roleId?: number; // Internal INT (excluded from API)
|
||||
roleName: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface User {
|
||||
userId: number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
userId?: number; // Internal INT (excluded from API)
|
||||
username: string;
|
||||
email: string;
|
||||
firstName: string;
|
||||
@@ -25,7 +27,8 @@ export interface CreateUserDto {
|
||||
}
|
||||
|
||||
export interface Organization {
|
||||
orgId: number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
orgId?: number; // Internal INT (excluded from API)
|
||||
orgCode: string;
|
||||
orgName: string;
|
||||
orgNameTh?: string;
|
||||
@@ -33,7 +36,8 @@ export interface Organization {
|
||||
}
|
||||
|
||||
export interface AuditLog {
|
||||
auditLogId: number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
auditLogId?: number; // Internal INT (excluded from API)
|
||||
userName: string;
|
||||
action: string;
|
||||
entityType: string;
|
||||
|
||||
@@ -4,14 +4,14 @@ export interface CreateCorrespondenceDto {
|
||||
/** ID or UUID ของโครงการ */
|
||||
projectId: number | string;
|
||||
|
||||
/** ID ของประเภทเอกสาร (เช่น RFA, LETTER) */
|
||||
typeId: number;
|
||||
/** ID ของประเภทเอกสาร (เช่น RFA, LETTER) - ADR-019: Accept UUID */
|
||||
typeId: number | string;
|
||||
|
||||
/** [Req 6B] สาขางาน (เช่น GEN, STR) */
|
||||
disciplineId?: number;
|
||||
/** [Req 6B] สาขางาน (เช่น GEN, STR) - ADR-019: Accept UUID */
|
||||
disciplineId?: number | string;
|
||||
|
||||
/** [Req 6B] ประเภทย่อย (เช่น MAT, SHP สำหรับ Transmittal/RFA) */
|
||||
subTypeId?: number;
|
||||
/** [Req 6B] ประเภทย่อย (เช่น MAT, SHP สำหรับ Transmittal/RFA) - ADR-019: Accept UUID */
|
||||
subTypeId?: number | string;
|
||||
|
||||
/** หัวข้อเอกสาร */
|
||||
subject: string;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
export interface SearchCorrespondenceDto {
|
||||
search?: string; // ค้นหาจาก Title หรือ Number
|
||||
typeId?: number; // กรองตามประเภทเอกสาร
|
||||
projectId?: number; // กรองตามโครงการ
|
||||
statusId?: number; // กรองตามสถานะ (จาก Revision ปัจจุบัน)
|
||||
typeId?: number | string; // ADR-019: Accept UUID - กรองตามประเภทเอกสาร
|
||||
projectId?: number | string; // ADR-019: Accept UUID - กรองตามโครงการ
|
||||
statusId?: number | string; // ADR-019: Accept UUID - กรองตามสถานะ (จาก Revision ปัจจุบัน)
|
||||
status?: string; // กรองตามสถานะ code string (เช่น DRAFT, IN_REVIEW)
|
||||
revisionStatus?: 'CURRENT' | 'ALL' | 'OLD'; // กรองตามสถานะ Revision
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
// --- Create New As Built Drawing ---
|
||||
export interface CreateAsBuiltDrawingDto {
|
||||
projectId: number;
|
||||
projectId: number | string; // ADR-019: Accept UUID
|
||||
drawingNumber: string;
|
||||
mainCategoryId: number;
|
||||
subCategoryId: number;
|
||||
mainCategoryId: number | string; // ADR-019: Accept UUID
|
||||
subCategoryId: number | string; // ADR-019: Accept UUID
|
||||
|
||||
// First Revision Data
|
||||
revisionLabel?: string;
|
||||
@@ -14,8 +14,8 @@ export interface CreateAsBuiltDrawingDto {
|
||||
revisionDate?: string; // ISO Date String
|
||||
description?: string;
|
||||
|
||||
shopDrawingRevisionIds?: number[]; // Reference to Shop Drawing Revisions
|
||||
attachmentIds?: number[];
|
||||
shopDrawingRevisionIds?: (number | string)[]; // ADR-019: Accept UUID - Reference to Shop Drawing Revisions
|
||||
attachmentIds?: (number | string)[]; // ADR-019: Accept UUID
|
||||
}
|
||||
|
||||
// --- Create New Revision ---
|
||||
@@ -26,8 +26,8 @@ export interface CreateAsBuiltDrawingRevisionDto {
|
||||
revisionDate?: string;
|
||||
description?: string;
|
||||
|
||||
shopDrawingRevisionIds?: number[];
|
||||
attachmentIds?: number[];
|
||||
shopDrawingRevisionIds?: (number | string)[]; // ADR-019: Accept UUID
|
||||
attachmentIds?: (number | string)[]; // ADR-019: Accept UUID
|
||||
}
|
||||
|
||||
// --- Search ---
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
// --- Create ---
|
||||
export interface CreateContractDrawingDto {
|
||||
/** ID ของโครงการ */
|
||||
projectId: number;
|
||||
/** ID ของโครงการ - ADR-019: Accept UUID */
|
||||
projectId: number | string;
|
||||
|
||||
/** เลขที่แบบสัญญา */
|
||||
contractDrawingNo: string;
|
||||
@@ -11,17 +11,17 @@ export interface CreateContractDrawingDto {
|
||||
/** ชื่อแบบ */
|
||||
title: string;
|
||||
|
||||
/** ID หมวดหมู่ย่อย (Mapping) */
|
||||
mapCatId?: number;
|
||||
/** ID หมวดหมู่ย่อย (Mapping) - ADR-019: Accept UUID */
|
||||
mapCatId?: number | string;
|
||||
|
||||
/** ID เล่มของแบบ */
|
||||
volumeId?: number;
|
||||
/** ID เล่มของแบบ - ADR-019: Accept UUID */
|
||||
volumeId?: number | string;
|
||||
|
||||
/** เลขหน้าในเล่ม */
|
||||
volumePage?: number;
|
||||
|
||||
/** รายการ ID ของไฟล์แนบ (PDF/DWG) */
|
||||
attachmentIds?: number[];
|
||||
/** รายการ ID ของไฟล์แนบ (PDF/DWG) - ADR-019: Accept UUID */
|
||||
attachmentIds?: (number | string)[];
|
||||
}
|
||||
|
||||
// --- Update (Partial) ---
|
||||
@@ -32,8 +32,8 @@ export interface SearchContractDrawingDto {
|
||||
/** จำเป็นต้องระบุ Project UUID เสมอ */
|
||||
projectUuid: string;
|
||||
|
||||
volumeId?: number;
|
||||
mapCatId?: number;
|
||||
volumeId?: number | string; // ADR-019: Accept UUID
|
||||
mapCatId?: number | string; // ADR-019: Accept UUID
|
||||
search?: string; // ค้นหาจาก Title หรือ Number
|
||||
|
||||
page?: number; // Default: 1
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
|
||||
// --- Create New Shop Drawing ---
|
||||
export interface CreateShopDrawingDto {
|
||||
projectId: number;
|
||||
projectId: number | string; // ADR-019: Accept UUID
|
||||
drawingNumber: string;
|
||||
title: string;
|
||||
mainCategoryId: number;
|
||||
subCategoryId: number;
|
||||
mainCategoryId: number | string; // ADR-019: Accept UUID
|
||||
subCategoryId: number | string; // ADR-019: Accept UUID
|
||||
|
||||
// First Revision Data (Optional)
|
||||
revisionLabel?: string;
|
||||
revisionDate?: string; // ISO Date String
|
||||
description?: string;
|
||||
legacyDrawingNumber?: string; // Legacy number for the first revision
|
||||
contractDrawingIds?: number[]; // อ้างอิงแบบสัญญา
|
||||
attachmentIds?: number[];
|
||||
contractDrawingIds?: (number | string)[]; // ADR-019: Accept UUID - อ้างอิงแบบสัญญา
|
||||
attachmentIds?: (number | string)[]; // ADR-019: Accept UUID
|
||||
}
|
||||
|
||||
// --- Create New Revision ---
|
||||
@@ -24,15 +24,15 @@ export interface CreateShopDrawingRevisionDto {
|
||||
legacyDrawingNumber?: string;
|
||||
revisionDate?: string;
|
||||
description?: string;
|
||||
contractDrawingIds?: number[];
|
||||
attachmentIds?: number[];
|
||||
contractDrawingIds?: (number | string)[]; // ADR-019: Accept UUID
|
||||
attachmentIds?: (number | string)[]; // ADR-019: Accept UUID
|
||||
}
|
||||
|
||||
// --- Search ---
|
||||
export interface SearchShopDrawingDto {
|
||||
projectUuid: string;
|
||||
mainCategoryId?: number;
|
||||
subCategoryId?: number;
|
||||
mainCategoryId?: number | string; // ADR-019: Accept UUID
|
||||
subCategoryId?: number | string; // ADR-019: Accept UUID
|
||||
search?: string;
|
||||
|
||||
page?: number; // Default: 1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// File: src/types/dto/master/discipline.dto.ts
|
||||
|
||||
export interface CreateDisciplineDto {
|
||||
contractId: number;
|
||||
contractId: number | string; // ADR-019: Accept UUID
|
||||
|
||||
/** รหัสสาขา (เช่น 'STR', 'ARC') */
|
||||
disciplineCode: string;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// File: src/types/dto/master/tag.dto.ts
|
||||
|
||||
export interface CreateTagDto {
|
||||
/** ID โครงการ (NULL = Global) */
|
||||
projectId?: number | null;
|
||||
/** ID โครงการ (NULL = Global) - ADR-019: Accept UUID */
|
||||
projectId?: number | string | null;
|
||||
|
||||
/** ชื่อ Tag (เช่น 'URGENT') */
|
||||
tagName: string;
|
||||
@@ -17,8 +17,8 @@ export interface CreateTagDto {
|
||||
export type UpdateTagDto = Partial<CreateTagDto>;
|
||||
|
||||
export interface SearchTagDto {
|
||||
/** ID โครงการ (ใช้กรอง Tag ของแต่ละโปรเจกต์) */
|
||||
projectId?: number;
|
||||
/** ID โครงการ (ใช้กรอง Tag ของแต่ละโปรเจกต์) - ADR-019: Accept UUID */
|
||||
projectId?: number | string;
|
||||
|
||||
/** คำค้นหา (ชื่อ Tag หรือ คำอธิบาย) */
|
||||
search?: string;
|
||||
|
||||
@@ -8,7 +8,8 @@ export interface AuditErrorRecord {
|
||||
}
|
||||
|
||||
export interface NumberingAuditLog {
|
||||
id: number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
id?: number; // Internal INT (excluded from API)
|
||||
documentNumber: string;
|
||||
operation: string;
|
||||
status: string;
|
||||
@@ -22,13 +23,13 @@ export interface NumberingMetrics {
|
||||
}
|
||||
|
||||
export interface ManualOverrideDto {
|
||||
projectId: number;
|
||||
originatorOrganizationId: number;
|
||||
recipientOrganizationId: number;
|
||||
correspondenceTypeId: number;
|
||||
subTypeId?: number;
|
||||
rfaTypeId?: number;
|
||||
disciplineId?: number;
|
||||
projectId: number | string; // ADR-019: Accept UUID
|
||||
originatorOrganizationId: number | string; // ADR-019: Accept UUID
|
||||
recipientOrganizationId: number | string; // ADR-019: Accept UUID
|
||||
correspondenceTypeId: number | string; // ADR-019: Accept UUID
|
||||
subTypeId?: number | string; // ADR-019: Accept UUID
|
||||
rfaTypeId?: number | string; // ADR-019: Accept UUID
|
||||
disciplineId?: number | string; // ADR-019: Accept UUID
|
||||
resetScope: string;
|
||||
newLastNumber: number;
|
||||
reason: string;
|
||||
@@ -38,16 +39,16 @@ export interface VoidReplaceDto {
|
||||
documentNumber: string;
|
||||
reason: string;
|
||||
replace: boolean;
|
||||
projectId: number;
|
||||
projectId: number | string; // ADR-019: Accept UUID
|
||||
}
|
||||
|
||||
export interface CancelNumberDto {
|
||||
documentNumber: string;
|
||||
reason: string;
|
||||
projectId?: number;
|
||||
projectId?: number | string; // ADR-019: Accept UUID
|
||||
}
|
||||
|
||||
export interface AuditQueryParams {
|
||||
projectId?: number;
|
||||
projectId?: number | string; // ADR-019: Accept UUID
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
@@ -4,20 +4,20 @@
|
||||
export interface CreateOrganizationDto {
|
||||
organizationCode: string;
|
||||
organizationName: string;
|
||||
roleId?: number;
|
||||
roleId?: number | string; // ADR-019: Accept UUID
|
||||
isActive?: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateOrganizationDto {
|
||||
organizationCode?: string;
|
||||
organizationName?: string;
|
||||
roleId?: number;
|
||||
roleId?: number | string; // ADR-019: Accept UUID
|
||||
isActive?: boolean;
|
||||
}
|
||||
|
||||
export interface SearchOrganizationDto {
|
||||
search?: string;
|
||||
projectId?: number;
|
||||
projectId?: number | string; // ADR-019: Accept UUID
|
||||
page?: number;
|
||||
limit?: number;
|
||||
isActive?: boolean;
|
||||
|
||||
@@ -5,11 +5,11 @@ export interface CreateRfaDto {
|
||||
/** ID or UUID ของโครงการ */
|
||||
projectId: number | string; // ADR-019: Accept UUID
|
||||
|
||||
/** ประเภท RFA (เช่น DWG, MAT) */
|
||||
rfaTypeId: number;
|
||||
/** ประเภท RFA (เช่น DWG, MAT) - ADR-019: Accept UUID */
|
||||
rfaTypeId: number | string;
|
||||
|
||||
/** [Req 6B] สาขางาน (จำเป็นสำหรับการรันเลข RFA) */
|
||||
disciplineId?: number;
|
||||
/** [Req 6B] สาขางาน (จำเป็นสำหรับการรันเลข RFA) - ADR-019: Accept UUID */
|
||||
disciplineId?: number | string;
|
||||
|
||||
/** หัวข้อเรื่อง */
|
||||
subject: string;
|
||||
@@ -50,11 +50,11 @@ export interface SearchRfaDto {
|
||||
/** Filter by Project ID or UUID (optional to allow cross-project search) */
|
||||
projectId?: number | string; // ADR-019: Accept UUID
|
||||
|
||||
/** กรองตามประเภท RFA */
|
||||
rfaTypeId?: number;
|
||||
/** กรองตามประเภท RFA - ADR-019: Accept UUID */
|
||||
rfaTypeId?: number | string;
|
||||
|
||||
/** กรองตามสถานะ (เช่น Draft, For Approve) */
|
||||
statusId?: number;
|
||||
/** กรองตามสถานะ (เช่น Draft, For Approve) - ADR-019: Accept UUID */
|
||||
statusId?: number | string;
|
||||
|
||||
/** กรองตามสถานะ code โดยตรง (เช่น 'DFT', 'FAP', 'FRE') */
|
||||
statusCode?: string;
|
||||
|
||||
@@ -20,7 +20,7 @@ export interface CreateTransmittalDto {
|
||||
|
||||
export interface CreateTransmittalItemDto {
|
||||
itemType: string;
|
||||
itemId: number;
|
||||
itemId: number | string; // ADR-019: Accept UUID
|
||||
description?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,13 +17,13 @@ export type UpdateUserDto = Partial<CreateUserDto>;
|
||||
|
||||
// --- Assign Role ---
|
||||
export interface AssignRoleDto {
|
||||
userId: number;
|
||||
roleId: number;
|
||||
userId: number | string; // ADR-019: Accept UUID
|
||||
roleId: number | string; // ADR-019: Accept UUID
|
||||
|
||||
// Scope (Optional)
|
||||
organizationId?: number;
|
||||
projectId?: number;
|
||||
contractId?: number;
|
||||
// Scope (Optional) - ADR-019: Accept UUID
|
||||
organizationId?: number | string;
|
||||
projectId?: number | string;
|
||||
contractId?: number | string;
|
||||
}
|
||||
|
||||
// --- Update Preferences ---
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
*/
|
||||
|
||||
export interface CorrespondenceType {
|
||||
id: number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
id?: number; // Internal INT (excluded from API)
|
||||
typeCode: string;
|
||||
typeName: string;
|
||||
isActive: boolean;
|
||||
@@ -11,7 +12,8 @@ export interface CorrespondenceType {
|
||||
}
|
||||
|
||||
export interface Discipline {
|
||||
id: number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
id?: number; // Internal INT (excluded from API)
|
||||
disciplineCode: string;
|
||||
codeNameEn: string;
|
||||
codeNameTh?: string;
|
||||
@@ -21,11 +23,12 @@ export interface Discipline {
|
||||
contractCode: string;
|
||||
contractName: string;
|
||||
};
|
||||
contractId?: number | string;
|
||||
contractId?: number | string; // ADR-019: Accept UUID
|
||||
}
|
||||
|
||||
export interface RfaType {
|
||||
id: number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
id?: number; // Internal INT (excluded from API)
|
||||
typeCode: string;
|
||||
typeNameTh: string;
|
||||
typeNameEn?: string;
|
||||
@@ -36,25 +39,28 @@ export interface RfaType {
|
||||
contractCode: string;
|
||||
contractName: string;
|
||||
};
|
||||
contractId?: number | string;
|
||||
contractId?: number | string; // ADR-019: Accept UUID
|
||||
}
|
||||
|
||||
export interface Tag {
|
||||
id: number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
id?: number; // Internal INT (excluded from API)
|
||||
tagName: string;
|
||||
colorCode?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface DrawingCategory {
|
||||
id: number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
id?: number; // Internal INT (excluded from API)
|
||||
subTypeCode: string;
|
||||
subTypeName: string;
|
||||
subTypeNumber?: string;
|
||||
}
|
||||
|
||||
export interface ShopMainCategory {
|
||||
id: number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
id?: number; // Internal INT (excluded from API)
|
||||
mainCategoryCode: string;
|
||||
mainCategoryName: string;
|
||||
name?: string; // Fallback for legacy data
|
||||
@@ -62,7 +68,8 @@ export interface ShopMainCategory {
|
||||
}
|
||||
|
||||
export interface ShopSubCategory {
|
||||
id: number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
id?: number; // Internal INT (excluded from API)
|
||||
subCategoryCode: string;
|
||||
subCategoryName: string;
|
||||
name?: string; // Fallback for legacy data
|
||||
@@ -70,7 +77,8 @@ export interface ShopSubCategory {
|
||||
}
|
||||
|
||||
export interface ContractDrawingCategory {
|
||||
id: number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
id?: number; // Internal INT (excluded from API)
|
||||
catCode: string;
|
||||
catName: string;
|
||||
name?: string; // Fallback for legacy data
|
||||
|
||||
@@ -5,7 +5,8 @@ export enum MigrationReviewStatus {
|
||||
}
|
||||
|
||||
export interface MigrationReviewQueueItem {
|
||||
id: number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
id?: number; // Internal INT (excluded from API)
|
||||
documentNumber: string;
|
||||
title?: string;
|
||||
originalTitle?: string;
|
||||
@@ -17,15 +18,15 @@ export interface MigrationReviewQueueItem {
|
||||
reviewedBy?: string;
|
||||
reviewedAt?: string;
|
||||
createdAt: string;
|
||||
projectId?: number;
|
||||
senderOrganizationId?: number;
|
||||
receiverOrganizationId?: number;
|
||||
projectId?: number | string; // ADR-019: Accept UUID
|
||||
senderOrganizationId?: number | string; // ADR-019: Accept UUID
|
||||
receiverOrganizationId?: number | string; // ADR-019: Accept UUID
|
||||
receivedDate?: string;
|
||||
issuedDate?: string;
|
||||
remarks?: string;
|
||||
aiSummary?: string;
|
||||
extractedTags?: Record<string, unknown>;
|
||||
tempAttachmentId?: number;
|
||||
tempAttachmentId?: number | string; // ADR-019: Accept UUID
|
||||
}
|
||||
|
||||
export interface CommitBatchItemDto {
|
||||
@@ -48,7 +49,8 @@ export enum MigrationErrorType {
|
||||
}
|
||||
|
||||
export interface MigrationErrorItem {
|
||||
id: number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
id?: number; // Internal INT (excluded from API)
|
||||
batchId?: string;
|
||||
documentNumber?: string;
|
||||
errorType?: MigrationErrorType;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
export type WorkflowType = 'CORRESPONDENCE' | 'RFA' | 'DRAWING';
|
||||
|
||||
export interface WorkflowStep {
|
||||
stepId?: string;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
stepId?: string; // Internal ID (excluded from API)
|
||||
stepName: string;
|
||||
stepType: 'APPROVAL' | 'REVIEW' | 'ENDORSEMENT';
|
||||
approverRoleId?: number;
|
||||
@@ -11,7 +12,8 @@ export interface WorkflowStep {
|
||||
}
|
||||
|
||||
export interface Workflow {
|
||||
workflowId: string | number;
|
||||
publicId: string; // ADR-019: public identifier
|
||||
workflowId?: string | number; // Internal ID (excluded from API)
|
||||
workflowName: string;
|
||||
description: string;
|
||||
workflowType: WorkflowType;
|
||||
|
||||
Reference in New Issue
Block a user