260326:1347 Fixing Refactor ADR-019 Naming convention uuid #01
This commit is contained in:
@@ -38,7 +38,7 @@ export interface CirculationRouting {
|
||||
* Main Circulation entity
|
||||
*/
|
||||
export interface Circulation {
|
||||
uuid: string;
|
||||
publicId: string; // ADR-019: exposed as 'id' in API responses
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
correspondenceId?: number;
|
||||
organizationId: number;
|
||||
@@ -53,18 +53,18 @@ export interface Circulation {
|
||||
// Joined relations from API
|
||||
routings?: CirculationRouting[];
|
||||
correspondence?: {
|
||||
uuid: string;
|
||||
publicId: string;
|
||||
id?: number;
|
||||
correspondenceNumber: string;
|
||||
};
|
||||
organization?: {
|
||||
uuid: string;
|
||||
publicId: string;
|
||||
id?: number;
|
||||
organizationCode: string;
|
||||
organizationName: string;
|
||||
};
|
||||
creator?: {
|
||||
uuid: string;
|
||||
publicId: string;
|
||||
userId?: number;
|
||||
username: string;
|
||||
firstName?: string;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
export interface Organization {
|
||||
uuid: string;
|
||||
publicId: string; // ADR-019: exposed as 'id' in API responses
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
organizationName: string;
|
||||
organizationCode: string;
|
||||
}
|
||||
|
||||
export interface Attachment {
|
||||
uuid: string;
|
||||
publicId: string; // ADR-019: exposed as 'id' in API responses
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
name: string;
|
||||
url: string;
|
||||
@@ -17,7 +17,7 @@ export interface Attachment {
|
||||
|
||||
// Used in List View mainly
|
||||
export interface CorrespondenceRevision {
|
||||
uuid: string;
|
||||
publicId: string; // ADR-019: exposed as 'id' in API responses
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
revisionNumber: number;
|
||||
revisionLabel?: string; // e.g. "A", "00"
|
||||
@@ -42,21 +42,21 @@ export interface CorrespondenceRevision {
|
||||
|
||||
// Nested Relation from Backend Refactor
|
||||
correspondence: {
|
||||
uuid: string;
|
||||
publicId: string;
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
correspondenceNumber: string;
|
||||
projectId: number;
|
||||
originatorId?: number;
|
||||
isInternal: boolean;
|
||||
originator?: Organization;
|
||||
project?: { uuid: string; id?: number; projectName: string; projectCode: string };
|
||||
project?: { publicId: string; id?: number; projectName: string; projectCode: string };
|
||||
type?: { id: number; typeName: string; typeCode: string };
|
||||
};
|
||||
}
|
||||
|
||||
// Keep explicit Correspondence for Detail View if needed, or merge concepts
|
||||
export interface Correspondence {
|
||||
uuid: string;
|
||||
publicId: string; // ADR-019: exposed as 'id' in API responses
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
correspondenceNumber: string;
|
||||
projectId: number;
|
||||
@@ -67,7 +67,7 @@ export interface Correspondence {
|
||||
|
||||
// Relations
|
||||
originator?: Organization;
|
||||
project?: { uuid: string; id?: number; projectName: string; projectCode: string };
|
||||
project?: { publicId: string; id?: number; projectName: string; projectCode: string };
|
||||
type?: { id: number; typeName: string; typeCode: string };
|
||||
revisions?: CorrespondenceRevision[]; // Nested revisions
|
||||
recipients?: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Entity Interfaces
|
||||
export interface DrawingRevision {
|
||||
uuid: string;
|
||||
publicId: string; // ADR-019: exposed as 'id' in API responses
|
||||
revisionId?: number; // Excluded from API responses (ADR-019)
|
||||
revisionNumber: string;
|
||||
title?: string; // Added
|
||||
@@ -15,7 +15,7 @@ export interface DrawingRevision {
|
||||
}
|
||||
|
||||
export interface ContractDrawing {
|
||||
uuid: string;
|
||||
publicId: string; // ADR-019: exposed as 'id' in API responses
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
contractDrawingNo: string;
|
||||
title: string;
|
||||
@@ -28,7 +28,7 @@ export interface ContractDrawing {
|
||||
}
|
||||
|
||||
export interface ShopDrawing {
|
||||
uuid: string;
|
||||
publicId: string; // ADR-019: exposed as 'id' in API responses
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
drawingNumber: string;
|
||||
projectId: number;
|
||||
@@ -41,7 +41,7 @@ export interface ShopDrawing {
|
||||
}
|
||||
|
||||
export interface AsBuiltDrawing {
|
||||
uuid: string;
|
||||
publicId: string; // ADR-019: exposed as 'id' in API responses
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
drawingNumber: string;
|
||||
projectId: number;
|
||||
@@ -54,7 +54,7 @@ export interface AsBuiltDrawing {
|
||||
|
||||
// Unified Type for List
|
||||
export interface Drawing {
|
||||
uuid?: string;
|
||||
publicId?: string; // ADR-019: exposed as 'id' in API responses
|
||||
drawingId?: number; // Excluded from API responses (ADR-019)
|
||||
drawingNumber: string;
|
||||
title: string; // Display title (from current revision for Shop/AsBuilt)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export interface Notification {
|
||||
uuid: string;
|
||||
publicId: string; // ADR-019: exposed as 'id' in API responses
|
||||
notificationId?: number; // Excluded from API responses (ADR-019)
|
||||
title: string;
|
||||
message: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export interface Organization {
|
||||
uuid: string;
|
||||
publicId: string; // ADR-019: exposed as 'id' in API responses
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
organizationCode: string;
|
||||
organizationName: string;
|
||||
|
||||
@@ -2,33 +2,33 @@ export interface RFAItem {
|
||||
id?: number;
|
||||
itemType: 'SHOP' | 'AS_BUILT';
|
||||
shopDrawingRevision?: {
|
||||
uuid?: string;
|
||||
publicId?: string;
|
||||
revisionLabel?: string;
|
||||
revisionNumber?: number;
|
||||
title?: string;
|
||||
legacyDrawingNumber?: string;
|
||||
attachments?: { id?: number; url?: string; name?: string }[];
|
||||
shopDrawing?: {
|
||||
uuid?: string;
|
||||
publicId?: string;
|
||||
drawingNumber?: string;
|
||||
};
|
||||
};
|
||||
asBuiltDrawingRevision?: {
|
||||
uuid?: string;
|
||||
publicId?: string;
|
||||
revisionLabel?: string;
|
||||
revisionNumber?: number;
|
||||
title?: string;
|
||||
legacyDrawingNumber?: string;
|
||||
attachments?: { id?: number; url?: string; name?: string }[];
|
||||
asBuiltDrawing?: {
|
||||
uuid?: string;
|
||||
publicId?: string;
|
||||
drawingNumber?: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface RFA {
|
||||
uuid: string; // ADR-019: from correspondence.uuid
|
||||
publicId: string; // ADR-019: from correspondence.publicId
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
rfaTypeId: number;
|
||||
createdBy: number;
|
||||
@@ -56,14 +56,14 @@ export interface RFA {
|
||||
};
|
||||
// Shared Correspondence Relation
|
||||
correspondence?: {
|
||||
uuid: string;
|
||||
publicId: string;
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
correspondenceNumber: string;
|
||||
projectId: number;
|
||||
originatorId?: number;
|
||||
createdAt?: string;
|
||||
project?: {
|
||||
uuid: string;
|
||||
publicId: string;
|
||||
projectName: string;
|
||||
projectCode: string;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export interface SearchResult {
|
||||
uuid: string;
|
||||
publicId: string; // ADR-019: exposed as 'id' in API responses
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
type: 'correspondence' | 'rfa' | 'drawing';
|
||||
title: string;
|
||||
|
||||
@@ -28,7 +28,7 @@ export interface TransmittalItem {
|
||||
* Main Transmittal entity
|
||||
*/
|
||||
export interface Transmittal {
|
||||
uuid: string; // ADR-019: from correspondence.uuid
|
||||
publicId: string; // ADR-019: from correspondence.publicId
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
correspondenceId?: number | string;
|
||||
transmittalNo: string;
|
||||
@@ -39,7 +39,7 @@ export interface Transmittal {
|
||||
// Joined relations from API
|
||||
items?: TransmittalItem[];
|
||||
correspondence?: {
|
||||
uuid: string;
|
||||
publicId: string;
|
||||
id?: number;
|
||||
correspondenceNumber: string;
|
||||
projectId: number;
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface UserOrganization {
|
||||
}
|
||||
|
||||
export interface User {
|
||||
uuid: string;
|
||||
publicId: string; // ADR-019: exposed as 'id' in API responses
|
||||
userId?: number; // Excluded from API responses (ADR-019)
|
||||
username: string;
|
||||
email: string;
|
||||
|
||||
Reference in New Issue
Block a user