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