This commit is contained in:
@@ -38,7 +38,8 @@ export interface CirculationRouting {
|
||||
* Main Circulation entity
|
||||
*/
|
||||
export interface Circulation {
|
||||
id: number;
|
||||
uuid: string;
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
correspondenceId?: number;
|
||||
organizationId: number;
|
||||
circulationNo: string;
|
||||
@@ -52,16 +53,19 @@ export interface Circulation {
|
||||
// Joined relations from API
|
||||
routings?: CirculationRouting[];
|
||||
correspondence?: {
|
||||
id: number;
|
||||
uuid: string;
|
||||
id?: number;
|
||||
correspondence_number: string;
|
||||
};
|
||||
organization?: {
|
||||
id: number;
|
||||
uuid: string;
|
||||
id?: number;
|
||||
organization_code: string;
|
||||
organization_name: string;
|
||||
};
|
||||
creator?: {
|
||||
user_id: number;
|
||||
uuid: string;
|
||||
user_id?: number;
|
||||
username: string;
|
||||
first_name?: string;
|
||||
last_name?: string;
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
export interface Organization {
|
||||
id: number;
|
||||
uuid: string;
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
organizationName: string;
|
||||
organizationCode: string;
|
||||
}
|
||||
|
||||
export interface Attachment {
|
||||
id: number;
|
||||
uuid: string;
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
name: string;
|
||||
url: string;
|
||||
size?: number;
|
||||
@@ -15,7 +17,8 @@ export interface Attachment {
|
||||
|
||||
// Used in List View mainly
|
||||
export interface CorrespondenceRevision {
|
||||
id: number;
|
||||
uuid: string;
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
revisionNumber: number;
|
||||
revisionLabel?: string; // e.g. "A", "00"
|
||||
subject: string;
|
||||
@@ -36,20 +39,22 @@ export interface CorrespondenceRevision {
|
||||
|
||||
// Nested Relation from Backend Refactor
|
||||
correspondence: {
|
||||
id: number;
|
||||
uuid: string;
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
correspondenceNumber: string;
|
||||
projectId: number;
|
||||
originatorId?: number;
|
||||
isInternal: boolean;
|
||||
originator?: Organization;
|
||||
project?: { id: number; projectName: string; projectCode: string };
|
||||
project?: { uuid: 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 {
|
||||
id: number;
|
||||
uuid: string;
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
correspondenceNumber: string;
|
||||
projectId: number;
|
||||
originatorId?: number;
|
||||
@@ -59,7 +64,7 @@ export interface Correspondence {
|
||||
|
||||
// Relations
|
||||
originator?: Organization;
|
||||
project?: { id: number; projectName: string; projectCode: string };
|
||||
project?: { uuid: string; id?: number; projectName: string; projectCode: string };
|
||||
type?: { id: number; typeName: string; typeCode: string };
|
||||
revisions?: CorrespondenceRevision[]; // Nested revisions
|
||||
recipients?: {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Entity Interfaces
|
||||
export interface DrawingRevision {
|
||||
revisionId: number;
|
||||
uuid: string;
|
||||
revisionId?: number; // Excluded from API responses (ADR-019)
|
||||
revisionNumber: string;
|
||||
title?: string; // Added
|
||||
legacyDrawingNumber?: string; // Added
|
||||
@@ -14,7 +15,8 @@ export interface DrawingRevision {
|
||||
}
|
||||
|
||||
export interface ContractDrawing {
|
||||
id: number;
|
||||
uuid: string;
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
contractDrawingNo: string;
|
||||
title: string;
|
||||
projectId: number;
|
||||
@@ -26,7 +28,8 @@ export interface ContractDrawing {
|
||||
}
|
||||
|
||||
export interface ShopDrawing {
|
||||
id: number;
|
||||
uuid: string;
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
drawingNumber: string;
|
||||
projectId: number;
|
||||
mainCategoryId: number;
|
||||
@@ -38,7 +41,8 @@ export interface ShopDrawing {
|
||||
}
|
||||
|
||||
export interface AsBuiltDrawing {
|
||||
id: number;
|
||||
uuid: string;
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
drawingNumber: string;
|
||||
projectId: number;
|
||||
mainCategoryId: number;
|
||||
@@ -50,7 +54,8 @@ export interface AsBuiltDrawing {
|
||||
|
||||
// Unified Type for List
|
||||
export interface Drawing {
|
||||
drawingId: number;
|
||||
uuid?: string;
|
||||
drawingId?: number; // Excluded from API responses (ADR-019)
|
||||
drawingNumber: string;
|
||||
title: string; // Display title (from current revision for Shop/AsBuilt)
|
||||
discipline?: string | { disciplineCode: string; disciplineName: string };
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export interface Notification {
|
||||
notificationId: number;
|
||||
uuid: string;
|
||||
notificationId?: number; // Excluded from API responses (ADR-019)
|
||||
title: string;
|
||||
message: string;
|
||||
type: "INFO" | "SUCCESS" | "WARNING" | "ERROR";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export interface Organization {
|
||||
id: number;
|
||||
uuid: string;
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
organizationCode: string;
|
||||
organizationName: string;
|
||||
roleId?: number; // NEW - organization role (OWNER, DESIGNER, CONSULTANT, CONTRACTOR, THIRD_PARTY)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export interface SearchResult {
|
||||
id: number;
|
||||
uuid: string;
|
||||
id?: number; // Excluded from API responses (ADR-019)
|
||||
type: "correspondence" | "rfa" | "drawing";
|
||||
title: string;
|
||||
description?: string;
|
||||
|
||||
@@ -12,7 +12,8 @@ export interface UserOrganization {
|
||||
}
|
||||
|
||||
export interface User {
|
||||
userId: number;
|
||||
uuid: string;
|
||||
userId?: number; // Excluded from API responses (ADR-019)
|
||||
username: string;
|
||||
email: string;
|
||||
firstName: string;
|
||||
|
||||
Reference in New Issue
Block a user