@platform-modules/civil-aviation-authority 2.3.210 → 2.3.212
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.
- package/dist/data-source.js +10 -10
- package/dist/index.d.ts +7 -5
- package/dist/index.js +7 -5
- package/dist/models/FollowUpReportApprovalModel.d.ts +24 -0
- package/dist/models/FollowUpReportApprovalModel.js +85 -0
- package/dist/models/FollowUpReportAttachmentModel.d.ts +12 -0
- package/dist/models/FollowUpReportAttachmentModel.js +53 -0
- package/dist/models/FollowUpReportChatModel.d.ts +20 -0
- package/dist/models/FollowUpReportChatModel.js +66 -0
- package/dist/models/FollowUpReportRequestModel.d.ts +46 -0
- package/dist/models/FollowUpReportRequestModel.js +126 -0
- package/dist/models/FollowUpReportWorkflowModel.d.ts +19 -0
- package/dist/models/FollowUpReportWorkflowModel.js +68 -0
- package/dist/models/ServiceSlaApprovalModel.d.ts +19 -0
- package/dist/models/ServiceSlaApprovalModel.js +69 -0
- package/dist/models/SlaConfigModel.d.ts +22 -0
- package/dist/models/SlaConfigModel.js +67 -0
- package/package.json +1 -1
- package/src/data-source.ts +10 -10
- package/src/index.ts +9 -6
- package/src/models/{MaintenanceApprovalModel.ts → FollowUpReportApprovalModel.ts} +10 -6
- package/src/models/{MaintenanceAttachmentModel.ts → FollowUpReportAttachmentModel.ts} +5 -2
- package/src/models/{MaintenanceChatModel.ts → FollowUpReportChatModel.ts} +10 -6
- package/src/models/{MaintenanceRequestModel.ts → FollowUpReportRequestModel.ts} +18 -12
- package/src/models/{MaintenanceWorkflowModel.ts → FollowUpReportWorkflowModel.ts} +10 -6
- package/src/models/ServiceSlaApprovalModel.ts +44 -0
- package/src/models/SlaConfigModel.ts +44 -0
package/dist/data-source.js
CHANGED
|
@@ -211,11 +211,11 @@ const MaintenanceExternalStationsApprovalModel_1 = require("./models/Maintenance
|
|
|
211
211
|
const MaintenanceExternalStationsAttachmentModel_1 = require("./models/MaintenanceExternalStationsAttachmentModel");
|
|
212
212
|
const MaintenanceExternalStationsChatModel_1 = require("./models/MaintenanceExternalStationsChatModel");
|
|
213
213
|
const MaintenanceExternalStationsWorkflowModel_1 = require("./models/MaintenanceExternalStationsWorkflowModel");
|
|
214
|
-
const
|
|
215
|
-
const
|
|
216
|
-
const
|
|
217
|
-
const
|
|
218
|
-
const
|
|
214
|
+
const FollowUpReportRequestModel_1 = require("./models/FollowUpReportRequestModel");
|
|
215
|
+
const FollowUpReportApprovalModel_1 = require("./models/FollowUpReportApprovalModel");
|
|
216
|
+
const FollowUpReportAttachmentModel_1 = require("./models/FollowUpReportAttachmentModel");
|
|
217
|
+
const FollowUpReportChatModel_1 = require("./models/FollowUpReportChatModel");
|
|
218
|
+
const FollowUpReportWorkflowModel_1 = require("./models/FollowUpReportWorkflowModel");
|
|
219
219
|
const MediaPublicationsRequestModel_1 = require("./models/MediaPublicationsRequestModel");
|
|
220
220
|
const MediaPublicationsApprovalModel_1 = require("./models/MediaPublicationsApprovalModel");
|
|
221
221
|
const MediaPublicationsAttachmentModel_1 = require("./models/MediaPublicationsAttachmentModel");
|
|
@@ -436,11 +436,11 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
436
436
|
MaintenanceExternalStationsAttachmentModel_1.MaintenanceExternalStationsAttachment,
|
|
437
437
|
MaintenanceExternalStationsChatModel_1.MaintenanceExternalStationsChat,
|
|
438
438
|
MaintenanceExternalStationsWorkflowModel_1.MaintenanceExternalStationsWorkFlow,
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
439
|
+
FollowUpReportRequestModel_1.FollowUpReportRequests,
|
|
440
|
+
FollowUpReportApprovalModel_1.FollowUpReportApprovalDetails,
|
|
441
|
+
FollowUpReportAttachmentModel_1.FollowUpReportAttachment,
|
|
442
|
+
FollowUpReportChatModel_1.FollowUpReportChat,
|
|
443
|
+
FollowUpReportWorkflowModel_1.FollowUpReportWorkFlow,
|
|
444
444
|
MediaPublicationsRequestModel_1.MediaPublicationsRequests,
|
|
445
445
|
MediaPublicationsApprovalModel_1.MediaPublicationsApprovalDetails,
|
|
446
446
|
MediaPublicationsAttachmentModel_1.MediaPublicationsAttachment,
|
package/dist/index.d.ts
CHANGED
|
@@ -314,11 +314,11 @@ export * from './models/MaintenanceExternalStationsApprovalModel';
|
|
|
314
314
|
export * from './models/MaintenanceExternalStationsAttachmentModel';
|
|
315
315
|
export * from './models/MaintenanceExternalStationsChatModel';
|
|
316
316
|
export * from './models/MaintenanceExternalStationsWorkflowModel';
|
|
317
|
-
export * from './models/
|
|
318
|
-
export * from './models/
|
|
319
|
-
export * from './models/
|
|
320
|
-
export * from './models/
|
|
321
|
-
export * from './models/
|
|
317
|
+
export * from './models/FollowUpReportRequestModel';
|
|
318
|
+
export * from './models/FollowUpReportApprovalModel';
|
|
319
|
+
export * from './models/FollowUpReportAttachmentModel';
|
|
320
|
+
export * from './models/FollowUpReportChatModel';
|
|
321
|
+
export * from './models/FollowUpReportWorkflowModel';
|
|
322
322
|
export * from './models/MediaPublicationsRequestModel';
|
|
323
323
|
export * from './models/MediaPublicationsApprovalModel';
|
|
324
324
|
export * from './models/MediaPublicationsAttachmentModel';
|
|
@@ -369,3 +369,5 @@ export { RespondToEnquiriesRequestAttachment } from './models/RespondToEnquiries
|
|
|
369
369
|
export * from './models/RequestATenderRequestModel';
|
|
370
370
|
export * from './models/RequestTenderAnalysisRequestModel';
|
|
371
371
|
export * from './models/ContractServiceRequestModel';
|
|
372
|
+
export * from './models/SlaConfigModel';
|
|
373
|
+
export * from './models/ServiceSlaApprovalModel';
|
package/dist/index.js
CHANGED
|
@@ -477,11 +477,11 @@ __exportStar(require("./models/MaintenanceExternalStationsApprovalModel"), expor
|
|
|
477
477
|
__exportStar(require("./models/MaintenanceExternalStationsAttachmentModel"), exports);
|
|
478
478
|
__exportStar(require("./models/MaintenanceExternalStationsChatModel"), exports);
|
|
479
479
|
__exportStar(require("./models/MaintenanceExternalStationsWorkflowModel"), exports);
|
|
480
|
-
__exportStar(require("./models/
|
|
481
|
-
__exportStar(require("./models/
|
|
482
|
-
__exportStar(require("./models/
|
|
483
|
-
__exportStar(require("./models/
|
|
484
|
-
__exportStar(require("./models/
|
|
480
|
+
__exportStar(require("./models/FollowUpReportRequestModel"), exports);
|
|
481
|
+
__exportStar(require("./models/FollowUpReportApprovalModel"), exports);
|
|
482
|
+
__exportStar(require("./models/FollowUpReportAttachmentModel"), exports);
|
|
483
|
+
__exportStar(require("./models/FollowUpReportChatModel"), exports);
|
|
484
|
+
__exportStar(require("./models/FollowUpReportWorkflowModel"), exports);
|
|
485
485
|
// Media Publications (Asset Affairs)
|
|
486
486
|
__exportStar(require("./models/MediaPublicationsRequestModel"), exports);
|
|
487
487
|
__exportStar(require("./models/MediaPublicationsApprovalModel"), exports);
|
|
@@ -548,3 +548,5 @@ Object.defineProperty(exports, "RespondToEnquiriesRequestAttachment", { enumerab
|
|
|
548
548
|
__exportStar(require("./models/RequestATenderRequestModel"), exports);
|
|
549
549
|
__exportStar(require("./models/RequestTenderAnalysisRequestModel"), exports);
|
|
550
550
|
__exportStar(require("./models/ContractServiceRequestModel"), exports);
|
|
551
|
+
__exportStar(require("./models/SlaConfigModel"), exports);
|
|
552
|
+
__exportStar(require("./models/ServiceSlaApprovalModel"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum FollowUpReportApprovalStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
IN_PROGRESS = "In Progress",
|
|
5
|
+
APPROVED = "Approved",
|
|
6
|
+
REJECTED = "Rejected"
|
|
7
|
+
}
|
|
8
|
+
export declare class FollowUpReportApprovalDetails 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: FollowUpReportApprovalStatus;
|
|
21
|
+
is_allowed: boolean;
|
|
22
|
+
}
|
|
23
|
+
export { FollowUpReportApprovalDetails as MaintenanceApprovalDetails };
|
|
24
|
+
export { FollowUpReportApprovalStatus as MaintenanceApprovalStatus };
|
|
@@ -0,0 +1,85 @@
|
|
|
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.MaintenanceApprovalStatus = exports.MaintenanceApprovalDetails = exports.FollowUpReportApprovalDetails = exports.FollowUpReportApprovalStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var FollowUpReportApprovalStatus;
|
|
16
|
+
(function (FollowUpReportApprovalStatus) {
|
|
17
|
+
FollowUpReportApprovalStatus["PENDING"] = "Pending";
|
|
18
|
+
FollowUpReportApprovalStatus["IN_PROGRESS"] = "In Progress";
|
|
19
|
+
FollowUpReportApprovalStatus["APPROVED"] = "Approved";
|
|
20
|
+
FollowUpReportApprovalStatus["REJECTED"] = "Rejected";
|
|
21
|
+
})(FollowUpReportApprovalStatus || (exports.MaintenanceApprovalStatus = exports.FollowUpReportApprovalStatus = FollowUpReportApprovalStatus = {}));
|
|
22
|
+
let FollowUpReportApprovalDetails = class FollowUpReportApprovalDetails extends BaseModel_1.BaseModel {
|
|
23
|
+
};
|
|
24
|
+
exports.FollowUpReportApprovalDetails = FollowUpReportApprovalDetails;
|
|
25
|
+
exports.MaintenanceApprovalDetails = FollowUpReportApprovalDetails;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], FollowUpReportApprovalDetails.prototype, "request_id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
32
|
+
__metadata("design:type", Object)
|
|
33
|
+
], FollowUpReportApprovalDetails.prototype, "service_id", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
36
|
+
__metadata("design:type", Object)
|
|
37
|
+
], FollowUpReportApprovalDetails.prototype, "sub_service_id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], FollowUpReportApprovalDetails.prototype, "level", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], FollowUpReportApprovalDetails.prototype, "approver_role_id", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], FollowUpReportApprovalDetails.prototype, "department_id", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], FollowUpReportApprovalDetails.prototype, "section_id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], FollowUpReportApprovalDetails.prototype, "approver_user_id", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], FollowUpReportApprovalDetails.prototype, "delegate_user_id", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], FollowUpReportApprovalDetails.prototype, "approved_by", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true, default: '' }),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], FollowUpReportApprovalDetails.prototype, "comment", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({
|
|
72
|
+
type: 'enum',
|
|
73
|
+
enum: FollowUpReportApprovalStatus,
|
|
74
|
+
default: FollowUpReportApprovalStatus.PENDING,
|
|
75
|
+
nullable: false,
|
|
76
|
+
}),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], FollowUpReportApprovalDetails.prototype, "approval_status", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true, nullable: false }),
|
|
81
|
+
__metadata("design:type", Boolean)
|
|
82
|
+
], FollowUpReportApprovalDetails.prototype, "is_allowed", void 0);
|
|
83
|
+
exports.MaintenanceApprovalDetails = exports.FollowUpReportApprovalDetails = FollowUpReportApprovalDetails = __decorate([
|
|
84
|
+
(0, typeorm_1.Entity)({ name: 'followup_report_approvals' })
|
|
85
|
+
], FollowUpReportApprovalDetails);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class FollowUpReportAttachment 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
|
+
}
|
|
12
|
+
export { FollowUpReportAttachment as MaintenanceAttachment };
|
|
@@ -0,0 +1,53 @@
|
|
|
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.MaintenanceAttachment = exports.FollowUpReportAttachment = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let FollowUpReportAttachment = class FollowUpReportAttachment extends BaseModel_1.BaseModel {
|
|
16
|
+
};
|
|
17
|
+
exports.FollowUpReportAttachment = FollowUpReportAttachment;
|
|
18
|
+
exports.MaintenanceAttachment = FollowUpReportAttachment;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], FollowUpReportAttachment.prototype, "request_id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
25
|
+
__metadata("design:type", Object)
|
|
26
|
+
], FollowUpReportAttachment.prototype, "service_id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
|
+
], FollowUpReportAttachment.prototype, "sub_service_id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], FollowUpReportAttachment.prototype, "file_url", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], FollowUpReportAttachment.prototype, "file_name", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], FollowUpReportAttachment.prototype, "file_type", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], FollowUpReportAttachment.prototype, "file_size", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], FollowUpReportAttachment.prototype, "chat_id", void 0);
|
|
51
|
+
exports.MaintenanceAttachment = exports.FollowUpReportAttachment = FollowUpReportAttachment = __decorate([
|
|
52
|
+
(0, typeorm_1.Entity)({ name: 'followup_report_attachments' })
|
|
53
|
+
], FollowUpReportAttachment);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum FollowUpReportMessageType {
|
|
3
|
+
TEXT = "text",
|
|
4
|
+
IMAGE = "image",
|
|
5
|
+
VIDEO = "video",
|
|
6
|
+
FILE = "file",
|
|
7
|
+
LINK = "link"
|
|
8
|
+
}
|
|
9
|
+
export declare class FollowUpReportChat 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: FollowUpReportMessageType;
|
|
17
|
+
status: string;
|
|
18
|
+
}
|
|
19
|
+
export { FollowUpReportChat as MaintenanceChat };
|
|
20
|
+
export { FollowUpReportMessageType as MaintenanceMessageType };
|
|
@@ -0,0 +1,66 @@
|
|
|
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.MaintenanceMessageType = exports.MaintenanceChat = exports.FollowUpReportChat = exports.FollowUpReportMessageType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var FollowUpReportMessageType;
|
|
16
|
+
(function (FollowUpReportMessageType) {
|
|
17
|
+
FollowUpReportMessageType["TEXT"] = "text";
|
|
18
|
+
FollowUpReportMessageType["IMAGE"] = "image";
|
|
19
|
+
FollowUpReportMessageType["VIDEO"] = "video";
|
|
20
|
+
FollowUpReportMessageType["FILE"] = "file";
|
|
21
|
+
FollowUpReportMessageType["LINK"] = "link";
|
|
22
|
+
})(FollowUpReportMessageType || (exports.MaintenanceMessageType = exports.FollowUpReportMessageType = FollowUpReportMessageType = {}));
|
|
23
|
+
let FollowUpReportChat = class FollowUpReportChat extends BaseModel_1.BaseModel {
|
|
24
|
+
};
|
|
25
|
+
exports.FollowUpReportChat = FollowUpReportChat;
|
|
26
|
+
exports.MaintenanceChat = FollowUpReportChat;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], FollowUpReportChat.prototype, "request_id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], FollowUpReportChat.prototype, "service_id", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], FollowUpReportChat.prototype, "sub_service_id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], FollowUpReportChat.prototype, "user_id", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], FollowUpReportChat.prototype, "role_id", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], FollowUpReportChat.prototype, "message", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({
|
|
53
|
+
type: 'enum',
|
|
54
|
+
enum: FollowUpReportMessageType,
|
|
55
|
+
default: FollowUpReportMessageType.TEXT,
|
|
56
|
+
nullable: false,
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], FollowUpReportChat.prototype, "messageType", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], FollowUpReportChat.prototype, "status", void 0);
|
|
64
|
+
exports.MaintenanceChat = exports.FollowUpReportChat = FollowUpReportChat = __decorate([
|
|
65
|
+
(0, typeorm_1.Entity)({ name: 'followup_report_chats' })
|
|
66
|
+
], FollowUpReportChat);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
/** Subject / handling priority classification */
|
|
3
|
+
export declare enum FollowUpReportSubjectClassification {
|
|
4
|
+
URGENT = "Urgent",
|
|
5
|
+
VERY_URGENT = "Very Urgent",
|
|
6
|
+
CONFIDENTIAL = "Confidential",
|
|
7
|
+
INFORMATIONAL = "Informational",
|
|
8
|
+
NORMAL = "Normal"
|
|
9
|
+
}
|
|
10
|
+
/** Concerned department under General Manager of Support Services */
|
|
11
|
+
export declare enum FollowUpReportConcernedDepartment {
|
|
12
|
+
IT = "IT",
|
|
13
|
+
HR = "HR",
|
|
14
|
+
TRAINING = "Training",
|
|
15
|
+
FINANCE = "Finance",
|
|
16
|
+
PROJECTS_AND_MAINTENANCE = "Projects & Maintenance"
|
|
17
|
+
}
|
|
18
|
+
export declare enum FollowUpReportRequestStatus {
|
|
19
|
+
PENDING = "Pending",
|
|
20
|
+
ASSIGNED = "Assigned",
|
|
21
|
+
IN_PROGRESS = "In Progress",
|
|
22
|
+
APPROVED = "Approved",
|
|
23
|
+
REJECTED = "Rejected"
|
|
24
|
+
}
|
|
25
|
+
export declare class FollowUpReportRequests extends BaseModel {
|
|
26
|
+
req_user_department_id: number | null;
|
|
27
|
+
req_user_section_id: number | null;
|
|
28
|
+
service_id: number;
|
|
29
|
+
sub_service_id: number;
|
|
30
|
+
user_id: number;
|
|
31
|
+
sent_by: string;
|
|
32
|
+
letter_date: Date;
|
|
33
|
+
subject: string;
|
|
34
|
+
subject_classification: FollowUpReportSubjectClassification;
|
|
35
|
+
topic: string;
|
|
36
|
+
concerned_department: FollowUpReportConcernedDepartment;
|
|
37
|
+
date_from: Date;
|
|
38
|
+
date_to: Date;
|
|
39
|
+
request_submission_date: Date;
|
|
40
|
+
status: FollowUpReportRequestStatus;
|
|
41
|
+
workflow_execution_id: string | null;
|
|
42
|
+
}
|
|
43
|
+
export { FollowUpReportRequests as MaintenanceRequests };
|
|
44
|
+
export { FollowUpReportRequestStatus as MaintenanceRequestStatus };
|
|
45
|
+
export { FollowUpReportSubjectClassification as MaintenanceSubjectClassification };
|
|
46
|
+
export { FollowUpReportConcernedDepartment as MaintenanceConcernedDepartment };
|
|
@@ -0,0 +1,126 @@
|
|
|
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.MaintenanceConcernedDepartment = exports.MaintenanceSubjectClassification = exports.MaintenanceRequestStatus = exports.MaintenanceRequests = exports.FollowUpReportRequests = exports.FollowUpReportRequestStatus = exports.FollowUpReportConcernedDepartment = exports.FollowUpReportSubjectClassification = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
/** Subject / handling priority classification */
|
|
16
|
+
var FollowUpReportSubjectClassification;
|
|
17
|
+
(function (FollowUpReportSubjectClassification) {
|
|
18
|
+
FollowUpReportSubjectClassification["URGENT"] = "Urgent";
|
|
19
|
+
FollowUpReportSubjectClassification["VERY_URGENT"] = "Very Urgent";
|
|
20
|
+
FollowUpReportSubjectClassification["CONFIDENTIAL"] = "Confidential";
|
|
21
|
+
FollowUpReportSubjectClassification["INFORMATIONAL"] = "Informational";
|
|
22
|
+
FollowUpReportSubjectClassification["NORMAL"] = "Normal";
|
|
23
|
+
})(FollowUpReportSubjectClassification || (exports.MaintenanceSubjectClassification = exports.FollowUpReportSubjectClassification = FollowUpReportSubjectClassification = {}));
|
|
24
|
+
/** Concerned department under General Manager of Support Services */
|
|
25
|
+
var FollowUpReportConcernedDepartment;
|
|
26
|
+
(function (FollowUpReportConcernedDepartment) {
|
|
27
|
+
FollowUpReportConcernedDepartment["IT"] = "IT";
|
|
28
|
+
FollowUpReportConcernedDepartment["HR"] = "HR";
|
|
29
|
+
FollowUpReportConcernedDepartment["TRAINING"] = "Training";
|
|
30
|
+
FollowUpReportConcernedDepartment["FINANCE"] = "Finance";
|
|
31
|
+
FollowUpReportConcernedDepartment["PROJECTS_AND_MAINTENANCE"] = "Projects & Maintenance";
|
|
32
|
+
})(FollowUpReportConcernedDepartment || (exports.MaintenanceConcernedDepartment = exports.FollowUpReportConcernedDepartment = FollowUpReportConcernedDepartment = {}));
|
|
33
|
+
var FollowUpReportRequestStatus;
|
|
34
|
+
(function (FollowUpReportRequestStatus) {
|
|
35
|
+
FollowUpReportRequestStatus["PENDING"] = "Pending";
|
|
36
|
+
FollowUpReportRequestStatus["ASSIGNED"] = "Assigned";
|
|
37
|
+
FollowUpReportRequestStatus["IN_PROGRESS"] = "In Progress";
|
|
38
|
+
FollowUpReportRequestStatus["APPROVED"] = "Approved";
|
|
39
|
+
FollowUpReportRequestStatus["REJECTED"] = "Rejected";
|
|
40
|
+
})(FollowUpReportRequestStatus || (exports.MaintenanceRequestStatus = exports.FollowUpReportRequestStatus = FollowUpReportRequestStatus = {}));
|
|
41
|
+
let FollowUpReportRequests = class FollowUpReportRequests extends BaseModel_1.BaseModel {
|
|
42
|
+
};
|
|
43
|
+
exports.FollowUpReportRequests = FollowUpReportRequests;
|
|
44
|
+
exports.MaintenanceRequests = FollowUpReportRequests;
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], FollowUpReportRequests.prototype, "req_user_department_id", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], FollowUpReportRequests.prototype, "req_user_section_id", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], FollowUpReportRequests.prototype, "service_id", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
59
|
+
__metadata("design:type", Number)
|
|
60
|
+
], FollowUpReportRequests.prototype, "sub_service_id", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
63
|
+
__metadata("design:type", Number)
|
|
64
|
+
], FollowUpReportRequests.prototype, "user_id", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], FollowUpReportRequests.prototype, "sent_by", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: false }),
|
|
71
|
+
__metadata("design:type", Date)
|
|
72
|
+
], FollowUpReportRequests.prototype, "letter_date", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], FollowUpReportRequests.prototype, "subject", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.Column)({
|
|
79
|
+
type: 'enum',
|
|
80
|
+
enum: FollowUpReportSubjectClassification,
|
|
81
|
+
enumName: 'maintenance_subject_classification_en',
|
|
82
|
+
nullable: false,
|
|
83
|
+
}),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], FollowUpReportRequests.prototype, "subject_classification", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], FollowUpReportRequests.prototype, "topic", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, typeorm_1.Column)({
|
|
92
|
+
type: 'enum',
|
|
93
|
+
enum: FollowUpReportConcernedDepartment,
|
|
94
|
+
enumName: 'maintenance_concerned_department_en',
|
|
95
|
+
nullable: false,
|
|
96
|
+
}),
|
|
97
|
+
__metadata("design:type", String)
|
|
98
|
+
], FollowUpReportRequests.prototype, "concerned_department", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: false }),
|
|
101
|
+
__metadata("design:type", Date)
|
|
102
|
+
], FollowUpReportRequests.prototype, "date_from", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: false }),
|
|
105
|
+
__metadata("design:type", Date)
|
|
106
|
+
], FollowUpReportRequests.prototype, "date_to", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: false, default: () => 'CURRENT_DATE' }),
|
|
109
|
+
__metadata("design:type", Date)
|
|
110
|
+
], FollowUpReportRequests.prototype, "request_submission_date", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, typeorm_1.Column)({
|
|
113
|
+
type: 'enum',
|
|
114
|
+
enum: FollowUpReportRequestStatus,
|
|
115
|
+
default: FollowUpReportRequestStatus.PENDING,
|
|
116
|
+
nullable: false,
|
|
117
|
+
}),
|
|
118
|
+
__metadata("design:type", String)
|
|
119
|
+
], FollowUpReportRequests.prototype, "status", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
122
|
+
__metadata("design:type", Object)
|
|
123
|
+
], FollowUpReportRequests.prototype, "workflow_execution_id", void 0);
|
|
124
|
+
exports.MaintenanceRequests = exports.FollowUpReportRequests = FollowUpReportRequests = __decorate([
|
|
125
|
+
(0, typeorm_1.Entity)({ name: 'followup_report_requests' })
|
|
126
|
+
], FollowUpReportRequests);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum FollowUpReportWorkFlowStatus {
|
|
3
|
+
COMPLETED = "Completed",
|
|
4
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
5
|
+
PENDING = "Pending"
|
|
6
|
+
}
|
|
7
|
+
export declare class FollowUpReportWorkFlow extends BaseModel {
|
|
8
|
+
request_id: number;
|
|
9
|
+
service_id: number | null;
|
|
10
|
+
sub_service_id: number | null;
|
|
11
|
+
content: string;
|
|
12
|
+
status: FollowUpReportWorkFlowStatus;
|
|
13
|
+
user_id: number | null;
|
|
14
|
+
role_id: number | null;
|
|
15
|
+
department_id: number | null;
|
|
16
|
+
section_id: number | null;
|
|
17
|
+
}
|
|
18
|
+
export { FollowUpReportWorkFlow as MaintenanceWorkFlow };
|
|
19
|
+
export { FollowUpReportWorkFlowStatus as MaintenanceWorkFlowStatus };
|
|
@@ -0,0 +1,68 @@
|
|
|
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.MaintenanceWorkFlowStatus = exports.MaintenanceWorkFlow = exports.FollowUpReportWorkFlow = exports.FollowUpReportWorkFlowStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var FollowUpReportWorkFlowStatus;
|
|
16
|
+
(function (FollowUpReportWorkFlowStatus) {
|
|
17
|
+
FollowUpReportWorkFlowStatus["COMPLETED"] = "Completed";
|
|
18
|
+
FollowUpReportWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
19
|
+
FollowUpReportWorkFlowStatus["PENDING"] = "Pending";
|
|
20
|
+
})(FollowUpReportWorkFlowStatus || (exports.MaintenanceWorkFlowStatus = exports.FollowUpReportWorkFlowStatus = FollowUpReportWorkFlowStatus = {}));
|
|
21
|
+
let FollowUpReportWorkFlow = class FollowUpReportWorkFlow extends BaseModel_1.BaseModel {
|
|
22
|
+
};
|
|
23
|
+
exports.FollowUpReportWorkFlow = FollowUpReportWorkFlow;
|
|
24
|
+
exports.MaintenanceWorkFlow = FollowUpReportWorkFlow;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], FollowUpReportWorkFlow.prototype, "request_id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], FollowUpReportWorkFlow.prototype, "service_id", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], FollowUpReportWorkFlow.prototype, "sub_service_id", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], FollowUpReportWorkFlow.prototype, "content", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({
|
|
43
|
+
type: 'enum',
|
|
44
|
+
enum: FollowUpReportWorkFlowStatus,
|
|
45
|
+
default: FollowUpReportWorkFlowStatus.NOT_YET_STARTED,
|
|
46
|
+
nullable: false,
|
|
47
|
+
}),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], FollowUpReportWorkFlow.prototype, "status", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], FollowUpReportWorkFlow.prototype, "user_id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], FollowUpReportWorkFlow.prototype, "role_id", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], FollowUpReportWorkFlow.prototype, "department_id", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], FollowUpReportWorkFlow.prototype, "section_id", void 0);
|
|
66
|
+
exports.MaintenanceWorkFlow = exports.FollowUpReportWorkFlow = FollowUpReportWorkFlow = __decorate([
|
|
67
|
+
(0, typeorm_1.Entity)({ name: 'followup_report_workflows' })
|
|
68
|
+
], FollowUpReportWorkFlow);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
/**
|
|
3
|
+
* Cross-service SLA tracking row for any microservice (HR, IT, Tender, …).
|
|
4
|
+
* Segregated by service_id, sub_service_id, request_id.
|
|
5
|
+
* source_approval_id = native approval row PK in the owning service (e.g. hr_service_approvals.id, vpn_approvals.id); not a DB FK.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ServiceSlaApproval extends BaseModel {
|
|
8
|
+
request_id: number;
|
|
9
|
+
source_approval_id: number;
|
|
10
|
+
service_id: number | null;
|
|
11
|
+
sub_service_id: number | null;
|
|
12
|
+
approval_status: string;
|
|
13
|
+
level: number;
|
|
14
|
+
approver_user_id: number | null;
|
|
15
|
+
approver_role_id: number | null;
|
|
16
|
+
department_id: number | null;
|
|
17
|
+
section_id: number | null;
|
|
18
|
+
constructor();
|
|
19
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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.ServiceSlaApproval = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
/**
|
|
16
|
+
* Cross-service SLA tracking row for any microservice (HR, IT, Tender, …).
|
|
17
|
+
* Segregated by service_id, sub_service_id, request_id.
|
|
18
|
+
* source_approval_id = native approval row PK in the owning service (e.g. hr_service_approvals.id, vpn_approvals.id); not a DB FK.
|
|
19
|
+
*/
|
|
20
|
+
let ServiceSlaApproval = class ServiceSlaApproval extends BaseModel_1.BaseModel {
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.ServiceSlaApproval = ServiceSlaApproval;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: "int" }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], ServiceSlaApproval.prototype, "request_id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: "int" }),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], ServiceSlaApproval.prototype, "source_approval_id", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
36
|
+
__metadata("design:type", Object)
|
|
37
|
+
], ServiceSlaApproval.prototype, "service_id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], ServiceSlaApproval.prototype, "sub_service_id", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 64 }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], ServiceSlaApproval.prototype, "approval_status", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: "int" }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], ServiceSlaApproval.prototype, "level", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], ServiceSlaApproval.prototype, "approver_user_id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], ServiceSlaApproval.prototype, "approver_role_id", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], ServiceSlaApproval.prototype, "department_id", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], ServiceSlaApproval.prototype, "section_id", void 0);
|
|
66
|
+
exports.ServiceSlaApproval = ServiceSlaApproval = __decorate([
|
|
67
|
+
(0, typeorm_1.Entity)({ name: "sla_approval" }),
|
|
68
|
+
__metadata("design:paramtypes", [])
|
|
69
|
+
], ServiceSlaApproval);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
/** How SLA reminders are delivered (any microservice). */
|
|
3
|
+
export declare enum SlaDeliveryType {
|
|
4
|
+
EMAIL = "EMAIL",
|
|
5
|
+
NOTIFICATION = "NOTIFICATION",
|
|
6
|
+
BOTH = "BOTH"
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Cross-service SLA rule: match tracking rows by service_id / sub_service_id, status[], days, optional level.
|
|
10
|
+
* Admin CRUD from User Service; central SLA cron reads this table.
|
|
11
|
+
*/
|
|
12
|
+
export declare class SlaConfig extends BaseModel {
|
|
13
|
+
service_id: number | null;
|
|
14
|
+
sub_service_id: number | null;
|
|
15
|
+
status: string[];
|
|
16
|
+
type: SlaDeliveryType;
|
|
17
|
+
days: number;
|
|
18
|
+
content: string;
|
|
19
|
+
level: number | null;
|
|
20
|
+
is_active: boolean;
|
|
21
|
+
constructor();
|
|
22
|
+
}
|
|
@@ -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.SlaConfig = exports.SlaDeliveryType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
/** How SLA reminders are delivered (any microservice). */
|
|
16
|
+
var SlaDeliveryType;
|
|
17
|
+
(function (SlaDeliveryType) {
|
|
18
|
+
SlaDeliveryType["EMAIL"] = "EMAIL";
|
|
19
|
+
SlaDeliveryType["NOTIFICATION"] = "NOTIFICATION";
|
|
20
|
+
SlaDeliveryType["BOTH"] = "BOTH";
|
|
21
|
+
})(SlaDeliveryType || (exports.SlaDeliveryType = SlaDeliveryType = {}));
|
|
22
|
+
/**
|
|
23
|
+
* Cross-service SLA rule: match tracking rows by service_id / sub_service_id, status[], days, optional level.
|
|
24
|
+
* Admin CRUD from User Service; central SLA cron reads this table.
|
|
25
|
+
*/
|
|
26
|
+
let SlaConfig = class SlaConfig extends BaseModel_1.BaseModel {
|
|
27
|
+
constructor() {
|
|
28
|
+
super();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.SlaConfig = SlaConfig;
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], SlaConfig.prototype, "service_id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], SlaConfig.prototype, "sub_service_id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: "jsonb", default: () => "'[]'::jsonb" }),
|
|
42
|
+
__metadata("design:type", Array)
|
|
43
|
+
], SlaConfig.prototype, "status", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 20, default: SlaDeliveryType.NOTIFICATION }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], SlaConfig.prototype, "type", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: "int", name: "days" }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], SlaConfig.prototype, "days", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: "text" }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], SlaConfig.prototype, "content", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], SlaConfig.prototype, "level", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
62
|
+
__metadata("design:type", Boolean)
|
|
63
|
+
], SlaConfig.prototype, "is_active", void 0);
|
|
64
|
+
exports.SlaConfig = SlaConfig = __decorate([
|
|
65
|
+
(0, typeorm_1.Entity)({ name: "sla_config" }),
|
|
66
|
+
__metadata("design:paramtypes", [])
|
|
67
|
+
], SlaConfig);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -209,11 +209,11 @@ import { MaintenanceExternalStationsApprovalDetails } from './models/Maintenance
|
|
|
209
209
|
import { MaintenanceExternalStationsAttachment } from './models/MaintenanceExternalStationsAttachmentModel';
|
|
210
210
|
import { MaintenanceExternalStationsChat } from './models/MaintenanceExternalStationsChatModel';
|
|
211
211
|
import { MaintenanceExternalStationsWorkFlow } from './models/MaintenanceExternalStationsWorkflowModel';
|
|
212
|
-
import {
|
|
213
|
-
import {
|
|
214
|
-
import {
|
|
215
|
-
import {
|
|
216
|
-
import {
|
|
212
|
+
import { FollowUpReportRequests } from './models/FollowUpReportRequestModel';
|
|
213
|
+
import { FollowUpReportApprovalDetails } from './models/FollowUpReportApprovalModel';
|
|
214
|
+
import { FollowUpReportAttachment } from './models/FollowUpReportAttachmentModel';
|
|
215
|
+
import { FollowUpReportChat } from './models/FollowUpReportChatModel';
|
|
216
|
+
import { FollowUpReportWorkFlow } from './models/FollowUpReportWorkflowModel';
|
|
217
217
|
import { MediaPublicationsRequests } from './models/MediaPublicationsRequestModel';
|
|
218
218
|
import { MediaPublicationsApprovalDetails } from './models/MediaPublicationsApprovalModel';
|
|
219
219
|
import { MediaPublicationsAttachment } from './models/MediaPublicationsAttachmentModel';
|
|
@@ -435,11 +435,11 @@ export const AppDataSource = new DataSource({
|
|
|
435
435
|
MaintenanceExternalStationsAttachment,
|
|
436
436
|
MaintenanceExternalStationsChat,
|
|
437
437
|
MaintenanceExternalStationsWorkFlow,
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
438
|
+
FollowUpReportRequests,
|
|
439
|
+
FollowUpReportApprovalDetails,
|
|
440
|
+
FollowUpReportAttachment,
|
|
441
|
+
FollowUpReportChat,
|
|
442
|
+
FollowUpReportWorkFlow,
|
|
443
443
|
MediaPublicationsRequests,
|
|
444
444
|
MediaPublicationsApprovalDetails,
|
|
445
445
|
MediaPublicationsAttachment,
|
package/src/index.ts
CHANGED
|
@@ -380,11 +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/
|
|
384
|
-
export * from './models/
|
|
385
|
-
export * from './models/
|
|
386
|
-
export * from './models/
|
|
387
|
-
export * from './models/
|
|
383
|
+
export * from './models/FollowUpReportRequestModel';
|
|
384
|
+
export * from './models/FollowUpReportApprovalModel';
|
|
385
|
+
export * from './models/FollowUpReportAttachmentModel';
|
|
386
|
+
export * from './models/FollowUpReportChatModel';
|
|
387
|
+
export * from './models/FollowUpReportWorkflowModel';
|
|
388
388
|
|
|
389
389
|
// Media Publications (Asset Affairs)
|
|
390
390
|
export * from './models/MediaPublicationsRequestModel';
|
|
@@ -453,4 +453,7 @@ export * from './models/RespondToEnquiriesAttachmentModel';
|
|
|
453
453
|
export {RespondToEnquiriesRequestAttachment} from './models/RespondToEnquiriesAttachmentModel';
|
|
454
454
|
export * from './models/RequestATenderRequestModel';
|
|
455
455
|
export * from './models/RequestTenderAnalysisRequestModel';
|
|
456
|
-
export * from './models/ContractServiceRequestModel';
|
|
456
|
+
export * from './models/ContractServiceRequestModel';
|
|
457
|
+
|
|
458
|
+
export * from './models/SlaConfigModel';
|
|
459
|
+
export * from './models/ServiceSlaApprovalModel';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Column, Entity } from 'typeorm';
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
-
export enum
|
|
4
|
+
export enum FollowUpReportApprovalStatus {
|
|
5
5
|
PENDING = 'Pending',
|
|
6
6
|
IN_PROGRESS = 'In Progress',
|
|
7
7
|
APPROVED = 'Approved',
|
|
8
8
|
REJECTED = 'Rejected',
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
@Entity({ name: '
|
|
12
|
-
export class
|
|
11
|
+
@Entity({ name: 'followup_report_approvals' })
|
|
12
|
+
export class FollowUpReportApprovalDetails extends BaseModel {
|
|
13
13
|
@Column({ type: 'integer', nullable: false })
|
|
14
14
|
request_id: number;
|
|
15
15
|
|
|
@@ -45,12 +45,16 @@ export class MaintenanceApprovalDetails extends BaseModel {
|
|
|
45
45
|
|
|
46
46
|
@Column({
|
|
47
47
|
type: 'enum',
|
|
48
|
-
enum:
|
|
49
|
-
default:
|
|
48
|
+
enum: FollowUpReportApprovalStatus,
|
|
49
|
+
default: FollowUpReportApprovalStatus.PENDING,
|
|
50
50
|
nullable: false,
|
|
51
51
|
})
|
|
52
|
-
approval_status:
|
|
52
|
+
approval_status: FollowUpReportApprovalStatus;
|
|
53
53
|
|
|
54
54
|
@Column({ type: 'boolean', default: true, nullable: false })
|
|
55
55
|
is_allowed: boolean;
|
|
56
56
|
}
|
|
57
|
+
|
|
58
|
+
// Backward-compatible aliases (entity/table remains maintenance_*)
|
|
59
|
+
export { FollowUpReportApprovalDetails as MaintenanceApprovalDetails };
|
|
60
|
+
export { FollowUpReportApprovalStatus as MaintenanceApprovalStatus };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Column, Entity } from 'typeorm';
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
-
@Entity({ name: '
|
|
5
|
-
export class
|
|
4
|
+
@Entity({ name: 'followup_report_attachments' })
|
|
5
|
+
export class FollowUpReportAttachment extends BaseModel {
|
|
6
6
|
@Column({ type: 'integer', nullable: false })
|
|
7
7
|
request_id: number;
|
|
8
8
|
|
|
@@ -27,3 +27,6 @@ export class MaintenanceAttachment extends BaseModel {
|
|
|
27
27
|
@Column({ type: 'integer', nullable: true })
|
|
28
28
|
chat_id: number | null;
|
|
29
29
|
}
|
|
30
|
+
|
|
31
|
+
// Backward-compatible aliases (entity/table remains maintenance_*)
|
|
32
|
+
export { FollowUpReportAttachment as MaintenanceAttachment };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Column, Entity } from 'typeorm';
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
-
export enum
|
|
4
|
+
export enum FollowUpReportMessageType {
|
|
5
5
|
TEXT = 'text',
|
|
6
6
|
IMAGE = 'image',
|
|
7
7
|
VIDEO = 'video',
|
|
@@ -9,8 +9,8 @@ export enum MaintenanceMessageType {
|
|
|
9
9
|
LINK = 'link',
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
@Entity({ name: '
|
|
13
|
-
export class
|
|
12
|
+
@Entity({ name: 'followup_report_chats' })
|
|
13
|
+
export class FollowUpReportChat extends BaseModel {
|
|
14
14
|
@Column({ type: 'integer', nullable: false })
|
|
15
15
|
request_id: number;
|
|
16
16
|
|
|
@@ -31,12 +31,16 @@ export class MaintenanceChat extends BaseModel {
|
|
|
31
31
|
|
|
32
32
|
@Column({
|
|
33
33
|
type: 'enum',
|
|
34
|
-
enum:
|
|
35
|
-
default:
|
|
34
|
+
enum: FollowUpReportMessageType,
|
|
35
|
+
default: FollowUpReportMessageType.TEXT,
|
|
36
36
|
nullable: false,
|
|
37
37
|
})
|
|
38
|
-
messageType:
|
|
38
|
+
messageType: FollowUpReportMessageType;
|
|
39
39
|
|
|
40
40
|
@Column({ type: 'text', nullable: true })
|
|
41
41
|
status: string;
|
|
42
42
|
}
|
|
43
|
+
|
|
44
|
+
// Backward-compatible aliases (entity/table remains maintenance_*)
|
|
45
|
+
export { FollowUpReportChat as MaintenanceChat };
|
|
46
|
+
export { FollowUpReportMessageType as MaintenanceMessageType };
|
|
@@ -2,7 +2,7 @@ import { Column, Entity } from 'typeorm';
|
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
4
|
/** Subject / handling priority classification */
|
|
5
|
-
export enum
|
|
5
|
+
export enum FollowUpReportSubjectClassification {
|
|
6
6
|
URGENT = 'Urgent',
|
|
7
7
|
VERY_URGENT = 'Very Urgent',
|
|
8
8
|
CONFIDENTIAL = 'Confidential',
|
|
@@ -11,7 +11,7 @@ export enum MaintenanceSubjectClassification {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/** Concerned department under General Manager of Support Services */
|
|
14
|
-
export enum
|
|
14
|
+
export enum FollowUpReportConcernedDepartment {
|
|
15
15
|
IT = 'IT',
|
|
16
16
|
HR = 'HR',
|
|
17
17
|
TRAINING = 'Training',
|
|
@@ -19,7 +19,7 @@ export enum MaintenanceConcernedDepartment {
|
|
|
19
19
|
PROJECTS_AND_MAINTENANCE = 'Projects & Maintenance',
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export enum
|
|
22
|
+
export enum FollowUpReportRequestStatus {
|
|
23
23
|
PENDING = 'Pending',
|
|
24
24
|
ASSIGNED = 'Assigned',
|
|
25
25
|
IN_PROGRESS = 'In Progress',
|
|
@@ -27,8 +27,8 @@ export enum MaintenanceRequestStatus {
|
|
|
27
27
|
REJECTED = 'Rejected',
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
@Entity({ name: '
|
|
31
|
-
export class
|
|
30
|
+
@Entity({ name: 'followup_report_requests' })
|
|
31
|
+
export class FollowUpReportRequests extends BaseModel {
|
|
32
32
|
@Column({ type: 'int', nullable: true })
|
|
33
33
|
req_user_department_id: number | null;
|
|
34
34
|
|
|
@@ -55,22 +55,22 @@ export class MaintenanceRequests extends BaseModel {
|
|
|
55
55
|
|
|
56
56
|
@Column({
|
|
57
57
|
type: 'enum',
|
|
58
|
-
enum:
|
|
58
|
+
enum: FollowUpReportSubjectClassification,
|
|
59
59
|
enumName: 'maintenance_subject_classification_en',
|
|
60
60
|
nullable: false,
|
|
61
61
|
})
|
|
62
|
-
subject_classification:
|
|
62
|
+
subject_classification: FollowUpReportSubjectClassification;
|
|
63
63
|
|
|
64
64
|
@Column({ type: 'text', nullable: false })
|
|
65
65
|
topic: string;
|
|
66
66
|
|
|
67
67
|
@Column({
|
|
68
68
|
type: 'enum',
|
|
69
|
-
enum:
|
|
69
|
+
enum: FollowUpReportConcernedDepartment,
|
|
70
70
|
enumName: 'maintenance_concerned_department_en',
|
|
71
71
|
nullable: false,
|
|
72
72
|
})
|
|
73
|
-
concerned_department:
|
|
73
|
+
concerned_department: FollowUpReportConcernedDepartment;
|
|
74
74
|
|
|
75
75
|
@Column({ type: 'date', nullable: false })
|
|
76
76
|
date_from: Date;
|
|
@@ -83,12 +83,18 @@ export class MaintenanceRequests extends BaseModel {
|
|
|
83
83
|
|
|
84
84
|
@Column({
|
|
85
85
|
type: 'enum',
|
|
86
|
-
enum:
|
|
87
|
-
default:
|
|
86
|
+
enum: FollowUpReportRequestStatus,
|
|
87
|
+
default: FollowUpReportRequestStatus.PENDING,
|
|
88
88
|
nullable: false,
|
|
89
89
|
})
|
|
90
|
-
status:
|
|
90
|
+
status: FollowUpReportRequestStatus;
|
|
91
91
|
|
|
92
92
|
@Column({ type: 'varchar', nullable: true })
|
|
93
93
|
workflow_execution_id: string | null;
|
|
94
94
|
}
|
|
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 };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Column, Entity } from 'typeorm';
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
-
export enum
|
|
4
|
+
export enum FollowUpReportWorkFlowStatus {
|
|
5
5
|
COMPLETED = 'Completed',
|
|
6
6
|
NOT_YET_STARTED = 'Not Yet Started',
|
|
7
7
|
PENDING = 'Pending',
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
@Entity({ name: '
|
|
11
|
-
export class
|
|
10
|
+
@Entity({ name: 'followup_report_workflows' })
|
|
11
|
+
export class FollowUpReportWorkFlow extends BaseModel {
|
|
12
12
|
@Column({ type: 'integer', nullable: false })
|
|
13
13
|
request_id: number;
|
|
14
14
|
|
|
@@ -23,11 +23,11 @@ export class MaintenanceWorkFlow extends BaseModel {
|
|
|
23
23
|
|
|
24
24
|
@Column({
|
|
25
25
|
type: 'enum',
|
|
26
|
-
enum:
|
|
27
|
-
default:
|
|
26
|
+
enum: FollowUpReportWorkFlowStatus,
|
|
27
|
+
default: FollowUpReportWorkFlowStatus.NOT_YET_STARTED,
|
|
28
28
|
nullable: false,
|
|
29
29
|
})
|
|
30
|
-
status:
|
|
30
|
+
status: FollowUpReportWorkFlowStatus;
|
|
31
31
|
|
|
32
32
|
@Column({ type: 'integer', nullable: true })
|
|
33
33
|
user_id: number | null;
|
|
@@ -41,3 +41,7 @@ export class MaintenanceWorkFlow extends BaseModel {
|
|
|
41
41
|
@Column({ type: 'integer', nullable: true })
|
|
42
42
|
section_id: number | null;
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
// Backward-compatible aliases (entity/table remains maintenance_*)
|
|
46
|
+
export { FollowUpReportWorkFlow as MaintenanceWorkFlow };
|
|
47
|
+
export { FollowUpReportWorkFlowStatus as MaintenanceWorkFlowStatus };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Cross-service SLA tracking row for any microservice (HR, IT, Tender, …).
|
|
6
|
+
* Segregated by service_id, sub_service_id, request_id.
|
|
7
|
+
* source_approval_id = native approval row PK in the owning service (e.g. hr_service_approvals.id, vpn_approvals.id); not a DB FK.
|
|
8
|
+
*/
|
|
9
|
+
@Entity({ name: "sla_approval" })
|
|
10
|
+
export class ServiceSlaApproval extends BaseModel {
|
|
11
|
+
@Column({ type: "int" })
|
|
12
|
+
request_id: number;
|
|
13
|
+
|
|
14
|
+
@Column({ type: "int" })
|
|
15
|
+
source_approval_id: number;
|
|
16
|
+
|
|
17
|
+
@Column({ type: "int", nullable: true })
|
|
18
|
+
service_id: number | null;
|
|
19
|
+
|
|
20
|
+
@Column({ type: "int", nullable: true })
|
|
21
|
+
sub_service_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: "varchar", length: 64 })
|
|
24
|
+
approval_status: string;
|
|
25
|
+
|
|
26
|
+
@Column({ type: "int" })
|
|
27
|
+
level: number;
|
|
28
|
+
|
|
29
|
+
@Column({ type: "int", nullable: true })
|
|
30
|
+
approver_user_id: number | null;
|
|
31
|
+
|
|
32
|
+
@Column({ type: "int", nullable: true })
|
|
33
|
+
approver_role_id: number | null;
|
|
34
|
+
|
|
35
|
+
@Column({ type: "int", nullable: true })
|
|
36
|
+
department_id: number | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: "int", nullable: true })
|
|
39
|
+
section_id: number | null;
|
|
40
|
+
|
|
41
|
+
constructor() {
|
|
42
|
+
super();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
/** How SLA reminders are delivered (any microservice). */
|
|
5
|
+
export enum SlaDeliveryType {
|
|
6
|
+
EMAIL = "EMAIL",
|
|
7
|
+
NOTIFICATION = "NOTIFICATION",
|
|
8
|
+
BOTH = "BOTH"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Cross-service SLA rule: match tracking rows by service_id / sub_service_id, status[], days, optional level.
|
|
13
|
+
* Admin CRUD from User Service; central SLA cron reads this table.
|
|
14
|
+
*/
|
|
15
|
+
@Entity({ name: "sla_config" })
|
|
16
|
+
export class SlaConfig extends BaseModel {
|
|
17
|
+
@Column({ type: "int", nullable: true })
|
|
18
|
+
service_id: number | null;
|
|
19
|
+
|
|
20
|
+
@Column({ type: "int", nullable: true })
|
|
21
|
+
sub_service_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: "jsonb", default: () => "'[]'::jsonb" })
|
|
24
|
+
status: string[];
|
|
25
|
+
|
|
26
|
+
@Column({ type: "varchar", length: 20, default: SlaDeliveryType.NOTIFICATION })
|
|
27
|
+
type: SlaDeliveryType;
|
|
28
|
+
|
|
29
|
+
@Column({ type: "int", name: "days" })
|
|
30
|
+
days: number;
|
|
31
|
+
|
|
32
|
+
@Column({ type: "text" })
|
|
33
|
+
content: string;
|
|
34
|
+
|
|
35
|
+
@Column({ type: "int", nullable: true })
|
|
36
|
+
level: number | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: "boolean", default: true })
|
|
39
|
+
is_active: boolean;
|
|
40
|
+
|
|
41
|
+
constructor() {
|
|
42
|
+
super();
|
|
43
|
+
}
|
|
44
|
+
}
|