@platform-modules/civil-aviation-authority 2.3.206 → 2.3.208

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.
@@ -206,6 +206,11 @@ const WorkingHoursExtensionChatModel_1 = require("./models/WorkingHoursExtension
206
206
  const WorkingHoursExtensionAttachmentModel_1 = require("./models/WorkingHoursExtensionAttachmentModel");
207
207
  const RequestATenderRequestModel_1 = require("./models/RequestATenderRequestModel");
208
208
  const RequestTenderAnalysisRequestModel_1 = require("./models/RequestTenderAnalysisRequestModel");
209
+ const MaintenanceExternalStationsRequestModel_1 = require("./models/MaintenanceExternalStationsRequestModel");
210
+ const MaintenanceExternalStationsApprovalModel_1 = require("./models/MaintenanceExternalStationsApprovalModel");
211
+ const MaintenanceExternalStationsAttachmentModel_1 = require("./models/MaintenanceExternalStationsAttachmentModel");
212
+ const MaintenanceExternalStationsChatModel_1 = require("./models/MaintenanceExternalStationsChatModel");
213
+ const MaintenanceExternalStationsWorkflowModel_1 = require("./models/MaintenanceExternalStationsWorkflowModel");
209
214
  exports.AppDataSource = new typeorm_1.DataSource({
210
215
  type: 'postgres',
211
216
  host: process.env.DB_HOST || 'localhost',
@@ -415,6 +420,11 @@ exports.AppDataSource = new typeorm_1.DataSource({
415
420
  WorkingHoursExtensionChatModel_1.WorkingHoursExtensionChat,
416
421
  WorkingHoursExtensionAttachmentModel_1.WorkingHoursExtensionAttachment,
417
422
  RequestATenderRequestModel_1.RequestATenderRequest,
418
- RequestTenderAnalysisRequestModel_1.RequestTenderAnalysisRequest
423
+ RequestTenderAnalysisRequestModel_1.RequestTenderAnalysisRequest,
424
+ MaintenanceExternalStationsRequestModel_1.MaintenanceExternalStationsRequests,
425
+ MaintenanceExternalStationsApprovalModel_1.MaintenanceExternalStationsApprovalDetails,
426
+ MaintenanceExternalStationsAttachmentModel_1.MaintenanceExternalStationsAttachment,
427
+ MaintenanceExternalStationsChatModel_1.MaintenanceExternalStationsChat,
428
+ MaintenanceExternalStationsWorkflowModel_1.MaintenanceExternalStationsWorkFlow,
419
429
  ],
420
430
  });
package/dist/index.d.ts CHANGED
@@ -309,6 +309,11 @@ export * from './models/HousingContractCancelWorkflowModel';
309
309
  export * from './models/HousingContractCancelApprovalModel';
310
310
  export * from './models/HousingContractCancelChatModel';
311
311
  export * from './models/HousingContractCancelAttachmentModel';
312
+ export * from './models/MaintenanceExternalStationsRequestModel';
313
+ export * from './models/MaintenanceExternalStationsApprovalModel';
314
+ export * from './models/MaintenanceExternalStationsAttachmentModel';
315
+ export * from './models/MaintenanceExternalStationsChatModel';
316
+ export * from './models/MaintenanceExternalStationsWorkflowModel';
312
317
  export * from './models/LegalConsultationRequestModel';
313
318
  export * from './models/LegalConsultationWorkflowModel';
314
319
  export * from './models/LegalConsultationApprovalModel';
package/dist/index.js CHANGED
@@ -471,6 +471,12 @@ __exportStar(require("./models/HousingContractCancelWorkflowModel"), exports);
471
471
  __exportStar(require("./models/HousingContractCancelApprovalModel"), exports);
472
472
  __exportStar(require("./models/HousingContractCancelChatModel"), exports);
473
473
  __exportStar(require("./models/HousingContractCancelAttachmentModel"), exports);
474
+ // Maintenance External Stations (Asset Affairs)
475
+ __exportStar(require("./models/MaintenanceExternalStationsRequestModel"), exports);
476
+ __exportStar(require("./models/MaintenanceExternalStationsApprovalModel"), exports);
477
+ __exportStar(require("./models/MaintenanceExternalStationsAttachmentModel"), exports);
478
+ __exportStar(require("./models/MaintenanceExternalStationsChatModel"), exports);
479
+ __exportStar(require("./models/MaintenanceExternalStationsWorkflowModel"), exports);
474
480
  // Legal Consultation — Review of Administrative Decisions
475
481
  __exportStar(require("./models/LegalConsultationRequestModel"), exports);
476
482
  __exportStar(require("./models/LegalConsultationWorkflowModel"), exports);
@@ -0,0 +1,22 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum MaintenanceExternalStationsApprovalStatus {
3
+ PENDING = "Pending",
4
+ IN_PROGRESS = "In Progress",
5
+ APPROVED = "Approved",
6
+ REJECTED = "Rejected"
7
+ }
8
+ export declare class MaintenanceExternalStationsApprovalDetails extends BaseModel {
9
+ request_id: number;
10
+ service_id: number | null;
11
+ sub_service_id: number | null;
12
+ level: number;
13
+ approver_role_id: number;
14
+ department_id: number | null;
15
+ section_id: number | null;
16
+ approver_user_id: number | null;
17
+ delegate_user_id: number | null;
18
+ approved_by: number | null;
19
+ comment: string;
20
+ approval_status: MaintenanceExternalStationsApprovalStatus;
21
+ is_allowed: boolean;
22
+ }
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.MaintenanceExternalStationsApprovalDetails = exports.MaintenanceExternalStationsApprovalStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var MaintenanceExternalStationsApprovalStatus;
16
+ (function (MaintenanceExternalStationsApprovalStatus) {
17
+ MaintenanceExternalStationsApprovalStatus["PENDING"] = "Pending";
18
+ MaintenanceExternalStationsApprovalStatus["IN_PROGRESS"] = "In Progress";
19
+ MaintenanceExternalStationsApprovalStatus["APPROVED"] = "Approved";
20
+ MaintenanceExternalStationsApprovalStatus["REJECTED"] = "Rejected";
21
+ })(MaintenanceExternalStationsApprovalStatus || (exports.MaintenanceExternalStationsApprovalStatus = MaintenanceExternalStationsApprovalStatus = {}));
22
+ let MaintenanceExternalStationsApprovalDetails = class MaintenanceExternalStationsApprovalDetails extends BaseModel_1.BaseModel {
23
+ };
24
+ exports.MaintenanceExternalStationsApprovalDetails = MaintenanceExternalStationsApprovalDetails;
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
27
+ __metadata("design:type", Number)
28
+ ], MaintenanceExternalStationsApprovalDetails.prototype, "request_id", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
31
+ __metadata("design:type", Object)
32
+ ], MaintenanceExternalStationsApprovalDetails.prototype, "service_id", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
35
+ __metadata("design:type", Object)
36
+ ], MaintenanceExternalStationsApprovalDetails.prototype, "sub_service_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
39
+ __metadata("design:type", Number)
40
+ ], MaintenanceExternalStationsApprovalDetails.prototype, "level", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
43
+ __metadata("design:type", Number)
44
+ ], MaintenanceExternalStationsApprovalDetails.prototype, "approver_role_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
47
+ __metadata("design:type", Object)
48
+ ], MaintenanceExternalStationsApprovalDetails.prototype, "department_id", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
51
+ __metadata("design:type", Object)
52
+ ], MaintenanceExternalStationsApprovalDetails.prototype, "section_id", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
55
+ __metadata("design:type", Object)
56
+ ], MaintenanceExternalStationsApprovalDetails.prototype, "approver_user_id", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
59
+ __metadata("design:type", Object)
60
+ ], MaintenanceExternalStationsApprovalDetails.prototype, "delegate_user_id", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
63
+ __metadata("design:type", Object)
64
+ ], MaintenanceExternalStationsApprovalDetails.prototype, "approved_by", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true, default: '' }),
67
+ __metadata("design:type", String)
68
+ ], MaintenanceExternalStationsApprovalDetails.prototype, "comment", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({
71
+ type: 'enum',
72
+ enum: MaintenanceExternalStationsApprovalStatus,
73
+ default: MaintenanceExternalStationsApprovalStatus.PENDING,
74
+ nullable: false,
75
+ }),
76
+ __metadata("design:type", String)
77
+ ], MaintenanceExternalStationsApprovalDetails.prototype, "approval_status", void 0);
78
+ __decorate([
79
+ (0, typeorm_1.Column)({ type: 'boolean', default: true, nullable: false }),
80
+ __metadata("design:type", Boolean)
81
+ ], MaintenanceExternalStationsApprovalDetails.prototype, "is_allowed", void 0);
82
+ exports.MaintenanceExternalStationsApprovalDetails = MaintenanceExternalStationsApprovalDetails = __decorate([
83
+ (0, typeorm_1.Entity)({ name: 'maintenance_external_stations_approvals' })
84
+ ], MaintenanceExternalStationsApprovalDetails);
@@ -0,0 +1,11 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class MaintenanceExternalStationsAttachment extends BaseModel {
3
+ request_id: number;
4
+ service_id: number | null;
5
+ sub_service_id: number | null;
6
+ file_url: string;
7
+ file_name: string;
8
+ file_type: string;
9
+ file_size: number | null;
10
+ chat_id: number | null;
11
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.MaintenanceExternalStationsAttachment = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let MaintenanceExternalStationsAttachment = class MaintenanceExternalStationsAttachment extends BaseModel_1.BaseModel {
16
+ };
17
+ exports.MaintenanceExternalStationsAttachment = MaintenanceExternalStationsAttachment;
18
+ __decorate([
19
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
20
+ __metadata("design:type", Number)
21
+ ], MaintenanceExternalStationsAttachment.prototype, "request_id", void 0);
22
+ __decorate([
23
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
24
+ __metadata("design:type", Object)
25
+ ], MaintenanceExternalStationsAttachment.prototype, "service_id", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
28
+ __metadata("design:type", Object)
29
+ ], MaintenanceExternalStationsAttachment.prototype, "sub_service_id", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
32
+ __metadata("design:type", String)
33
+ ], MaintenanceExternalStationsAttachment.prototype, "file_url", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
36
+ __metadata("design:type", String)
37
+ ], MaintenanceExternalStationsAttachment.prototype, "file_name", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
40
+ __metadata("design:type", String)
41
+ ], MaintenanceExternalStationsAttachment.prototype, "file_type", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
44
+ __metadata("design:type", Object)
45
+ ], MaintenanceExternalStationsAttachment.prototype, "file_size", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
48
+ __metadata("design:type", Object)
49
+ ], MaintenanceExternalStationsAttachment.prototype, "chat_id", void 0);
50
+ exports.MaintenanceExternalStationsAttachment = MaintenanceExternalStationsAttachment = __decorate([
51
+ (0, typeorm_1.Entity)({ name: 'maintenance_external_stations_attachments' })
52
+ ], MaintenanceExternalStationsAttachment);
@@ -0,0 +1,18 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum MaintenanceExternalStationsMessageType {
3
+ TEXT = "text",
4
+ IMAGE = "image",
5
+ VIDEO = "video",
6
+ FILE = "file",
7
+ LINK = "link"
8
+ }
9
+ export declare class MaintenanceExternalStationsChat extends BaseModel {
10
+ request_id: number;
11
+ service_id: number | null;
12
+ sub_service_id: number | null;
13
+ user_id: number;
14
+ role_id: number;
15
+ message: string;
16
+ messageType: MaintenanceExternalStationsMessageType;
17
+ status: string;
18
+ }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.MaintenanceExternalStationsChat = exports.MaintenanceExternalStationsMessageType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var MaintenanceExternalStationsMessageType;
16
+ (function (MaintenanceExternalStationsMessageType) {
17
+ MaintenanceExternalStationsMessageType["TEXT"] = "text";
18
+ MaintenanceExternalStationsMessageType["IMAGE"] = "image";
19
+ MaintenanceExternalStationsMessageType["VIDEO"] = "video";
20
+ MaintenanceExternalStationsMessageType["FILE"] = "file";
21
+ MaintenanceExternalStationsMessageType["LINK"] = "link";
22
+ })(MaintenanceExternalStationsMessageType || (exports.MaintenanceExternalStationsMessageType = MaintenanceExternalStationsMessageType = {}));
23
+ let MaintenanceExternalStationsChat = class MaintenanceExternalStationsChat extends BaseModel_1.BaseModel {
24
+ };
25
+ exports.MaintenanceExternalStationsChat = MaintenanceExternalStationsChat;
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
28
+ __metadata("design:type", Number)
29
+ ], MaintenanceExternalStationsChat.prototype, "request_id", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
32
+ __metadata("design:type", Object)
33
+ ], MaintenanceExternalStationsChat.prototype, "service_id", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
36
+ __metadata("design:type", Object)
37
+ ], MaintenanceExternalStationsChat.prototype, "sub_service_id", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
40
+ __metadata("design:type", Number)
41
+ ], MaintenanceExternalStationsChat.prototype, "user_id", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
44
+ __metadata("design:type", Number)
45
+ ], MaintenanceExternalStationsChat.prototype, "role_id", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({ type: 'text', nullable: false }),
48
+ __metadata("design:type", String)
49
+ ], MaintenanceExternalStationsChat.prototype, "message", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.Column)({
52
+ type: 'enum',
53
+ enum: MaintenanceExternalStationsMessageType,
54
+ default: MaintenanceExternalStationsMessageType.TEXT,
55
+ nullable: false,
56
+ }),
57
+ __metadata("design:type", String)
58
+ ], MaintenanceExternalStationsChat.prototype, "messageType", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
61
+ __metadata("design:type", String)
62
+ ], MaintenanceExternalStationsChat.prototype, "status", void 0);
63
+ exports.MaintenanceExternalStationsChat = MaintenanceExternalStationsChat = __decorate([
64
+ (0, typeorm_1.Entity)({ name: 'maintenance_external_stations_chats' })
65
+ ], MaintenanceExternalStationsChat);
@@ -0,0 +1,49 @@
1
+ import { BaseModel } from './BaseModel';
2
+ /** Location / use category for the external station context */
3
+ export declare enum MaintenanceExternalStationsStationCategory {
4
+ WORKSHOP = "Workshop",
5
+ TRAINING = "Training",
6
+ DUTY_MISSION = "Duty Mission",
7
+ ASSIGNMENT = "Assignment",
8
+ OTHER = "Other"
9
+ }
10
+ export declare enum MaintenanceExternalStationsIssueType {
11
+ EQUIPMENT = "Equipment",
12
+ FACILITY = "Facility",
13
+ INFRASTRUCTURE = "Infrastructure",
14
+ OTHER = "Other"
15
+ }
16
+ export declare enum MaintenanceExternalStationsUrgencyLevel {
17
+ LOW = "Low",
18
+ MEDIUM = "Medium",
19
+ HIGH = "High",
20
+ CRITICAL = "Critical"
21
+ }
22
+ export declare enum MaintenanceExternalStationsRequestStatus {
23
+ PENDING = "Pending",
24
+ ASSIGNED = "Assigned",
25
+ IN_PROGRESS = "In Progress",
26
+ APPROVED = "Approved",
27
+ REJECTED = "Rejected"
28
+ }
29
+ export declare class MaintenanceExternalStationsRequests extends BaseModel {
30
+ req_user_department_id: number | null;
31
+ req_user_section_id: number | null;
32
+ service_id: number;
33
+ sub_service_id: number;
34
+ user_id: number;
35
+ external_station_name_or_location: string;
36
+ station_category: MaintenanceExternalStationsStationCategory;
37
+ station_category_other_specify: string | null;
38
+ type_of_issue: MaintenanceExternalStationsIssueType;
39
+ type_of_issue_other_specify: string | null;
40
+ detailed_description: string;
41
+ urgency_level: MaintenanceExternalStationsUrgencyLevel;
42
+ date_of_issue_occurred: Date;
43
+ contact_person_name: string | null;
44
+ contact_person_number: string | null;
45
+ contact_person_designation: string | null;
46
+ request_submission_date: Date;
47
+ status: MaintenanceExternalStationsRequestStatus;
48
+ workflow_execution_id: string | null;
49
+ }
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.MaintenanceExternalStationsRequests = exports.MaintenanceExternalStationsRequestStatus = exports.MaintenanceExternalStationsUrgencyLevel = exports.MaintenanceExternalStationsIssueType = exports.MaintenanceExternalStationsStationCategory = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ /** Location / use category for the external station context */
16
+ var MaintenanceExternalStationsStationCategory;
17
+ (function (MaintenanceExternalStationsStationCategory) {
18
+ MaintenanceExternalStationsStationCategory["WORKSHOP"] = "Workshop";
19
+ MaintenanceExternalStationsStationCategory["TRAINING"] = "Training";
20
+ MaintenanceExternalStationsStationCategory["DUTY_MISSION"] = "Duty Mission";
21
+ MaintenanceExternalStationsStationCategory["ASSIGNMENT"] = "Assignment";
22
+ MaintenanceExternalStationsStationCategory["OTHER"] = "Other";
23
+ })(MaintenanceExternalStationsStationCategory || (exports.MaintenanceExternalStationsStationCategory = MaintenanceExternalStationsStationCategory = {}));
24
+ var MaintenanceExternalStationsIssueType;
25
+ (function (MaintenanceExternalStationsIssueType) {
26
+ MaintenanceExternalStationsIssueType["EQUIPMENT"] = "Equipment";
27
+ MaintenanceExternalStationsIssueType["FACILITY"] = "Facility";
28
+ MaintenanceExternalStationsIssueType["INFRASTRUCTURE"] = "Infrastructure";
29
+ MaintenanceExternalStationsIssueType["OTHER"] = "Other";
30
+ })(MaintenanceExternalStationsIssueType || (exports.MaintenanceExternalStationsIssueType = MaintenanceExternalStationsIssueType = {}));
31
+ var MaintenanceExternalStationsUrgencyLevel;
32
+ (function (MaintenanceExternalStationsUrgencyLevel) {
33
+ MaintenanceExternalStationsUrgencyLevel["LOW"] = "Low";
34
+ MaintenanceExternalStationsUrgencyLevel["MEDIUM"] = "Medium";
35
+ MaintenanceExternalStationsUrgencyLevel["HIGH"] = "High";
36
+ MaintenanceExternalStationsUrgencyLevel["CRITICAL"] = "Critical";
37
+ })(MaintenanceExternalStationsUrgencyLevel || (exports.MaintenanceExternalStationsUrgencyLevel = MaintenanceExternalStationsUrgencyLevel = {}));
38
+ var MaintenanceExternalStationsRequestStatus;
39
+ (function (MaintenanceExternalStationsRequestStatus) {
40
+ MaintenanceExternalStationsRequestStatus["PENDING"] = "Pending";
41
+ MaintenanceExternalStationsRequestStatus["ASSIGNED"] = "Assigned";
42
+ MaintenanceExternalStationsRequestStatus["IN_PROGRESS"] = "In Progress";
43
+ MaintenanceExternalStationsRequestStatus["APPROVED"] = "Approved";
44
+ MaintenanceExternalStationsRequestStatus["REJECTED"] = "Rejected";
45
+ })(MaintenanceExternalStationsRequestStatus || (exports.MaintenanceExternalStationsRequestStatus = MaintenanceExternalStationsRequestStatus = {}));
46
+ let MaintenanceExternalStationsRequests = class MaintenanceExternalStationsRequests extends BaseModel_1.BaseModel {
47
+ };
48
+ exports.MaintenanceExternalStationsRequests = MaintenanceExternalStationsRequests;
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
51
+ __metadata("design:type", Object)
52
+ ], MaintenanceExternalStationsRequests.prototype, "req_user_department_id", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
55
+ __metadata("design:type", Object)
56
+ ], MaintenanceExternalStationsRequests.prototype, "req_user_section_id", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ nullable: true }),
59
+ __metadata("design:type", Number)
60
+ ], MaintenanceExternalStationsRequests.prototype, "service_id", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ nullable: true }),
63
+ __metadata("design:type", Number)
64
+ ], MaintenanceExternalStationsRequests.prototype, "sub_service_id", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ nullable: false }),
67
+ __metadata("design:type", Number)
68
+ ], MaintenanceExternalStationsRequests.prototype, "user_id", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
71
+ __metadata("design:type", String)
72
+ ], MaintenanceExternalStationsRequests.prototype, "external_station_name_or_location", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({
75
+ type: 'enum',
76
+ enum: MaintenanceExternalStationsStationCategory,
77
+ enumName: 'maintenance_external_stations_station_category_en',
78
+ nullable: false,
79
+ }),
80
+ __metadata("design:type", String)
81
+ ], MaintenanceExternalStationsRequests.prototype, "station_category", void 0);
82
+ __decorate([
83
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
84
+ __metadata("design:type", Object)
85
+ ], MaintenanceExternalStationsRequests.prototype, "station_category_other_specify", void 0);
86
+ __decorate([
87
+ (0, typeorm_1.Column)({
88
+ type: 'enum',
89
+ enum: MaintenanceExternalStationsIssueType,
90
+ enumName: 'maintenance_external_stations_issue_type_en',
91
+ nullable: false,
92
+ }),
93
+ __metadata("design:type", String)
94
+ ], MaintenanceExternalStationsRequests.prototype, "type_of_issue", void 0);
95
+ __decorate([
96
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
97
+ __metadata("design:type", Object)
98
+ ], MaintenanceExternalStationsRequests.prototype, "type_of_issue_other_specify", void 0);
99
+ __decorate([
100
+ (0, typeorm_1.Column)({ type: 'text', nullable: false }),
101
+ __metadata("design:type", String)
102
+ ], MaintenanceExternalStationsRequests.prototype, "detailed_description", void 0);
103
+ __decorate([
104
+ (0, typeorm_1.Column)({
105
+ type: 'enum',
106
+ enum: MaintenanceExternalStationsUrgencyLevel,
107
+ enumName: 'maintenance_external_stations_urgency_en',
108
+ nullable: false,
109
+ }),
110
+ __metadata("design:type", String)
111
+ ], MaintenanceExternalStationsRequests.prototype, "urgency_level", void 0);
112
+ __decorate([
113
+ (0, typeorm_1.Column)({ type: 'date', nullable: false }),
114
+ __metadata("design:type", Date)
115
+ ], MaintenanceExternalStationsRequests.prototype, "date_of_issue_occurred", void 0);
116
+ __decorate([
117
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
118
+ __metadata("design:type", Object)
119
+ ], MaintenanceExternalStationsRequests.prototype, "contact_person_name", void 0);
120
+ __decorate([
121
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
122
+ __metadata("design:type", Object)
123
+ ], MaintenanceExternalStationsRequests.prototype, "contact_person_number", void 0);
124
+ __decorate([
125
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
126
+ __metadata("design:type", Object)
127
+ ], MaintenanceExternalStationsRequests.prototype, "contact_person_designation", void 0);
128
+ __decorate([
129
+ (0, typeorm_1.Column)({ type: 'date', nullable: false, default: () => 'CURRENT_DATE' }),
130
+ __metadata("design:type", Date)
131
+ ], MaintenanceExternalStationsRequests.prototype, "request_submission_date", void 0);
132
+ __decorate([
133
+ (0, typeorm_1.Column)({
134
+ type: 'enum',
135
+ enum: MaintenanceExternalStationsRequestStatus,
136
+ default: MaintenanceExternalStationsRequestStatus.PENDING,
137
+ nullable: false,
138
+ }),
139
+ __metadata("design:type", String)
140
+ ], MaintenanceExternalStationsRequests.prototype, "status", void 0);
141
+ __decorate([
142
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
143
+ __metadata("design:type", Object)
144
+ ], MaintenanceExternalStationsRequests.prototype, "workflow_execution_id", void 0);
145
+ exports.MaintenanceExternalStationsRequests = MaintenanceExternalStationsRequests = __decorate([
146
+ (0, typeorm_1.Entity)({ name: 'maintenance_external_stations_requests' })
147
+ ], MaintenanceExternalStationsRequests);
@@ -0,0 +1,17 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum MaintenanceExternalStationsWorkFlowStatus {
3
+ COMPLETED = "Completed",
4
+ NOT_YET_STARTED = "Not Yet Started",
5
+ PENDING = "Pending"
6
+ }
7
+ export declare class MaintenanceExternalStationsWorkFlow extends BaseModel {
8
+ request_id: number;
9
+ service_id: number | null;
10
+ sub_service_id: number | null;
11
+ content: string;
12
+ status: MaintenanceExternalStationsWorkFlowStatus;
13
+ user_id: number | null;
14
+ role_id: number | null;
15
+ department_id: number | null;
16
+ section_id: number | null;
17
+ }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.MaintenanceExternalStationsWorkFlow = exports.MaintenanceExternalStationsWorkFlowStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var MaintenanceExternalStationsWorkFlowStatus;
16
+ (function (MaintenanceExternalStationsWorkFlowStatus) {
17
+ MaintenanceExternalStationsWorkFlowStatus["COMPLETED"] = "Completed";
18
+ MaintenanceExternalStationsWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
19
+ MaintenanceExternalStationsWorkFlowStatus["PENDING"] = "Pending";
20
+ })(MaintenanceExternalStationsWorkFlowStatus || (exports.MaintenanceExternalStationsWorkFlowStatus = MaintenanceExternalStationsWorkFlowStatus = {}));
21
+ let MaintenanceExternalStationsWorkFlow = class MaintenanceExternalStationsWorkFlow extends BaseModel_1.BaseModel {
22
+ };
23
+ exports.MaintenanceExternalStationsWorkFlow = MaintenanceExternalStationsWorkFlow;
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
26
+ __metadata("design:type", Number)
27
+ ], MaintenanceExternalStationsWorkFlow.prototype, "request_id", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
30
+ __metadata("design:type", Object)
31
+ ], MaintenanceExternalStationsWorkFlow.prototype, "service_id", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
34
+ __metadata("design:type", Object)
35
+ ], MaintenanceExternalStationsWorkFlow.prototype, "sub_service_id", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
38
+ __metadata("design:type", String)
39
+ ], MaintenanceExternalStationsWorkFlow.prototype, "content", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({
42
+ type: 'enum',
43
+ enum: MaintenanceExternalStationsWorkFlowStatus,
44
+ default: MaintenanceExternalStationsWorkFlowStatus.NOT_YET_STARTED,
45
+ nullable: false,
46
+ }),
47
+ __metadata("design:type", String)
48
+ ], MaintenanceExternalStationsWorkFlow.prototype, "status", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
51
+ __metadata("design:type", Object)
52
+ ], MaintenanceExternalStationsWorkFlow.prototype, "user_id", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
55
+ __metadata("design:type", Object)
56
+ ], MaintenanceExternalStationsWorkFlow.prototype, "role_id", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
59
+ __metadata("design:type", Object)
60
+ ], MaintenanceExternalStationsWorkFlow.prototype, "department_id", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
63
+ __metadata("design:type", Object)
64
+ ], MaintenanceExternalStationsWorkFlow.prototype, "section_id", void 0);
65
+ exports.MaintenanceExternalStationsWorkFlow = MaintenanceExternalStationsWorkFlow = __decorate([
66
+ (0, typeorm_1.Entity)({ name: 'maintenance_external_stations_workflows' })
67
+ ], MaintenanceExternalStationsWorkFlow);
@@ -32,8 +32,7 @@ export declare class SkillsEnhancementRequest extends BaseModel {
32
32
  certification_title: string;
33
33
  skill_category: SkillCategory;
34
34
  issuing_authority: string;
35
- completion_date: Date;
36
35
  skill_summary: string | null;
37
36
  additional_info_requested: string | null;
38
- constructor(user_id: number, status?: SkillsEnhancementRequestStatus, service_id?: number | null, sub_service_id?: number | null, req_user_department_id?: number | null, req_user_section_id?: number | null, req_user_position_id?: number | null, description?: string | null, reviewer_user_id?: number | null, assigned_to_user_id?: number | null, assigned_at?: Date | null, workflow_execution_id?: string | null, certification_title?: string, skill_category?: SkillCategory, issuing_authority?: string, completion_date?: Date, skill_summary?: string | null, additional_info_requested?: string | null);
37
+ constructor(user_id: number, status?: SkillsEnhancementRequestStatus, service_id?: number | null, sub_service_id?: number | null, req_user_department_id?: number | null, req_user_section_id?: number | null, req_user_position_id?: number | null, description?: string | null, reviewer_user_id?: number | null, assigned_to_user_id?: number | null, assigned_at?: Date | null, workflow_execution_id?: string | null, certification_title?: string, skill_category?: SkillCategory, issuing_authority?: string, skill_summary?: string | null, additional_info_requested?: string | null);
39
38
  }
@@ -32,7 +32,7 @@ var SkillCategory;
32
32
  SkillCategory["OTHER"] = "Other";
33
33
  })(SkillCategory || (exports.SkillCategory = SkillCategory = {}));
34
34
  let SkillsEnhancementRequest = class SkillsEnhancementRequest extends BaseModel_1.BaseModel {
35
- constructor(user_id, status = SkillsEnhancementRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, description, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id, certification_title, skill_category, issuing_authority, completion_date, skill_summary, additional_info_requested) {
35
+ constructor(user_id, status = SkillsEnhancementRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, description, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id, certification_title, skill_category, issuing_authority, skill_summary, additional_info_requested) {
36
36
  super();
37
37
  this.user_id = user_id;
38
38
  this.status = status;
@@ -49,7 +49,6 @@ let SkillsEnhancementRequest = class SkillsEnhancementRequest extends BaseModel_
49
49
  this.certification_title = certification_title || "";
50
50
  this.skill_category = skill_category || SkillCategory.TECHNICAL;
51
51
  this.issuing_authority = issuing_authority || "";
52
- this.completion_date = completion_date || new Date();
53
52
  this.skill_summary = skill_summary || null;
54
53
  this.additional_info_requested = additional_info_requested || null;
55
54
  }
@@ -115,10 +114,6 @@ __decorate([
115
114
  (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
116
115
  __metadata("design:type", String)
117
116
  ], SkillsEnhancementRequest.prototype, "issuing_authority", void 0);
118
- __decorate([
119
- (0, typeorm_1.Column)({ type: "date", nullable: false }),
120
- __metadata("design:type", Date)
121
- ], SkillsEnhancementRequest.prototype, "completion_date", void 0);
122
117
  __decorate([
123
118
  (0, typeorm_1.Column)({ type: "text", nullable: true }),
124
119
  __metadata("design:type", Object)
@@ -129,5 +124,5 @@ __decorate([
129
124
  ], SkillsEnhancementRequest.prototype, "additional_info_requested", void 0);
130
125
  exports.SkillsEnhancementRequest = SkillsEnhancementRequest = __decorate([
131
126
  (0, typeorm_1.Entity)({ name: "skills_enhancement_requests" }),
132
- __metadata("design:paramtypes", [Number, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, String, String, String, Date, Object, Object])
127
+ __metadata("design:paramtypes", [Number, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, String, String, String, Object, Object])
133
128
  ], SkillsEnhancementRequest);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.3.206",
3
+ "version": "2.3.208",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -204,6 +204,11 @@ import { WorkingHoursExtensionChat } from './models/WorkingHoursExtensionChatMod
204
204
  import { WorkingHoursExtensionAttachment } from './models/WorkingHoursExtensionAttachmentModel';
205
205
  import { RequestATenderRequest } from './models/RequestATenderRequestModel';
206
206
  import { RequestTenderAnalysisRequest } from './models/RequestTenderAnalysisRequestModel';
207
+ import { MaintenanceExternalStationsRequests } from './models/MaintenanceExternalStationsRequestModel';
208
+ import { MaintenanceExternalStationsApprovalDetails } from './models/MaintenanceExternalStationsApprovalModel';
209
+ import { MaintenanceExternalStationsAttachment } from './models/MaintenanceExternalStationsAttachmentModel';
210
+ import { MaintenanceExternalStationsChat } from './models/MaintenanceExternalStationsChatModel';
211
+ import { MaintenanceExternalStationsWorkFlow } from './models/MaintenanceExternalStationsWorkflowModel';
207
212
 
208
213
  export const AppDataSource = new DataSource({
209
214
  type: 'postgres',
@@ -414,6 +419,11 @@ export const AppDataSource = new DataSource({
414
419
  WorkingHoursExtensionChat,
415
420
  WorkingHoursExtensionAttachment,
416
421
  RequestATenderRequest,
417
- RequestTenderAnalysisRequest
422
+ RequestTenderAnalysisRequest,
423
+ MaintenanceExternalStationsRequests,
424
+ MaintenanceExternalStationsApprovalDetails,
425
+ MaintenanceExternalStationsAttachment,
426
+ MaintenanceExternalStationsChat,
427
+ MaintenanceExternalStationsWorkFlow,
418
428
  ],
419
429
  });
package/src/index.ts CHANGED
@@ -374,6 +374,13 @@ export * from './models/HousingContractCancelApprovalModel';
374
374
  export * from './models/HousingContractCancelChatModel';
375
375
  export * from './models/HousingContractCancelAttachmentModel';
376
376
 
377
+ // Maintenance External Stations (Asset Affairs)
378
+ export * from './models/MaintenanceExternalStationsRequestModel';
379
+ export * from './models/MaintenanceExternalStationsApprovalModel';
380
+ export * from './models/MaintenanceExternalStationsAttachmentModel';
381
+ export * from './models/MaintenanceExternalStationsChatModel';
382
+ export * from './models/MaintenanceExternalStationsWorkflowModel';
383
+
377
384
  // Legal Consultation — Review of Administrative Decisions
378
385
  export * from './models/LegalConsultationRequestModel';
379
386
  export * from './models/LegalConsultationWorkflowModel';
@@ -434,4 +441,4 @@ export * from './models/RespondToEnquiriesAttachmentModel';
434
441
  export {RespondToEnquiriesRequestAttachment} from './models/RespondToEnquiriesAttachmentModel';
435
442
  export * from './models/RequestATenderRequestModel';
436
443
  export * from './models/RequestTenderAnalysisRequestModel';
437
- export * from './models/ContractServiceRequestModel';
444
+ export * from './models/ContractServiceRequestModel';
@@ -0,0 +1,56 @@
1
+ import { Column, Entity } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum MaintenanceExternalStationsApprovalStatus {
5
+ PENDING = 'Pending',
6
+ IN_PROGRESS = 'In Progress',
7
+ APPROVED = 'Approved',
8
+ REJECTED = 'Rejected',
9
+ }
10
+
11
+ @Entity({ name: 'maintenance_external_stations_approvals' })
12
+ export class MaintenanceExternalStationsApprovalDetails 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;
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: MaintenanceExternalStationsApprovalStatus,
49
+ default: MaintenanceExternalStationsApprovalStatus.PENDING,
50
+ nullable: false,
51
+ })
52
+ approval_status: MaintenanceExternalStationsApprovalStatus;
53
+
54
+ @Column({ type: 'boolean', default: true, nullable: false })
55
+ is_allowed: boolean;
56
+ }
@@ -0,0 +1,29 @@
1
+ import { Column, Entity } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'maintenance_external_stations_attachments' })
5
+ export class MaintenanceExternalStationsAttachment 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
+ }
@@ -0,0 +1,42 @@
1
+ import { Column, Entity } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum MaintenanceExternalStationsMessageType {
5
+ TEXT = 'text',
6
+ IMAGE = 'image',
7
+ VIDEO = 'video',
8
+ FILE = 'file',
9
+ LINK = 'link',
10
+ }
11
+
12
+ @Entity({ name: 'maintenance_external_stations_chats' })
13
+ export class MaintenanceExternalStationsChat 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;
28
+
29
+ @Column({ type: 'text', nullable: false })
30
+ message: string;
31
+
32
+ @Column({
33
+ type: 'enum',
34
+ enum: MaintenanceExternalStationsMessageType,
35
+ default: MaintenanceExternalStationsMessageType.TEXT,
36
+ nullable: false,
37
+ })
38
+ messageType: MaintenanceExternalStationsMessageType;
39
+
40
+ @Column({ type: 'text', nullable: true })
41
+ status: string;
42
+ }
@@ -0,0 +1,113 @@
1
+ import { Column, Entity } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ /** Location / use category for the external station context */
5
+ export enum MaintenanceExternalStationsStationCategory {
6
+ WORKSHOP = 'Workshop',
7
+ TRAINING = 'Training',
8
+ DUTY_MISSION = 'Duty Mission',
9
+ ASSIGNMENT = 'Assignment',
10
+ OTHER = 'Other',
11
+ }
12
+
13
+ export enum MaintenanceExternalStationsIssueType {
14
+ EQUIPMENT = 'Equipment',
15
+ FACILITY = 'Facility',
16
+ INFRASTRUCTURE = 'Infrastructure',
17
+ OTHER = 'Other',
18
+ }
19
+
20
+ export enum MaintenanceExternalStationsUrgencyLevel {
21
+ LOW = 'Low',
22
+ MEDIUM = 'Medium',
23
+ HIGH = 'High',
24
+ CRITICAL = 'Critical',
25
+ }
26
+
27
+ export enum MaintenanceExternalStationsRequestStatus {
28
+ PENDING = 'Pending',
29
+ ASSIGNED = 'Assigned',
30
+ IN_PROGRESS = 'In Progress',
31
+ APPROVED = 'Approved',
32
+ REJECTED = 'Rejected',
33
+ }
34
+
35
+ @Entity({ name: 'maintenance_external_stations_requests' })
36
+ export class MaintenanceExternalStationsRequests extends BaseModel {
37
+ @Column({ type: 'int', nullable: true })
38
+ req_user_department_id: number | null;
39
+
40
+ @Column({ type: 'int', nullable: true })
41
+ req_user_section_id: number | null;
42
+
43
+ @Column({ nullable: true })
44
+ service_id: number;
45
+
46
+ @Column({ nullable: true })
47
+ sub_service_id: number;
48
+
49
+ @Column({ nullable: false })
50
+ user_id: number;
51
+
52
+ @Column({ type: 'varchar', length: 500, nullable: false })
53
+ external_station_name_or_location: string;
54
+
55
+ @Column({
56
+ type: 'enum',
57
+ enum: MaintenanceExternalStationsStationCategory,
58
+ enumName: 'maintenance_external_stations_station_category_en',
59
+ nullable: false,
60
+ })
61
+ station_category: MaintenanceExternalStationsStationCategory;
62
+
63
+ @Column({ type: 'varchar', length: 500, nullable: true })
64
+ station_category_other_specify: string | null;
65
+
66
+ @Column({
67
+ type: 'enum',
68
+ enum: MaintenanceExternalStationsIssueType,
69
+ enumName: 'maintenance_external_stations_issue_type_en',
70
+ nullable: false,
71
+ })
72
+ type_of_issue: MaintenanceExternalStationsIssueType;
73
+
74
+ @Column({ type: 'varchar', length: 500, nullable: true })
75
+ type_of_issue_other_specify: string | null;
76
+
77
+ @Column({ type: 'text', nullable: false })
78
+ detailed_description: string;
79
+
80
+ @Column({
81
+ type: 'enum',
82
+ enum: MaintenanceExternalStationsUrgencyLevel,
83
+ enumName: 'maintenance_external_stations_urgency_en',
84
+ nullable: false,
85
+ })
86
+ urgency_level: MaintenanceExternalStationsUrgencyLevel;
87
+
88
+ @Column({ type: 'date', nullable: false })
89
+ date_of_issue_occurred: Date;
90
+
91
+ @Column({ type: 'varchar', length: 255, nullable: true })
92
+ contact_person_name: string | null;
93
+
94
+ @Column({ type: 'varchar', length: 100, nullable: true })
95
+ contact_person_number: string | null;
96
+
97
+ @Column({ type: 'varchar', length: 255, nullable: true })
98
+ contact_person_designation: string | null;
99
+
100
+ @Column({ type: 'date', nullable: false, default: () => 'CURRENT_DATE' })
101
+ request_submission_date: Date;
102
+
103
+ @Column({
104
+ type: 'enum',
105
+ enum: MaintenanceExternalStationsRequestStatus,
106
+ default: MaintenanceExternalStationsRequestStatus.PENDING,
107
+ nullable: false,
108
+ })
109
+ status: MaintenanceExternalStationsRequestStatus;
110
+
111
+ @Column({ type: 'varchar', nullable: true })
112
+ workflow_execution_id: string | null;
113
+ }
@@ -0,0 +1,43 @@
1
+ import { Column, Entity } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum MaintenanceExternalStationsWorkFlowStatus {
5
+ COMPLETED = 'Completed',
6
+ NOT_YET_STARTED = 'Not Yet Started',
7
+ PENDING = 'Pending',
8
+ }
9
+
10
+ @Entity({ name: 'maintenance_external_stations_workflows' })
11
+ export class MaintenanceExternalStationsWorkFlow extends BaseModel {
12
+ @Column({ type: 'integer', nullable: false })
13
+ request_id: number;
14
+
15
+ @Column({ type: 'integer', nullable: true })
16
+ service_id: number | null;
17
+
18
+ @Column({ type: 'integer', nullable: true })
19
+ sub_service_id: number | null;
20
+
21
+ @Column({ type: 'varchar', length: 500, nullable: false })
22
+ content: string;
23
+
24
+ @Column({
25
+ type: 'enum',
26
+ enum: MaintenanceExternalStationsWorkFlowStatus,
27
+ default: MaintenanceExternalStationsWorkFlowStatus.NOT_YET_STARTED,
28
+ nullable: false,
29
+ })
30
+ status: MaintenanceExternalStationsWorkFlowStatus;
31
+
32
+ @Column({ type: 'integer', nullable: true })
33
+ user_id: number | null;
34
+
35
+ @Column({ type: 'integer', nullable: true })
36
+ role_id: number | null;
37
+
38
+ @Column({ type: 'integer', nullable: true })
39
+ department_id: number | null;
40
+
41
+ @Column({ type: 'integer', nullable: true })
42
+ section_id: number | null;
43
+ }
@@ -68,9 +68,6 @@ export class SkillsEnhancementRequest extends BaseModel {
68
68
  @Column({ type: "varchar", length: 255, nullable: false })
69
69
  issuing_authority: string;
70
70
 
71
- @Column({ type: "date", nullable: false })
72
- completion_date: Date;
73
-
74
71
  @Column({ type: "text", nullable: true })
75
72
  skill_summary: string | null;
76
73
 
@@ -93,7 +90,6 @@ export class SkillsEnhancementRequest extends BaseModel {
93
90
  certification_title?: string,
94
91
  skill_category?: SkillCategory,
95
92
  issuing_authority?: string,
96
- completion_date?: Date,
97
93
  skill_summary?: string | null,
98
94
  additional_info_requested?: string | null
99
95
  ) {
@@ -113,7 +109,6 @@ export class SkillsEnhancementRequest extends BaseModel {
113
109
  this.certification_title = certification_title || "";
114
110
  this.skill_category = skill_category || SkillCategory.TECHNICAL;
115
111
  this.issuing_authority = issuing_authority || "";
116
- this.completion_date = completion_date || new Date();
117
112
  this.skill_summary = skill_summary || null;
118
113
  this.additional_info_requested = additional_info_requested || null;
119
114
  }