@platform-modules/civil-aviation-authority 2.3.212 → 2.3.214

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/data-source.js +10 -0
  2. package/dist/index.d.ts +5 -0
  3. package/dist/index.js +5 -0
  4. package/dist/models/FollowUpReportApprovalModel.d.ts +0 -2
  5. package/dist/models/FollowUpReportApprovalModel.js +3 -4
  6. package/dist/models/FollowUpReportAttachmentModel.d.ts +0 -1
  7. package/dist/models/FollowUpReportAttachmentModel.js +2 -3
  8. package/dist/models/FollowUpReportChatModel.d.ts +0 -2
  9. package/dist/models/FollowUpReportChatModel.js +3 -4
  10. package/dist/models/FollowUpReportRequestModel.d.ts +0 -4
  11. package/dist/models/FollowUpReportRequestModel.js +5 -6
  12. package/dist/models/FollowUpReportWorkflowModel.d.ts +0 -2
  13. package/dist/models/FollowUpReportWorkflowModel.js +3 -4
  14. package/dist/models/MaintenanceApprovalModel.d.ts +6 -4
  15. package/dist/models/MaintenanceApprovalModel.js +29 -28
  16. package/dist/models/MaintenanceAttachmentModel.d.ts +2 -1
  17. package/dist/models/MaintenanceAttachmentModel.js +14 -13
  18. package/dist/models/MaintenanceChatModel.d.ts +7 -5
  19. package/dist/models/MaintenanceChatModel.js +26 -25
  20. package/dist/models/MaintenanceRequestModel.d.ts +27 -28
  21. package/dist/models/MaintenanceRequestModel.js +66 -76
  22. package/dist/models/MaintenanceWorkflowModel.d.ts +5 -3
  23. package/dist/models/MaintenanceWorkflowModel.js +23 -22
  24. package/package.json +1 -1
  25. package/src/data-source.ts +10 -0
  26. package/src/index.ts +5 -0
  27. package/src/models/FollowUpReportApprovalModel.ts +0 -3
  28. package/src/models/FollowUpReportAttachmentModel.ts +0 -2
  29. package/src/models/FollowUpReportChatModel.ts +0 -3
  30. package/src/models/FollowUpReportRequestModel.ts +0 -5
  31. package/src/models/FollowUpReportWorkflowModel.ts +0 -3
  32. package/src/models/MaintenanceApprovalModel.ts +59 -0
  33. package/src/models/MaintenanceAttachmentModel.ts +31 -0
  34. package/src/models/MaintenanceChatModel.ts +45 -0
  35. package/src/models/MaintenanceRequestModel.ts +90 -0
  36. package/src/models/MaintenanceWorkflowModel.ts +46 -0
@@ -1,42 +1,41 @@
1
1
  import { BaseModel } from './BaseModel';
2
- /** Subject / handling priority classification */
3
- export declare enum MaintenanceSubjectClassification {
4
- URGENT = "Urgent",
5
- VERY_URGENT = "Very Urgent",
6
- CONFIDENTIAL = "Confidential",
7
- INFORMATIONAL = "Informational",
8
- NORMAL = "Normal"
2
+ export declare enum AssetMaintenanceCategory {
3
+ BUILDING = "Building",
4
+ EQUIPMENT = "Equipment",
5
+ RESIDENTIAL = "Residential"
9
6
  }
10
- /** Concerned department under General Manager of Support Services */
11
- export declare enum MaintenanceConcernedDepartment {
12
- IT = "IT",
13
- HR = "HR",
14
- TRAINING = "Training",
15
- FINANCE = "Finance",
16
- PROJECTS_AND_MAINTENANCE = "Projects & Maintenance"
7
+ export declare enum AssetMaintenanceSubCategory {
8
+ ELECTRICAL = "Electrical",
9
+ PLUMBING = "Plumbing",
10
+ HVAC = "HVAC",
11
+ CIVIL = "Civil",
12
+ CLEANING = "Cleaning",
13
+ OTHER = "Other"
17
14
  }
18
- export declare enum MaintenanceRequestStatus {
15
+ export declare enum AssetMaintenanceRequestStatus {
19
16
  PENDING = "Pending",
20
17
  ASSIGNED = "Assigned",
21
18
  IN_PROGRESS = "In Progress",
22
19
  APPROVED = "Approved",
23
20
  REJECTED = "Rejected"
24
21
  }
25
- export declare class MaintenanceRequests extends BaseModel {
22
+ export declare class AssetMaintenanceRequests extends BaseModel {
26
23
  req_user_department_id: number | null;
27
24
  req_user_section_id: number | null;
28
- service_id: number;
29
- sub_service_id: number;
25
+ service_id: number | null;
26
+ sub_service_id: number | null;
30
27
  user_id: number;
31
- sent_by: string;
32
- letter_date: Date;
33
- subject: string;
34
- subject_classification: MaintenanceSubjectClassification;
35
- topic: string;
36
- concerned_department: MaintenanceConcernedDepartment;
37
- date_from: Date;
38
- date_to: Date;
39
- request_submission_date: Date;
40
- status: MaintenanceRequestStatus;
28
+ category: AssetMaintenanceCategory;
29
+ sub_category: AssetMaintenanceSubCategory;
30
+ emergency_maintenance_support: boolean;
31
+ location: string;
32
+ reason_for_maintenance: string;
33
+ description: string | null;
34
+ completion_date: Date | null;
35
+ status: AssetMaintenanceRequestStatus;
41
36
  workflow_execution_id: string | null;
42
37
  }
38
+ export { AssetMaintenanceRequests as MaintenanceRequests };
39
+ export { AssetMaintenanceRequestStatus as MaintenanceRequestStatus };
40
+ export { AssetMaintenanceCategory as MaintenanceCategory };
41
+ export { AssetMaintenanceSubCategory as MaintenanceSubCategory };
@@ -9,117 +9,107 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.MaintenanceRequests = exports.MaintenanceRequestStatus = exports.MaintenanceConcernedDepartment = exports.MaintenanceSubjectClassification = void 0;
12
+ exports.MaintenanceSubCategory = exports.MaintenanceCategory = exports.MaintenanceRequestStatus = exports.MaintenanceRequests = exports.AssetMaintenanceRequests = exports.AssetMaintenanceRequestStatus = exports.AssetMaintenanceSubCategory = exports.AssetMaintenanceCategory = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
- /** Subject / handling priority classification */
16
- var MaintenanceSubjectClassification;
17
- (function (MaintenanceSubjectClassification) {
18
- MaintenanceSubjectClassification["URGENT"] = "Urgent";
19
- MaintenanceSubjectClassification["VERY_URGENT"] = "Very Urgent";
20
- MaintenanceSubjectClassification["CONFIDENTIAL"] = "Confidential";
21
- MaintenanceSubjectClassification["INFORMATIONAL"] = "Informational";
22
- MaintenanceSubjectClassification["NORMAL"] = "Normal";
23
- })(MaintenanceSubjectClassification || (exports.MaintenanceSubjectClassification = MaintenanceSubjectClassification = {}));
24
- /** Concerned department under General Manager of Support Services */
25
- var MaintenanceConcernedDepartment;
26
- (function (MaintenanceConcernedDepartment) {
27
- MaintenanceConcernedDepartment["IT"] = "IT";
28
- MaintenanceConcernedDepartment["HR"] = "HR";
29
- MaintenanceConcernedDepartment["TRAINING"] = "Training";
30
- MaintenanceConcernedDepartment["FINANCE"] = "Finance";
31
- MaintenanceConcernedDepartment["PROJECTS_AND_MAINTENANCE"] = "Projects & Maintenance";
32
- })(MaintenanceConcernedDepartment || (exports.MaintenanceConcernedDepartment = MaintenanceConcernedDepartment = {}));
33
- var MaintenanceRequestStatus;
34
- (function (MaintenanceRequestStatus) {
35
- MaintenanceRequestStatus["PENDING"] = "Pending";
36
- MaintenanceRequestStatus["ASSIGNED"] = "Assigned";
37
- MaintenanceRequestStatus["IN_PROGRESS"] = "In Progress";
38
- MaintenanceRequestStatus["APPROVED"] = "Approved";
39
- MaintenanceRequestStatus["REJECTED"] = "Rejected";
40
- })(MaintenanceRequestStatus || (exports.MaintenanceRequestStatus = MaintenanceRequestStatus = {}));
41
- let MaintenanceRequests = class MaintenanceRequests extends BaseModel_1.BaseModel {
15
+ var AssetMaintenanceCategory;
16
+ (function (AssetMaintenanceCategory) {
17
+ AssetMaintenanceCategory["BUILDING"] = "Building";
18
+ AssetMaintenanceCategory["EQUIPMENT"] = "Equipment";
19
+ AssetMaintenanceCategory["RESIDENTIAL"] = "Residential";
20
+ })(AssetMaintenanceCategory || (exports.MaintenanceCategory = exports.AssetMaintenanceCategory = AssetMaintenanceCategory = {}));
21
+ var AssetMaintenanceSubCategory;
22
+ (function (AssetMaintenanceSubCategory) {
23
+ AssetMaintenanceSubCategory["ELECTRICAL"] = "Electrical";
24
+ AssetMaintenanceSubCategory["PLUMBING"] = "Plumbing";
25
+ AssetMaintenanceSubCategory["HVAC"] = "HVAC";
26
+ AssetMaintenanceSubCategory["CIVIL"] = "Civil";
27
+ AssetMaintenanceSubCategory["CLEANING"] = "Cleaning";
28
+ AssetMaintenanceSubCategory["OTHER"] = "Other";
29
+ })(AssetMaintenanceSubCategory || (exports.MaintenanceSubCategory = exports.AssetMaintenanceSubCategory = AssetMaintenanceSubCategory = {}));
30
+ var AssetMaintenanceRequestStatus;
31
+ (function (AssetMaintenanceRequestStatus) {
32
+ AssetMaintenanceRequestStatus["PENDING"] = "Pending";
33
+ AssetMaintenanceRequestStatus["ASSIGNED"] = "Assigned";
34
+ AssetMaintenanceRequestStatus["IN_PROGRESS"] = "In Progress";
35
+ AssetMaintenanceRequestStatus["APPROVED"] = "Approved";
36
+ AssetMaintenanceRequestStatus["REJECTED"] = "Rejected";
37
+ })(AssetMaintenanceRequestStatus || (exports.MaintenanceRequestStatus = exports.AssetMaintenanceRequestStatus = AssetMaintenanceRequestStatus = {}));
38
+ let AssetMaintenanceRequests = class AssetMaintenanceRequests extends BaseModel_1.BaseModel {
42
39
  };
43
- exports.MaintenanceRequests = MaintenanceRequests;
40
+ exports.AssetMaintenanceRequests = AssetMaintenanceRequests;
41
+ exports.MaintenanceRequests = AssetMaintenanceRequests;
44
42
  __decorate([
45
43
  (0, typeorm_1.Column)({ type: 'int', nullable: true }),
46
44
  __metadata("design:type", Object)
47
- ], MaintenanceRequests.prototype, "req_user_department_id", void 0);
45
+ ], AssetMaintenanceRequests.prototype, "req_user_department_id", void 0);
48
46
  __decorate([
49
47
  (0, typeorm_1.Column)({ type: 'int', nullable: true }),
50
48
  __metadata("design:type", Object)
51
- ], MaintenanceRequests.prototype, "req_user_section_id", void 0);
49
+ ], AssetMaintenanceRequests.prototype, "req_user_section_id", void 0);
52
50
  __decorate([
53
- (0, typeorm_1.Column)({ nullable: true }),
54
- __metadata("design:type", Number)
55
- ], MaintenanceRequests.prototype, "service_id", void 0);
51
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
52
+ __metadata("design:type", Object)
53
+ ], AssetMaintenanceRequests.prototype, "service_id", void 0);
56
54
  __decorate([
57
- (0, typeorm_1.Column)({ nullable: true }),
58
- __metadata("design:type", Number)
59
- ], MaintenanceRequests.prototype, "sub_service_id", void 0);
55
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
56
+ __metadata("design:type", Object)
57
+ ], AssetMaintenanceRequests.prototype, "sub_service_id", void 0);
60
58
  __decorate([
61
- (0, typeorm_1.Column)({ nullable: false }),
59
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
62
60
  __metadata("design:type", Number)
63
- ], MaintenanceRequests.prototype, "user_id", void 0);
64
- __decorate([
65
- (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
66
- __metadata("design:type", String)
67
- ], MaintenanceRequests.prototype, "sent_by", void 0);
68
- __decorate([
69
- (0, typeorm_1.Column)({ type: 'date', nullable: false }),
70
- __metadata("design:type", Date)
71
- ], MaintenanceRequests.prototype, "letter_date", void 0);
72
- __decorate([
73
- (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
74
- __metadata("design:type", String)
75
- ], MaintenanceRequests.prototype, "subject", void 0);
61
+ ], AssetMaintenanceRequests.prototype, "user_id", void 0);
76
62
  __decorate([
77
63
  (0, typeorm_1.Column)({
78
64
  type: 'enum',
79
- enum: MaintenanceSubjectClassification,
80
- enumName: 'maintenance_subject_classification_en',
65
+ enum: AssetMaintenanceCategory,
66
+ enumName: 'asset_maintenance_category_en',
81
67
  nullable: false,
82
68
  }),
83
69
  __metadata("design:type", String)
84
- ], MaintenanceRequests.prototype, "subject_classification", void 0);
85
- __decorate([
86
- (0, typeorm_1.Column)({ type: 'text', nullable: false }),
87
- __metadata("design:type", String)
88
- ], MaintenanceRequests.prototype, "topic", void 0);
70
+ ], AssetMaintenanceRequests.prototype, "category", void 0);
89
71
  __decorate([
90
72
  (0, typeorm_1.Column)({
91
73
  type: 'enum',
92
- enum: MaintenanceConcernedDepartment,
93
- enumName: 'maintenance_concerned_department_en',
74
+ enum: AssetMaintenanceSubCategory,
75
+ enumName: 'asset_maintenance_sub_category_en',
94
76
  nullable: false,
95
77
  }),
96
78
  __metadata("design:type", String)
97
- ], MaintenanceRequests.prototype, "concerned_department", void 0);
79
+ ], AssetMaintenanceRequests.prototype, "sub_category", void 0);
98
80
  __decorate([
99
- (0, typeorm_1.Column)({ type: 'date', nullable: false }),
100
- __metadata("design:type", Date)
101
- ], MaintenanceRequests.prototype, "date_from", void 0);
81
+ (0, typeorm_1.Column)({ type: 'boolean', nullable: false, default: false }),
82
+ __metadata("design:type", Boolean)
83
+ ], AssetMaintenanceRequests.prototype, "emergency_maintenance_support", void 0);
102
84
  __decorate([
103
- (0, typeorm_1.Column)({ type: 'date', nullable: false }),
104
- __metadata("design:type", Date)
105
- ], MaintenanceRequests.prototype, "date_to", void 0);
85
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
86
+ __metadata("design:type", String)
87
+ ], AssetMaintenanceRequests.prototype, "location", void 0);
106
88
  __decorate([
107
- (0, typeorm_1.Column)({ type: 'date', nullable: false, default: () => 'CURRENT_DATE' }),
108
- __metadata("design:type", Date)
109
- ], MaintenanceRequests.prototype, "request_submission_date", void 0);
89
+ (0, typeorm_1.Column)({ type: 'text', nullable: false }),
90
+ __metadata("design:type", String)
91
+ ], AssetMaintenanceRequests.prototype, "reason_for_maintenance", void 0);
92
+ __decorate([
93
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
94
+ __metadata("design:type", Object)
95
+ ], AssetMaintenanceRequests.prototype, "description", void 0);
96
+ __decorate([
97
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
98
+ __metadata("design:type", Object)
99
+ ], AssetMaintenanceRequests.prototype, "completion_date", void 0);
110
100
  __decorate([
111
101
  (0, typeorm_1.Column)({
112
102
  type: 'enum',
113
- enum: MaintenanceRequestStatus,
114
- default: MaintenanceRequestStatus.PENDING,
103
+ enum: AssetMaintenanceRequestStatus,
104
+ default: AssetMaintenanceRequestStatus.PENDING,
115
105
  nullable: false,
116
106
  }),
117
107
  __metadata("design:type", String)
118
- ], MaintenanceRequests.prototype, "status", void 0);
108
+ ], AssetMaintenanceRequests.prototype, "status", void 0);
119
109
  __decorate([
120
110
  (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
121
111
  __metadata("design:type", Object)
122
- ], MaintenanceRequests.prototype, "workflow_execution_id", void 0);
123
- exports.MaintenanceRequests = MaintenanceRequests = __decorate([
112
+ ], AssetMaintenanceRequests.prototype, "workflow_execution_id", void 0);
113
+ exports.MaintenanceRequests = exports.AssetMaintenanceRequests = AssetMaintenanceRequests = __decorate([
124
114
  (0, typeorm_1.Entity)({ name: 'maintenance_requests' })
125
- ], MaintenanceRequests);
115
+ ], AssetMaintenanceRequests);
@@ -1,17 +1,19 @@
1
1
  import { BaseModel } from './BaseModel';
2
- export declare enum MaintenanceWorkFlowStatus {
2
+ export declare enum AssetMaintenanceWorkflowStatus {
3
3
  COMPLETED = "Completed",
4
4
  NOT_YET_STARTED = "Not Yet Started",
5
5
  PENDING = "Pending"
6
6
  }
7
- export declare class MaintenanceWorkFlow extends BaseModel {
7
+ export declare class AssetMaintenanceWorkflow extends BaseModel {
8
8
  request_id: number;
9
9
  service_id: number | null;
10
10
  sub_service_id: number | null;
11
11
  content: string;
12
- status: MaintenanceWorkFlowStatus;
12
+ status: AssetMaintenanceWorkflowStatus;
13
13
  user_id: number | null;
14
14
  role_id: number | null;
15
15
  department_id: number | null;
16
16
  section_id: number | null;
17
17
  }
18
+ export { AssetMaintenanceWorkflow as MaintenanceWorkFlow };
19
+ export { AssetMaintenanceWorkflowStatus as MaintenanceWorkFlowStatus };
@@ -9,59 +9,60 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.MaintenanceWorkFlow = exports.MaintenanceWorkFlowStatus = void 0;
12
+ exports.MaintenanceWorkFlowStatus = exports.MaintenanceWorkFlow = exports.AssetMaintenanceWorkflow = exports.AssetMaintenanceWorkflowStatus = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
- var MaintenanceWorkFlowStatus;
16
- (function (MaintenanceWorkFlowStatus) {
17
- MaintenanceWorkFlowStatus["COMPLETED"] = "Completed";
18
- MaintenanceWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
19
- MaintenanceWorkFlowStatus["PENDING"] = "Pending";
20
- })(MaintenanceWorkFlowStatus || (exports.MaintenanceWorkFlowStatus = MaintenanceWorkFlowStatus = {}));
21
- let MaintenanceWorkFlow = class MaintenanceWorkFlow extends BaseModel_1.BaseModel {
15
+ var AssetMaintenanceWorkflowStatus;
16
+ (function (AssetMaintenanceWorkflowStatus) {
17
+ AssetMaintenanceWorkflowStatus["COMPLETED"] = "Completed";
18
+ AssetMaintenanceWorkflowStatus["NOT_YET_STARTED"] = "Not Yet Started";
19
+ AssetMaintenanceWorkflowStatus["PENDING"] = "Pending";
20
+ })(AssetMaintenanceWorkflowStatus || (exports.MaintenanceWorkFlowStatus = exports.AssetMaintenanceWorkflowStatus = AssetMaintenanceWorkflowStatus = {}));
21
+ let AssetMaintenanceWorkflow = class AssetMaintenanceWorkflow extends BaseModel_1.BaseModel {
22
22
  };
23
- exports.MaintenanceWorkFlow = MaintenanceWorkFlow;
23
+ exports.AssetMaintenanceWorkflow = AssetMaintenanceWorkflow;
24
+ exports.MaintenanceWorkFlow = AssetMaintenanceWorkflow;
24
25
  __decorate([
25
26
  (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
26
27
  __metadata("design:type", Number)
27
- ], MaintenanceWorkFlow.prototype, "request_id", void 0);
28
+ ], AssetMaintenanceWorkflow.prototype, "request_id", void 0);
28
29
  __decorate([
29
30
  (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
30
31
  __metadata("design:type", Object)
31
- ], MaintenanceWorkFlow.prototype, "service_id", void 0);
32
+ ], AssetMaintenanceWorkflow.prototype, "service_id", void 0);
32
33
  __decorate([
33
34
  (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
34
35
  __metadata("design:type", Object)
35
- ], MaintenanceWorkFlow.prototype, "sub_service_id", void 0);
36
+ ], AssetMaintenanceWorkflow.prototype, "sub_service_id", void 0);
36
37
  __decorate([
37
38
  (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
38
39
  __metadata("design:type", String)
39
- ], MaintenanceWorkFlow.prototype, "content", void 0);
40
+ ], AssetMaintenanceWorkflow.prototype, "content", void 0);
40
41
  __decorate([
41
42
  (0, typeorm_1.Column)({
42
43
  type: 'enum',
43
- enum: MaintenanceWorkFlowStatus,
44
- default: MaintenanceWorkFlowStatus.NOT_YET_STARTED,
44
+ enum: AssetMaintenanceWorkflowStatus,
45
+ default: AssetMaintenanceWorkflowStatus.NOT_YET_STARTED,
45
46
  nullable: false,
46
47
  }),
47
48
  __metadata("design:type", String)
48
- ], MaintenanceWorkFlow.prototype, "status", void 0);
49
+ ], AssetMaintenanceWorkflow.prototype, "status", void 0);
49
50
  __decorate([
50
51
  (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
51
52
  __metadata("design:type", Object)
52
- ], MaintenanceWorkFlow.prototype, "user_id", void 0);
53
+ ], AssetMaintenanceWorkflow.prototype, "user_id", void 0);
53
54
  __decorate([
54
55
  (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
55
56
  __metadata("design:type", Object)
56
- ], MaintenanceWorkFlow.prototype, "role_id", void 0);
57
+ ], AssetMaintenanceWorkflow.prototype, "role_id", void 0);
57
58
  __decorate([
58
59
  (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
59
60
  __metadata("design:type", Object)
60
- ], MaintenanceWorkFlow.prototype, "department_id", void 0);
61
+ ], AssetMaintenanceWorkflow.prototype, "department_id", void 0);
61
62
  __decorate([
62
63
  (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
63
64
  __metadata("design:type", Object)
64
- ], MaintenanceWorkFlow.prototype, "section_id", void 0);
65
- exports.MaintenanceWorkFlow = MaintenanceWorkFlow = __decorate([
65
+ ], AssetMaintenanceWorkflow.prototype, "section_id", void 0);
66
+ exports.MaintenanceWorkFlow = exports.AssetMaintenanceWorkflow = AssetMaintenanceWorkflow = __decorate([
66
67
  (0, typeorm_1.Entity)({ name: 'maintenance_workflows' })
67
- ], MaintenanceWorkFlow);
68
+ ], AssetMaintenanceWorkflow);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.3.212",
3
+ "version": "2.3.214",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -214,6 +214,11 @@ import { FollowUpReportApprovalDetails } from './models/FollowUpReportApprovalMo
214
214
  import { FollowUpReportAttachment } from './models/FollowUpReportAttachmentModel';
215
215
  import { FollowUpReportChat } from './models/FollowUpReportChatModel';
216
216
  import { FollowUpReportWorkFlow } from './models/FollowUpReportWorkflowModel';
217
+ import { AssetMaintenanceRequests } from './models/MaintenanceRequestModel';
218
+ import { AssetMaintenanceApprovalDetails } from './models/MaintenanceApprovalModel';
219
+ import { AssetMaintenanceAttachment } from './models/MaintenanceAttachmentModel';
220
+ import { AssetMaintenanceChat } from './models/MaintenanceChatModel';
221
+ import { AssetMaintenanceWorkflow } from './models/MaintenanceWorkflowModel';
217
222
  import { MediaPublicationsRequests } from './models/MediaPublicationsRequestModel';
218
223
  import { MediaPublicationsApprovalDetails } from './models/MediaPublicationsApprovalModel';
219
224
  import { MediaPublicationsAttachment } from './models/MediaPublicationsAttachmentModel';
@@ -440,6 +445,11 @@ export const AppDataSource = new DataSource({
440
445
  FollowUpReportAttachment,
441
446
  FollowUpReportChat,
442
447
  FollowUpReportWorkFlow,
448
+ AssetMaintenanceRequests,
449
+ AssetMaintenanceApprovalDetails,
450
+ AssetMaintenanceAttachment,
451
+ AssetMaintenanceChat,
452
+ AssetMaintenanceWorkflow,
443
453
  MediaPublicationsRequests,
444
454
  MediaPublicationsApprovalDetails,
445
455
  MediaPublicationsAttachment,
package/src/index.ts CHANGED
@@ -380,6 +380,11 @@ export * from './models/MaintenanceExternalStationsApprovalModel';
380
380
  export * from './models/MaintenanceExternalStationsAttachmentModel';
381
381
  export * from './models/MaintenanceExternalStationsChatModel';
382
382
  export * from './models/MaintenanceExternalStationsWorkflowModel';
383
+ export * from './models/MaintenanceRequestModel';
384
+ export * from './models/MaintenanceApprovalModel';
385
+ export * from './models/MaintenanceAttachmentModel';
386
+ export * from './models/MaintenanceChatModel';
387
+ export * from './models/MaintenanceWorkflowModel';
383
388
  export * from './models/FollowUpReportRequestModel';
384
389
  export * from './models/FollowUpReportApprovalModel';
385
390
  export * from './models/FollowUpReportAttachmentModel';
@@ -55,6 +55,3 @@ export class FollowUpReportApprovalDetails extends BaseModel {
55
55
  is_allowed: boolean;
56
56
  }
57
57
 
58
- // Backward-compatible aliases (entity/table remains maintenance_*)
59
- export { FollowUpReportApprovalDetails as MaintenanceApprovalDetails };
60
- export { FollowUpReportApprovalStatus as MaintenanceApprovalStatus };
@@ -28,5 +28,3 @@ export class FollowUpReportAttachment extends BaseModel {
28
28
  chat_id: number | null;
29
29
  }
30
30
 
31
- // Backward-compatible aliases (entity/table remains maintenance_*)
32
- export { FollowUpReportAttachment as MaintenanceAttachment };
@@ -41,6 +41,3 @@ export class FollowUpReportChat extends BaseModel {
41
41
  status: string;
42
42
  }
43
43
 
44
- // Backward-compatible aliases (entity/table remains maintenance_*)
45
- export { FollowUpReportChat as MaintenanceChat };
46
- export { FollowUpReportMessageType as MaintenanceMessageType };
@@ -93,8 +93,3 @@ export class FollowUpReportRequests extends BaseModel {
93
93
  workflow_execution_id: string | null;
94
94
  }
95
95
 
96
- // Backward-compatible aliases (entity/table remains maintenance_*)
97
- export { FollowUpReportRequests as MaintenanceRequests };
98
- export { FollowUpReportRequestStatus as MaintenanceRequestStatus };
99
- export { FollowUpReportSubjectClassification as MaintenanceSubjectClassification };
100
- export { FollowUpReportConcernedDepartment as MaintenanceConcernedDepartment };
@@ -42,6 +42,3 @@ export class FollowUpReportWorkFlow extends BaseModel {
42
42
  section_id: number | null;
43
43
  }
44
44
 
45
- // Backward-compatible aliases (entity/table remains maintenance_*)
46
- export { FollowUpReportWorkFlow as MaintenanceWorkFlow };
47
- export { FollowUpReportWorkFlowStatus as MaintenanceWorkFlowStatus };
@@ -0,0 +1,59 @@
1
+ import { Column, Entity } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum AssetMaintenanceApprovalStatus {
5
+ PENDING = 'Pending',
6
+ IN_PROGRESS = 'In Progress',
7
+ APPROVED = 'Approved',
8
+ REJECTED = 'Rejected',
9
+ }
10
+
11
+ @Entity({ name: 'maintenance_approvals' })
12
+ export class AssetMaintenanceApprovalDetails extends BaseModel {
13
+ @Column({ type: 'integer', nullable: false })
14
+ request_id: number;
15
+
16
+ @Column({ type: 'integer', nullable: true })
17
+ service_id: number | null;
18
+
19
+ @Column({ type: 'integer', nullable: true })
20
+ sub_service_id: number | null;
21
+
22
+ @Column({ type: 'integer', nullable: false })
23
+ level: number;
24
+
25
+ @Column({ type: 'integer', nullable: true })
26
+ approver_role_id: number | null;
27
+
28
+ @Column({ type: 'integer', nullable: true })
29
+ department_id: number | null;
30
+
31
+ @Column({ type: 'integer', nullable: true })
32
+ section_id: number | null;
33
+
34
+ @Column({ type: 'integer', nullable: true })
35
+ approver_user_id: number | null;
36
+
37
+ @Column({ type: 'integer', nullable: true })
38
+ delegate_user_id: number | null;
39
+
40
+ @Column({ type: 'integer', nullable: true })
41
+ approved_by: number | null;
42
+
43
+ @Column({ type: 'varchar', length: 500, nullable: true, default: '' })
44
+ comment: string;
45
+
46
+ @Column({
47
+ type: 'enum',
48
+ enum: AssetMaintenanceApprovalStatus,
49
+ default: AssetMaintenanceApprovalStatus.PENDING,
50
+ nullable: false,
51
+ })
52
+ approval_status: AssetMaintenanceApprovalStatus;
53
+
54
+ @Column({ type: 'boolean', default: true, nullable: false })
55
+ is_allowed: boolean;
56
+ }
57
+
58
+ export { AssetMaintenanceApprovalDetails as MaintenanceApprovalDetails };
59
+ export { AssetMaintenanceApprovalStatus as MaintenanceApprovalStatus };
@@ -0,0 +1,31 @@
1
+ import { Column, Entity } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'maintenance_attachments' })
5
+ export class AssetMaintenanceAttachment extends BaseModel {
6
+ @Column({ type: 'integer', nullable: false })
7
+ request_id: number;
8
+
9
+ @Column({ type: 'integer', nullable: true })
10
+ service_id: number | null;
11
+
12
+ @Column({ type: 'integer', nullable: true })
13
+ sub_service_id: number | null;
14
+
15
+ @Column({ type: 'varchar', length: 500, nullable: false })
16
+ file_url: string;
17
+
18
+ @Column({ type: 'varchar', length: 255, nullable: true })
19
+ file_name: string;
20
+
21
+ @Column({ type: 'varchar', length: 100, nullable: true })
22
+ file_type: string;
23
+
24
+ @Column({ type: 'bigint', nullable: true })
25
+ file_size: number | null;
26
+
27
+ @Column({ type: 'integer', nullable: true })
28
+ chat_id: number | null;
29
+ }
30
+
31
+ export { AssetMaintenanceAttachment as MaintenanceAttachment };
@@ -0,0 +1,45 @@
1
+ import { Column, Entity } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum AssetMaintenanceMessageType {
5
+ TEXT = 'text',
6
+ IMAGE = 'image',
7
+ VIDEO = 'video',
8
+ FILE = 'file',
9
+ LINK = 'link',
10
+ }
11
+
12
+ @Entity({ name: 'maintenance_chats' })
13
+ export class AssetMaintenanceChat extends BaseModel {
14
+ @Column({ type: 'integer', nullable: false })
15
+ request_id: number;
16
+
17
+ @Column({ type: 'integer', nullable: true })
18
+ service_id: number | null;
19
+
20
+ @Column({ type: 'integer', nullable: true })
21
+ sub_service_id: number | null;
22
+
23
+ @Column({ type: 'integer', nullable: false })
24
+ user_id: number;
25
+
26
+ @Column({ type: 'integer', nullable: true })
27
+ role_id: number | null;
28
+
29
+ @Column({ type: 'text', nullable: false })
30
+ message: string;
31
+
32
+ @Column({
33
+ type: 'enum',
34
+ enum: AssetMaintenanceMessageType,
35
+ default: AssetMaintenanceMessageType.TEXT,
36
+ nullable: false,
37
+ })
38
+ messageType: AssetMaintenanceMessageType;
39
+
40
+ @Column({ type: 'text', nullable: true })
41
+ status: string | null;
42
+ }
43
+
44
+ export { AssetMaintenanceChat as MaintenanceChat };
45
+ export { AssetMaintenanceMessageType as MaintenanceMessageType };