@platform-modules/civil-aviation-authority 2.3.5 → 2.3.7
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/.env +14 -9
- package/dist/data-source.js +15 -1
- package/dist/index.d.ts +15 -2
- package/dist/index.js +16 -5
- package/dist/models/DutyMissionAirTicketDetailsModel.d.ts +20 -0
- package/dist/models/DutyMissionAirTicketDetailsModel.js +100 -0
- package/dist/models/DutyMissionApprovalModel.d.ts +23 -0
- package/dist/models/DutyMissionApprovalModel.js +96 -0
- package/dist/models/DutyMissionAttachmentModel.d.ts +12 -0
- package/dist/models/DutyMissionAttachmentModel.js +64 -0
- package/dist/models/DutyMissionChatModel.d.ts +19 -0
- package/dist/models/DutyMissionChatModel.js +77 -0
- package/dist/models/DutyMissionEmployeeDetailsModel.d.ts +17 -0
- package/dist/models/DutyMissionEmployeeDetailsModel.js +85 -0
- package/dist/models/DutyMissionRequestModel.d.ts +64 -0
- package/dist/models/DutyMissionRequestModel.js +237 -0
- package/dist/models/DutyMissionWorkflowModel.d.ts +18 -0
- package/dist/models/DutyMissionWorkflowModel.js +76 -0
- package/dist/models/Workflows.d.ts +0 -9
- package/package.json +1 -1
- package/src/data-source.ts +195 -181
- package/src/index.ts +111 -98
- package/src/models/DutyMissionAirTicketDetailsModel.ts +87 -0
- package/src/models/DutyMissionApprovalModel.ts +83 -0
- package/src/models/DutyMissionAttachmentModel.ts +51 -0
- package/src/models/DutyMissionChatModel.ts +65 -0
- package/src/models/DutyMissionEmployeeDetailsModel.ts +72 -0
- package/src/models/DutyMissionRequestModel.ts +224 -0
- package/src/models/DutyMissionWorkflowModel.ts +62 -0
- package/src/models/HrServiceRequestModel.ts +167 -167
- package/dist/models/TemporaryAssignmentRequestModel.d.ts +0 -49
- package/dist/models/TemporaryAssignmentRequestModel.js +0 -204
- package/src/models/TemporaryAssignmentRequestModel.ts +0 -194
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum TripType {
|
|
3
|
+
ANNUAL = "Annual",
|
|
4
|
+
PLANNED = "Planned",
|
|
5
|
+
UNPLANNED = "Unplanned"
|
|
6
|
+
}
|
|
7
|
+
export declare enum ChooseType {
|
|
8
|
+
INSIDE = "Inside",
|
|
9
|
+
OUTSIDE = "Outside"
|
|
10
|
+
}
|
|
11
|
+
export declare enum MissionSponsoredBy {
|
|
12
|
+
CAA = "CAA",
|
|
13
|
+
LISTED = "Listed Companies",
|
|
14
|
+
NON_LISTED = "Non-listed Companies"
|
|
15
|
+
}
|
|
16
|
+
export declare enum AirTicketRequired {
|
|
17
|
+
YES = "Yes",
|
|
18
|
+
NO = "No",
|
|
19
|
+
CASH_COMPONENT = "Cash Component"
|
|
20
|
+
}
|
|
21
|
+
export declare enum VehicleRequired {
|
|
22
|
+
YES = "Yes",
|
|
23
|
+
NO = "No"
|
|
24
|
+
}
|
|
25
|
+
export declare enum DutyMissionStatus {
|
|
26
|
+
PENDING = "Pending",
|
|
27
|
+
ASSIGNED = "Assigned",
|
|
28
|
+
IN_PROGRESS = "In Progress",
|
|
29
|
+
APPROVED = "Approved",
|
|
30
|
+
REJECTED = "Rejected"
|
|
31
|
+
}
|
|
32
|
+
export declare class DutyMissionRequests extends BaseModel {
|
|
33
|
+
req_user_department_id: number | null;
|
|
34
|
+
req_user_section_id: number | null;
|
|
35
|
+
service_id: number;
|
|
36
|
+
sub_service_id: number;
|
|
37
|
+
user_id: number;
|
|
38
|
+
status: DutyMissionStatus;
|
|
39
|
+
workflow_execution_id: string | null;
|
|
40
|
+
request_id: string | null;
|
|
41
|
+
trip_type: TripType;
|
|
42
|
+
mission_id: string | null;
|
|
43
|
+
choose_type: ChooseType;
|
|
44
|
+
mission_sponsored_by: MissionSponsoredBy;
|
|
45
|
+
if_sponsored: string | null;
|
|
46
|
+
mission_purpose: string;
|
|
47
|
+
mission_number: string;
|
|
48
|
+
mission_start_date: Date;
|
|
49
|
+
mission_end_date: Date;
|
|
50
|
+
mission_days: number | null;
|
|
51
|
+
travelling_area_from: string;
|
|
52
|
+
travelling_area_to: string;
|
|
53
|
+
distance: string | null;
|
|
54
|
+
from_country: string;
|
|
55
|
+
to_country: string;
|
|
56
|
+
travel_place: string;
|
|
57
|
+
travel_start_date: Date;
|
|
58
|
+
travel_return_date: Date;
|
|
59
|
+
allowance_percentage: string | null;
|
|
60
|
+
air_ticket_required: AirTicketRequired | null;
|
|
61
|
+
vehicle_required: VehicleRequired | null;
|
|
62
|
+
remarks: string | null;
|
|
63
|
+
constructor(req_user_department_id: number | null, req_user_section_id: number | null, service_id: number, sub_service_id: number, user_id: number, trip_type: TripType, choose_type: ChooseType, mission_sponsored_by: MissionSponsoredBy, mission_purpose: string, mission_number: string, mission_start_date: Date, mission_end_date: Date, travelling_area_from: string, travelling_area_to: string, from_country: string, to_country: string, travel_place: string, travel_start_date: Date, travel_return_date: Date, status: DutyMissionStatus, request_id?: string | null, mission_id?: string | null, mission_days?: number | null, distance?: string | null, if_sponsored?: string | null, allowance_percentage?: string | null, air_ticket_required?: AirTicketRequired | null, vehicle_required?: VehicleRequired | null, remarks?: string | null, workflow_execution_id?: string | null);
|
|
64
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
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.DutyMissionRequests = exports.DutyMissionStatus = exports.VehicleRequired = exports.AirTicketRequired = exports.MissionSponsoredBy = exports.ChooseType = exports.TripType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var TripType;
|
|
16
|
+
(function (TripType) {
|
|
17
|
+
TripType["ANNUAL"] = "Annual";
|
|
18
|
+
TripType["PLANNED"] = "Planned";
|
|
19
|
+
TripType["UNPLANNED"] = "Unplanned";
|
|
20
|
+
})(TripType || (exports.TripType = TripType = {}));
|
|
21
|
+
var ChooseType;
|
|
22
|
+
(function (ChooseType) {
|
|
23
|
+
ChooseType["INSIDE"] = "Inside";
|
|
24
|
+
ChooseType["OUTSIDE"] = "Outside";
|
|
25
|
+
})(ChooseType || (exports.ChooseType = ChooseType = {}));
|
|
26
|
+
var MissionSponsoredBy;
|
|
27
|
+
(function (MissionSponsoredBy) {
|
|
28
|
+
MissionSponsoredBy["CAA"] = "CAA";
|
|
29
|
+
MissionSponsoredBy["LISTED"] = "Listed Companies";
|
|
30
|
+
MissionSponsoredBy["NON_LISTED"] = "Non-listed Companies";
|
|
31
|
+
})(MissionSponsoredBy || (exports.MissionSponsoredBy = MissionSponsoredBy = {}));
|
|
32
|
+
var AirTicketRequired;
|
|
33
|
+
(function (AirTicketRequired) {
|
|
34
|
+
AirTicketRequired["YES"] = "Yes";
|
|
35
|
+
AirTicketRequired["NO"] = "No";
|
|
36
|
+
AirTicketRequired["CASH_COMPONENT"] = "Cash Component";
|
|
37
|
+
})(AirTicketRequired || (exports.AirTicketRequired = AirTicketRequired = {}));
|
|
38
|
+
var VehicleRequired;
|
|
39
|
+
(function (VehicleRequired) {
|
|
40
|
+
VehicleRequired["YES"] = "Yes";
|
|
41
|
+
VehicleRequired["NO"] = "No";
|
|
42
|
+
})(VehicleRequired || (exports.VehicleRequired = VehicleRequired = {}));
|
|
43
|
+
var DutyMissionStatus;
|
|
44
|
+
(function (DutyMissionStatus) {
|
|
45
|
+
DutyMissionStatus["PENDING"] = "Pending";
|
|
46
|
+
DutyMissionStatus["ASSIGNED"] = "Assigned";
|
|
47
|
+
DutyMissionStatus["IN_PROGRESS"] = "In Progress";
|
|
48
|
+
DutyMissionStatus["APPROVED"] = "Approved";
|
|
49
|
+
DutyMissionStatus["REJECTED"] = "Rejected";
|
|
50
|
+
})(DutyMissionStatus || (exports.DutyMissionStatus = DutyMissionStatus = {}));
|
|
51
|
+
let DutyMissionRequests = class DutyMissionRequests extends BaseModel_1.BaseModel {
|
|
52
|
+
constructor(req_user_department_id, req_user_section_id, service_id, sub_service_id, user_id, trip_type, choose_type, mission_sponsored_by, mission_purpose, mission_number, mission_start_date, mission_end_date, travelling_area_from, travelling_area_to, from_country, to_country, travel_place, travel_start_date, travel_return_date, status, request_id, mission_id, mission_days, distance, if_sponsored, allowance_percentage, air_ticket_required, vehicle_required, remarks, workflow_execution_id) {
|
|
53
|
+
super();
|
|
54
|
+
this.req_user_department_id = req_user_department_id ?? null;
|
|
55
|
+
this.req_user_section_id = req_user_section_id ?? null;
|
|
56
|
+
this.service_id = service_id;
|
|
57
|
+
this.sub_service_id = sub_service_id;
|
|
58
|
+
this.user_id = user_id;
|
|
59
|
+
this.trip_type = trip_type;
|
|
60
|
+
this.choose_type = choose_type;
|
|
61
|
+
this.mission_sponsored_by = mission_sponsored_by;
|
|
62
|
+
this.mission_purpose = mission_purpose;
|
|
63
|
+
this.mission_number = mission_number;
|
|
64
|
+
this.mission_start_date = mission_start_date;
|
|
65
|
+
this.mission_end_date = mission_end_date;
|
|
66
|
+
this.travelling_area_from = travelling_area_from;
|
|
67
|
+
this.travelling_area_to = travelling_area_to;
|
|
68
|
+
this.from_country = from_country;
|
|
69
|
+
this.to_country = to_country;
|
|
70
|
+
this.travel_place = travel_place;
|
|
71
|
+
this.travel_start_date = travel_start_date;
|
|
72
|
+
this.travel_return_date = travel_return_date;
|
|
73
|
+
this.status = status;
|
|
74
|
+
this.request_id = request_id ?? null;
|
|
75
|
+
this.mission_id = mission_id ?? null;
|
|
76
|
+
this.mission_days = mission_days ?? null;
|
|
77
|
+
this.distance = distance ?? null;
|
|
78
|
+
this.if_sponsored = if_sponsored ?? null;
|
|
79
|
+
this.allowance_percentage = allowance_percentage ?? null;
|
|
80
|
+
this.air_ticket_required = air_ticket_required ?? null;
|
|
81
|
+
this.vehicle_required = vehicle_required ?? null;
|
|
82
|
+
this.remarks = remarks ?? null;
|
|
83
|
+
this.workflow_execution_id = workflow_execution_id ?? null;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
exports.DutyMissionRequests = DutyMissionRequests;
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
89
|
+
__metadata("design:type", Object)
|
|
90
|
+
], DutyMissionRequests.prototype, "req_user_department_id", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
93
|
+
__metadata("design:type", Object)
|
|
94
|
+
], DutyMissionRequests.prototype, "req_user_section_id", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
97
|
+
__metadata("design:type", Number)
|
|
98
|
+
], DutyMissionRequests.prototype, "service_id", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
101
|
+
__metadata("design:type", Number)
|
|
102
|
+
], DutyMissionRequests.prototype, "sub_service_id", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
105
|
+
__metadata("design:type", Number)
|
|
106
|
+
], DutyMissionRequests.prototype, "user_id", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, typeorm_1.Column)({
|
|
109
|
+
type: "enum",
|
|
110
|
+
enum: DutyMissionStatus,
|
|
111
|
+
default: DutyMissionStatus.PENDING,
|
|
112
|
+
nullable: false,
|
|
113
|
+
}),
|
|
114
|
+
__metadata("design:type", String)
|
|
115
|
+
], DutyMissionRequests.prototype, "status", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, typeorm_1.Column)({ type: "varchar", nullable: true }),
|
|
118
|
+
__metadata("design:type", Object)
|
|
119
|
+
], DutyMissionRequests.prototype, "workflow_execution_id", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
122
|
+
__metadata("design:type", Object)
|
|
123
|
+
], DutyMissionRequests.prototype, "request_id", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, typeorm_1.Column)({
|
|
126
|
+
type: "enum",
|
|
127
|
+
enum: TripType,
|
|
128
|
+
nullable: false,
|
|
129
|
+
}),
|
|
130
|
+
__metadata("design:type", String)
|
|
131
|
+
], DutyMissionRequests.prototype, "trip_type", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
134
|
+
__metadata("design:type", Object)
|
|
135
|
+
], DutyMissionRequests.prototype, "mission_id", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
(0, typeorm_1.Column)({
|
|
138
|
+
type: "enum",
|
|
139
|
+
enum: ChooseType,
|
|
140
|
+
nullable: false,
|
|
141
|
+
}),
|
|
142
|
+
__metadata("design:type", String)
|
|
143
|
+
], DutyMissionRequests.prototype, "choose_type", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, typeorm_1.Column)({
|
|
146
|
+
type: "enum",
|
|
147
|
+
enum: MissionSponsoredBy,
|
|
148
|
+
nullable: false,
|
|
149
|
+
}),
|
|
150
|
+
__metadata("design:type", String)
|
|
151
|
+
], DutyMissionRequests.prototype, "mission_sponsored_by", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
154
|
+
__metadata("design:type", Object)
|
|
155
|
+
], DutyMissionRequests.prototype, "if_sponsored", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
158
|
+
__metadata("design:type", String)
|
|
159
|
+
], DutyMissionRequests.prototype, "mission_purpose", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
|
|
162
|
+
__metadata("design:type", String)
|
|
163
|
+
], DutyMissionRequests.prototype, "mission_number", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
166
|
+
__metadata("design:type", Date)
|
|
167
|
+
], DutyMissionRequests.prototype, "mission_start_date", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
170
|
+
__metadata("design:type", Date)
|
|
171
|
+
], DutyMissionRequests.prototype, "mission_end_date", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
174
|
+
__metadata("design:type", Object)
|
|
175
|
+
], DutyMissionRequests.prototype, "mission_days", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
178
|
+
__metadata("design:type", String)
|
|
179
|
+
], DutyMissionRequests.prototype, "travelling_area_from", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
182
|
+
__metadata("design:type", String)
|
|
183
|
+
], DutyMissionRequests.prototype, "travelling_area_to", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
186
|
+
__metadata("design:type", Object)
|
|
187
|
+
], DutyMissionRequests.prototype, "distance", void 0);
|
|
188
|
+
__decorate([
|
|
189
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
|
|
190
|
+
__metadata("design:type", String)
|
|
191
|
+
], DutyMissionRequests.prototype, "from_country", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
|
|
194
|
+
__metadata("design:type", String)
|
|
195
|
+
], DutyMissionRequests.prototype, "to_country", void 0);
|
|
196
|
+
__decorate([
|
|
197
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
198
|
+
__metadata("design:type", String)
|
|
199
|
+
], DutyMissionRequests.prototype, "travel_place", void 0);
|
|
200
|
+
__decorate([
|
|
201
|
+
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
202
|
+
__metadata("design:type", Date)
|
|
203
|
+
], DutyMissionRequests.prototype, "travel_start_date", void 0);
|
|
204
|
+
__decorate([
|
|
205
|
+
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
206
|
+
__metadata("design:type", Date)
|
|
207
|
+
], DutyMissionRequests.prototype, "travel_return_date", void 0);
|
|
208
|
+
__decorate([
|
|
209
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
210
|
+
__metadata("design:type", Object)
|
|
211
|
+
], DutyMissionRequests.prototype, "allowance_percentage", void 0);
|
|
212
|
+
__decorate([
|
|
213
|
+
(0, typeorm_1.Column)({
|
|
214
|
+
type: "enum",
|
|
215
|
+
enum: AirTicketRequired,
|
|
216
|
+
nullable: true,
|
|
217
|
+
}),
|
|
218
|
+
__metadata("design:type", Object)
|
|
219
|
+
], DutyMissionRequests.prototype, "air_ticket_required", void 0);
|
|
220
|
+
__decorate([
|
|
221
|
+
(0, typeorm_1.Column)({
|
|
222
|
+
type: "enum",
|
|
223
|
+
enum: VehicleRequired,
|
|
224
|
+
nullable: true,
|
|
225
|
+
}),
|
|
226
|
+
__metadata("design:type", Object)
|
|
227
|
+
], DutyMissionRequests.prototype, "vehicle_required", void 0);
|
|
228
|
+
__decorate([
|
|
229
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
230
|
+
__metadata("design:type", Object)
|
|
231
|
+
], DutyMissionRequests.prototype, "remarks", void 0);
|
|
232
|
+
exports.DutyMissionRequests = DutyMissionRequests = __decorate([
|
|
233
|
+
(0, typeorm_1.Entity)({ name: 'duty_mission_requests' }),
|
|
234
|
+
__metadata("design:paramtypes", [Object, Object, Number, Number, Number, String, String, String, String, String, Date,
|
|
235
|
+
Date, String, String, String, String, String, Date,
|
|
236
|
+
Date, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])
|
|
237
|
+
], DutyMissionRequests);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum DutyMissionWorkFlowStatus {
|
|
3
|
+
COMPLETED = "Completed",
|
|
4
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
5
|
+
PENDING = "Pending"
|
|
6
|
+
}
|
|
7
|
+
export declare class DutyMissionWorkFlow extends BaseModel {
|
|
8
|
+
request_id: number;
|
|
9
|
+
service_id: number | null;
|
|
10
|
+
sub_service_id: number | null;
|
|
11
|
+
content: string;
|
|
12
|
+
status: DutyMissionWorkFlowStatus;
|
|
13
|
+
user_id: number | null;
|
|
14
|
+
role_id: number | null;
|
|
15
|
+
department_id: number | null;
|
|
16
|
+
section_id: number | null;
|
|
17
|
+
constructor(request_id: number, content: string, status: DutyMissionWorkFlowStatus, service_id?: number, sub_service_id?: number, user_id?: number, role_id?: number, department_id?: number, section_id?: number);
|
|
18
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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.DutyMissionWorkFlow = exports.DutyMissionWorkFlowStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var DutyMissionWorkFlowStatus;
|
|
16
|
+
(function (DutyMissionWorkFlowStatus) {
|
|
17
|
+
DutyMissionWorkFlowStatus["COMPLETED"] = "Completed";
|
|
18
|
+
DutyMissionWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
19
|
+
DutyMissionWorkFlowStatus["PENDING"] = "Pending";
|
|
20
|
+
})(DutyMissionWorkFlowStatus || (exports.DutyMissionWorkFlowStatus = DutyMissionWorkFlowStatus = {}));
|
|
21
|
+
//This model is used to store the duty mission workflow status and activity logs
|
|
22
|
+
let DutyMissionWorkFlow = class DutyMissionWorkFlow extends BaseModel_1.BaseModel {
|
|
23
|
+
constructor(request_id, content, status, service_id, sub_service_id, user_id, role_id, department_id, section_id) {
|
|
24
|
+
super();
|
|
25
|
+
this.request_id = request_id;
|
|
26
|
+
this.service_id = service_id || null;
|
|
27
|
+
this.sub_service_id = sub_service_id || null;
|
|
28
|
+
this.content = content;
|
|
29
|
+
this.status = status;
|
|
30
|
+
this.user_id = user_id || null;
|
|
31
|
+
this.role_id = role_id || null;
|
|
32
|
+
this.department_id = department_id || null;
|
|
33
|
+
this.section_id = section_id || null;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.DutyMissionWorkFlow = DutyMissionWorkFlow;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], DutyMissionWorkFlow.prototype, "request_id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], DutyMissionWorkFlow.prototype, "service_id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], DutyMissionWorkFlow.prototype, "sub_service_id", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], DutyMissionWorkFlow.prototype, "content", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: DutyMissionWorkFlowStatus, default: DutyMissionWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], DutyMissionWorkFlow.prototype, "status", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], DutyMissionWorkFlow.prototype, "user_id", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], DutyMissionWorkFlow.prototype, "role_id", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], DutyMissionWorkFlow.prototype, "department_id", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
71
|
+
__metadata("design:type", Object)
|
|
72
|
+
], DutyMissionWorkFlow.prototype, "section_id", void 0);
|
|
73
|
+
exports.DutyMissionWorkFlow = DutyMissionWorkFlow = __decorate([
|
|
74
|
+
(0, typeorm_1.Entity)({ name: 'duty_mission_workflows' }),
|
|
75
|
+
__metadata("design:paramtypes", [Number, String, String, Number, Number, Number, Number, Number, Number])
|
|
76
|
+
], DutyMissionWorkFlow);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare class Workflows extends BaseModel {
|
|
3
|
-
name: string;
|
|
4
|
-
service_id: number;
|
|
5
|
-
sub_service_id: number;
|
|
6
|
-
request_for: string;
|
|
7
|
-
levels: number;
|
|
8
|
-
constructor(name: string, service_id: number, sub_service_id: number, request_for: string, levels: number);
|
|
9
|
-
}
|