@platform-modules/civil-aviation-authority 2.3.11 → 2.3.12
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/index.d.ts
CHANGED
|
@@ -104,6 +104,8 @@ export * from './models/SecondmentRequestModel';
|
|
|
104
104
|
export { SecondmentRequestStatus } from './models/SecondmentRequestModel';
|
|
105
105
|
export * from './models/TemporaryAssignmentRequestModel';
|
|
106
106
|
export { TemporaryAssignmentRequestStatus, SalaryPaymentSource } from './models/TemporaryAssignmentRequestModel';
|
|
107
|
+
export * from './models/ServiceTransferRequestModel';
|
|
108
|
+
export { ServiceTransferRequestStatus, SalaryDetailsType, ServiceTransferRequestType } from './models/ServiceTransferRequestModel';
|
|
107
109
|
export * from './models/DutyMissionRequestModel';
|
|
108
110
|
export * from './models/DutyMissionApprovalModel';
|
|
109
111
|
export * from './models/DutyMissionWorkflowModel';
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.SalaryPaymentSource = exports.TemporaryAssignmentRequestStatus = exports.SecondmentRequestStatus = exports.StudyLeaveChatStatus = exports.StudyLeaveMessageType = exports.StudyLeaveRequestChat = exports.StudyLeaveRequestAttachment = exports.StudyLeaveWorkFlowStatus = exports.StudyLeaveApprovalStatus = exports.StudyLeaveRequestStatus = exports.TrainingMessageType = exports.TrainingRequestChat = exports.TrainingRequestAttachment = exports.TrainingWorkFlowStatus = exports.TrainingApprovalStatus = exports.TrainingRequestStatus = exports.HrServiceChatStatus = exports.HrServiceMessageType = exports.HrServiceRequestChat = exports.HrServiceRequestAttachment = exports.HrServiceWorkFlowStatus = exports.HrServiceApprovalStatus = exports.HrServiceRequestStatus = void 0;
|
|
17
|
+
exports.ServiceTransferRequestType = exports.SalaryDetailsType = exports.ServiceTransferRequestStatus = exports.SalaryPaymentSource = exports.TemporaryAssignmentRequestStatus = exports.SecondmentRequestStatus = exports.StudyLeaveChatStatus = exports.StudyLeaveMessageType = exports.StudyLeaveRequestChat = exports.StudyLeaveRequestAttachment = exports.StudyLeaveWorkFlowStatus = exports.StudyLeaveApprovalStatus = exports.StudyLeaveRequestStatus = exports.TrainingMessageType = exports.TrainingRequestChat = exports.TrainingRequestAttachment = exports.TrainingWorkFlowStatus = exports.TrainingApprovalStatus = exports.TrainingRequestStatus = exports.HrServiceChatStatus = exports.HrServiceMessageType = exports.HrServiceRequestChat = exports.HrServiceRequestAttachment = exports.HrServiceWorkFlowStatus = exports.HrServiceApprovalStatus = exports.HrServiceRequestStatus = void 0;
|
|
18
18
|
__exportStar(require("./models/user"), exports);
|
|
19
19
|
__exportStar(require("./models/role"), exports);
|
|
20
20
|
__exportStar(require("./models/user-sessions"), exports);
|
|
@@ -148,6 +148,11 @@ __exportStar(require("./models/TemporaryAssignmentRequestModel"), exports);
|
|
|
148
148
|
var TemporaryAssignmentRequestModel_1 = require("./models/TemporaryAssignmentRequestModel");
|
|
149
149
|
Object.defineProperty(exports, "TemporaryAssignmentRequestStatus", { enumerable: true, get: function () { return TemporaryAssignmentRequestModel_1.TemporaryAssignmentRequestStatus; } });
|
|
150
150
|
Object.defineProperty(exports, "SalaryPaymentSource", { enumerable: true, get: function () { return TemporaryAssignmentRequestModel_1.SalaryPaymentSource; } });
|
|
151
|
+
__exportStar(require("./models/ServiceTransferRequestModel"), exports);
|
|
152
|
+
var ServiceTransferRequestModel_1 = require("./models/ServiceTransferRequestModel");
|
|
153
|
+
Object.defineProperty(exports, "ServiceTransferRequestStatus", { enumerable: true, get: function () { return ServiceTransferRequestModel_1.ServiceTransferRequestStatus; } });
|
|
154
|
+
Object.defineProperty(exports, "SalaryDetailsType", { enumerable: true, get: function () { return ServiceTransferRequestModel_1.SalaryDetailsType; } });
|
|
155
|
+
Object.defineProperty(exports, "ServiceTransferRequestType", { enumerable: true, get: function () { return ServiceTransferRequestModel_1.ServiceTransferRequestType; } });
|
|
151
156
|
__exportStar(require("./models/DutyMissionRequestModel"), exports);
|
|
152
157
|
__exportStar(require("./models/DutyMissionApprovalModel"), exports);
|
|
153
158
|
__exportStar(require("./models/DutyMissionWorkflowModel"), exports);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
export declare enum ServiceTransferRequestStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
ASSIGNED = "Assigned",
|
|
5
|
+
IN_PROGRESS = "In Progress",
|
|
6
|
+
COMPLETED = "Completed",
|
|
7
|
+
APPROVED = "Approved",
|
|
8
|
+
REJECTED = "Rejected"
|
|
9
|
+
}
|
|
10
|
+
export declare enum SalaryDetailsType {
|
|
11
|
+
RETAINED = "Retained with Same Financial Allocations and Grade",
|
|
12
|
+
NEW = "New Financial Allocations and Grade"
|
|
13
|
+
}
|
|
14
|
+
export declare enum ServiceTransferRequestType {
|
|
15
|
+
INTERNAL = "Internal",
|
|
16
|
+
EXTERNAL = "External"
|
|
17
|
+
}
|
|
18
|
+
export declare class ServiceTransferRequest extends BaseModel {
|
|
19
|
+
req_user_department_id: number | null;
|
|
20
|
+
req_user_section_id: number | null;
|
|
21
|
+
req_user_position_id: number | null;
|
|
22
|
+
service_id: number | null;
|
|
23
|
+
sub_service_id: number | null;
|
|
24
|
+
user_id: number;
|
|
25
|
+
description: string | null;
|
|
26
|
+
status: ServiceTransferRequestStatus;
|
|
27
|
+
reviewer_user_id: number | null;
|
|
28
|
+
assigned_to_user_id: number | null;
|
|
29
|
+
assigned_at: Date | null;
|
|
30
|
+
workflow_execution_id: string | null;
|
|
31
|
+
assigned_employee_name: string;
|
|
32
|
+
civil_id_card_number: string | null;
|
|
33
|
+
employee_id: string;
|
|
34
|
+
current_job_position: string;
|
|
35
|
+
assigned_job_position: string;
|
|
36
|
+
current_entity: string;
|
|
37
|
+
transferred_to_entity: string;
|
|
38
|
+
start_date: Date;
|
|
39
|
+
end_date: Date;
|
|
40
|
+
phone_number: string;
|
|
41
|
+
reason_for_request: string;
|
|
42
|
+
request_type: ServiceTransferRequestType;
|
|
43
|
+
salary_details: SalaryDetailsType;
|
|
44
|
+
salary_details_description: string | null;
|
|
45
|
+
constructor(user_id: number, status?: ServiceTransferRequestStatus, service_id?: number | null, sub_service_id?: number | null, req_user_department_id?: number | null, req_user_section_id?: number | null, req_user_position_id?: number | null, description?: string | null, reviewer_user_id?: number | null, assigned_to_user_id?: number | null, assigned_at?: Date | null, workflow_execution_id?: string | null, assigned_employee_name?: string, civil_id_card_number?: string | null, employee_id?: string, current_job_position?: string, assigned_job_position?: string, current_entity?: string, transferred_to_entity?: string, start_date?: Date, end_date?: Date, phone_number?: string, reason_for_request?: string, request_type?: ServiceTransferRequestType, salary_details?: SalaryDetailsType, salary_details_description?: string | null);
|
|
46
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
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.ServiceTransferRequest = exports.ServiceTransferRequestType = exports.SalaryDetailsType = exports.ServiceTransferRequestStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var ServiceTransferRequestStatus;
|
|
16
|
+
(function (ServiceTransferRequestStatus) {
|
|
17
|
+
ServiceTransferRequestStatus["PENDING"] = "Pending";
|
|
18
|
+
ServiceTransferRequestStatus["ASSIGNED"] = "Assigned";
|
|
19
|
+
ServiceTransferRequestStatus["IN_PROGRESS"] = "In Progress";
|
|
20
|
+
ServiceTransferRequestStatus["COMPLETED"] = "Completed";
|
|
21
|
+
ServiceTransferRequestStatus["APPROVED"] = "Approved";
|
|
22
|
+
ServiceTransferRequestStatus["REJECTED"] = "Rejected";
|
|
23
|
+
})(ServiceTransferRequestStatus || (exports.ServiceTransferRequestStatus = ServiceTransferRequestStatus = {}));
|
|
24
|
+
var SalaryDetailsType;
|
|
25
|
+
(function (SalaryDetailsType) {
|
|
26
|
+
SalaryDetailsType["RETAINED"] = "Retained with Same Financial Allocations and Grade";
|
|
27
|
+
SalaryDetailsType["NEW"] = "New Financial Allocations and Grade";
|
|
28
|
+
})(SalaryDetailsType || (exports.SalaryDetailsType = SalaryDetailsType = {}));
|
|
29
|
+
var ServiceTransferRequestType;
|
|
30
|
+
(function (ServiceTransferRequestType) {
|
|
31
|
+
ServiceTransferRequestType["INTERNAL"] = "Internal";
|
|
32
|
+
ServiceTransferRequestType["EXTERNAL"] = "External";
|
|
33
|
+
})(ServiceTransferRequestType || (exports.ServiceTransferRequestType = ServiceTransferRequestType = {}));
|
|
34
|
+
let ServiceTransferRequest = class ServiceTransferRequest extends BaseModel_1.BaseModel {
|
|
35
|
+
constructor(user_id, status = ServiceTransferRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, description, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id, assigned_employee_name, civil_id_card_number, employee_id, current_job_position, assigned_job_position, current_entity, transferred_to_entity, start_date, end_date, phone_number, reason_for_request, request_type, salary_details, salary_details_description) {
|
|
36
|
+
super();
|
|
37
|
+
this.user_id = user_id;
|
|
38
|
+
this.status = status;
|
|
39
|
+
this.service_id = service_id || null;
|
|
40
|
+
this.sub_service_id = sub_service_id || null;
|
|
41
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
42
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
43
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
44
|
+
this.description = description || null;
|
|
45
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
46
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
47
|
+
this.assigned_at = assigned_at || null;
|
|
48
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
49
|
+
this.assigned_employee_name = assigned_employee_name || "";
|
|
50
|
+
this.civil_id_card_number = civil_id_card_number || null;
|
|
51
|
+
this.employee_id = employee_id || "";
|
|
52
|
+
this.current_job_position = current_job_position || "";
|
|
53
|
+
this.assigned_job_position = assigned_job_position || "";
|
|
54
|
+
this.current_entity = current_entity || "";
|
|
55
|
+
this.transferred_to_entity = transferred_to_entity || "";
|
|
56
|
+
this.start_date = start_date || new Date();
|
|
57
|
+
this.end_date = end_date || new Date();
|
|
58
|
+
this.phone_number = phone_number || "";
|
|
59
|
+
this.reason_for_request = reason_for_request || "";
|
|
60
|
+
this.request_type = request_type || ServiceTransferRequestType.INTERNAL;
|
|
61
|
+
this.salary_details = salary_details || SalaryDetailsType.RETAINED;
|
|
62
|
+
this.salary_details_description = salary_details_description || null;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
exports.ServiceTransferRequest = ServiceTransferRequest;
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
|
+
], ServiceTransferRequest.prototype, "req_user_department_id", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
72
|
+
__metadata("design:type", Object)
|
|
73
|
+
], ServiceTransferRequest.prototype, "req_user_section_id", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
76
|
+
__metadata("design:type", Object)
|
|
77
|
+
], ServiceTransferRequest.prototype, "req_user_position_id", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
80
|
+
__metadata("design:type", Object)
|
|
81
|
+
], ServiceTransferRequest.prototype, "service_id", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
84
|
+
__metadata("design:type", Object)
|
|
85
|
+
], ServiceTransferRequest.prototype, "sub_service_id", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
88
|
+
__metadata("design:type", Number)
|
|
89
|
+
], ServiceTransferRequest.prototype, "user_id", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
92
|
+
__metadata("design:type", Object)
|
|
93
|
+
], ServiceTransferRequest.prototype, "description", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, typeorm_1.Column)({ type: "enum", enum: ServiceTransferRequestStatus, default: ServiceTransferRequestStatus.PENDING, nullable: false }),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], ServiceTransferRequest.prototype, "status", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
100
|
+
__metadata("design:type", Object)
|
|
101
|
+
], ServiceTransferRequest.prototype, "reviewer_user_id", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
104
|
+
__metadata("design:type", Object)
|
|
105
|
+
], ServiceTransferRequest.prototype, "assigned_to_user_id", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
108
|
+
__metadata("design:type", Object)
|
|
109
|
+
], ServiceTransferRequest.prototype, "assigned_at", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
112
|
+
__metadata("design:type", Object)
|
|
113
|
+
], ServiceTransferRequest.prototype, "workflow_execution_id", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
116
|
+
__metadata("design:type", String)
|
|
117
|
+
], ServiceTransferRequest.prototype, "assigned_employee_name", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
120
|
+
__metadata("design:type", Object)
|
|
121
|
+
], ServiceTransferRequest.prototype, "civil_id_card_number", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: false }),
|
|
124
|
+
__metadata("design:type", String)
|
|
125
|
+
], ServiceTransferRequest.prototype, "employee_id", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
128
|
+
__metadata("design:type", String)
|
|
129
|
+
], ServiceTransferRequest.prototype, "current_job_position", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
132
|
+
__metadata("design:type", String)
|
|
133
|
+
], ServiceTransferRequest.prototype, "assigned_job_position", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: false }),
|
|
136
|
+
__metadata("design:type", String)
|
|
137
|
+
], ServiceTransferRequest.prototype, "current_entity", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: false }),
|
|
140
|
+
__metadata("design:type", String)
|
|
141
|
+
], ServiceTransferRequest.prototype, "transferred_to_entity", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
144
|
+
__metadata("design:type", Date)
|
|
145
|
+
], ServiceTransferRequest.prototype, "start_date", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, typeorm_1.Column)({ type: "date", nullable: false }),
|
|
148
|
+
__metadata("design:type", Date)
|
|
149
|
+
], ServiceTransferRequest.prototype, "end_date", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: false }),
|
|
152
|
+
__metadata("design:type", String)
|
|
153
|
+
], ServiceTransferRequest.prototype, "phone_number", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
156
|
+
__metadata("design:type", String)
|
|
157
|
+
], ServiceTransferRequest.prototype, "reason_for_request", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
(0, typeorm_1.Column)({ type: "enum", enum: ServiceTransferRequestType, nullable: false }),
|
|
160
|
+
__metadata("design:type", String)
|
|
161
|
+
], ServiceTransferRequest.prototype, "request_type", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
(0, typeorm_1.Column)({ type: "enum", enum: SalaryDetailsType, nullable: false }),
|
|
164
|
+
__metadata("design:type", String)
|
|
165
|
+
], ServiceTransferRequest.prototype, "salary_details", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
|
|
168
|
+
__metadata("design:type", Object)
|
|
169
|
+
], ServiceTransferRequest.prototype, "salary_details_description", void 0);
|
|
170
|
+
exports.ServiceTransferRequest = ServiceTransferRequest = __decorate([
|
|
171
|
+
(0, typeorm_1.Entity)({ name: "service_transfer_requests" }),
|
|
172
|
+
__metadata("design:paramtypes", [Number, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, String, Object, String, String, String, String, String, Date,
|
|
173
|
+
Date, String, String, String, String, Object])
|
|
174
|
+
], ServiceTransferRequest);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -108,6 +108,8 @@ export * from './models/SecondmentRequestModel';
|
|
|
108
108
|
export {SecondmentRequestStatus} from './models/SecondmentRequestModel';
|
|
109
109
|
export * from './models/TemporaryAssignmentRequestModel';
|
|
110
110
|
export {TemporaryAssignmentRequestStatus, SalaryPaymentSource} from './models/TemporaryAssignmentRequestModel';
|
|
111
|
+
export * from './models/ServiceTransferRequestModel';
|
|
112
|
+
export {ServiceTransferRequestStatus, SalaryDetailsType, ServiceTransferRequestType} from './models/ServiceTransferRequestModel';
|
|
111
113
|
export * from './models/DutyMissionRequestModel';
|
|
112
114
|
export * from './models/DutyMissionApprovalModel';
|
|
113
115
|
export * from './models/DutyMissionWorkflowModel';
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum ServiceTransferRequestStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
ASSIGNED = "Assigned",
|
|
7
|
+
IN_PROGRESS = "In Progress",
|
|
8
|
+
COMPLETED = "Completed",
|
|
9
|
+
APPROVED = "Approved",
|
|
10
|
+
REJECTED = "Rejected"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum SalaryDetailsType {
|
|
14
|
+
RETAINED = "Retained with Same Financial Allocations and Grade",
|
|
15
|
+
NEW = "New Financial Allocations and Grade"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export enum ServiceTransferRequestType {
|
|
19
|
+
INTERNAL = "Internal",
|
|
20
|
+
EXTERNAL = "External"
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@Entity({ name: "service_transfer_requests" })
|
|
24
|
+
export class ServiceTransferRequest extends BaseModel {
|
|
25
|
+
@Column({ type: "integer", nullable: true })
|
|
26
|
+
req_user_department_id: number | null;
|
|
27
|
+
|
|
28
|
+
@Column({ type: "integer", nullable: true })
|
|
29
|
+
req_user_section_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: "integer", nullable: true })
|
|
32
|
+
req_user_position_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: "integer", nullable: true })
|
|
35
|
+
service_id: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: "integer", nullable: true })
|
|
38
|
+
sub_service_id: number | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: "integer", nullable: false })
|
|
41
|
+
user_id: number;
|
|
42
|
+
|
|
43
|
+
@Column({ type: "text", nullable: true })
|
|
44
|
+
description: string | null;
|
|
45
|
+
|
|
46
|
+
@Column({ type: "enum", enum: ServiceTransferRequestStatus, default: ServiceTransferRequestStatus.PENDING, nullable: false })
|
|
47
|
+
status: ServiceTransferRequestStatus;
|
|
48
|
+
|
|
49
|
+
@Column({ type: "integer", nullable: true })
|
|
50
|
+
reviewer_user_id: number | null;
|
|
51
|
+
|
|
52
|
+
@Column({ type: "integer", nullable: true })
|
|
53
|
+
assigned_to_user_id: number | null;
|
|
54
|
+
|
|
55
|
+
@Column({ type: "timestamp", nullable: true })
|
|
56
|
+
assigned_at: Date | null;
|
|
57
|
+
|
|
58
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
59
|
+
workflow_execution_id: string | null;
|
|
60
|
+
|
|
61
|
+
// Service Transfer specific fields
|
|
62
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
63
|
+
assigned_employee_name: string;
|
|
64
|
+
|
|
65
|
+
@Column({ type: "varchar", length: 50, nullable: true })
|
|
66
|
+
civil_id_card_number: string | null;
|
|
67
|
+
|
|
68
|
+
@Column({ type: "varchar", length: 100, nullable: false })
|
|
69
|
+
employee_id: string;
|
|
70
|
+
|
|
71
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
72
|
+
current_job_position: string;
|
|
73
|
+
|
|
74
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
75
|
+
assigned_job_position: string;
|
|
76
|
+
|
|
77
|
+
@Column({ type: "varchar", length: 500, nullable: false })
|
|
78
|
+
current_entity: string;
|
|
79
|
+
|
|
80
|
+
@Column({ type: "varchar", length: 500, nullable: false })
|
|
81
|
+
transferred_to_entity: string;
|
|
82
|
+
|
|
83
|
+
@Column({ type: "date", nullable: false })
|
|
84
|
+
start_date: Date;
|
|
85
|
+
|
|
86
|
+
@Column({ type: "date", nullable: false })
|
|
87
|
+
end_date: Date;
|
|
88
|
+
|
|
89
|
+
@Column({ type: "varchar", length: 20, nullable: false })
|
|
90
|
+
phone_number: string;
|
|
91
|
+
|
|
92
|
+
@Column({ type: "text", nullable: false })
|
|
93
|
+
reason_for_request: string;
|
|
94
|
+
|
|
95
|
+
// Request type - Internal or External transfer
|
|
96
|
+
@Column({ type: "enum", enum: ServiceTransferRequestType, nullable: false })
|
|
97
|
+
request_type: ServiceTransferRequestType;
|
|
98
|
+
|
|
99
|
+
// Salary details
|
|
100
|
+
@Column({ type: "enum", enum: SalaryDetailsType, nullable: false })
|
|
101
|
+
salary_details: SalaryDetailsType;
|
|
102
|
+
|
|
103
|
+
@Column({ type: "varchar", length: 500, nullable: true })
|
|
104
|
+
salary_details_description: string | null;
|
|
105
|
+
|
|
106
|
+
constructor(
|
|
107
|
+
user_id: number,
|
|
108
|
+
status: ServiceTransferRequestStatus = ServiceTransferRequestStatus.PENDING,
|
|
109
|
+
service_id?: number | null,
|
|
110
|
+
sub_service_id?: number | null,
|
|
111
|
+
req_user_department_id?: number | null,
|
|
112
|
+
req_user_section_id?: number | null,
|
|
113
|
+
req_user_position_id?: number | null,
|
|
114
|
+
description?: string | null,
|
|
115
|
+
reviewer_user_id?: number | null,
|
|
116
|
+
assigned_to_user_id?: number | null,
|
|
117
|
+
assigned_at?: Date | null,
|
|
118
|
+
workflow_execution_id?: string | null,
|
|
119
|
+
assigned_employee_name?: string,
|
|
120
|
+
civil_id_card_number?: string | null,
|
|
121
|
+
employee_id?: string,
|
|
122
|
+
current_job_position?: string,
|
|
123
|
+
assigned_job_position?: string,
|
|
124
|
+
current_entity?: string,
|
|
125
|
+
transferred_to_entity?: string,
|
|
126
|
+
start_date?: Date,
|
|
127
|
+
end_date?: Date,
|
|
128
|
+
phone_number?: string,
|
|
129
|
+
reason_for_request?: string,
|
|
130
|
+
request_type?: ServiceTransferRequestType,
|
|
131
|
+
salary_details?: SalaryDetailsType,
|
|
132
|
+
salary_details_description?: string | null
|
|
133
|
+
) {
|
|
134
|
+
super();
|
|
135
|
+
this.user_id = user_id;
|
|
136
|
+
this.status = status;
|
|
137
|
+
this.service_id = service_id || null;
|
|
138
|
+
this.sub_service_id = sub_service_id || null;
|
|
139
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
140
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
141
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
142
|
+
this.description = description || null;
|
|
143
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
144
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
145
|
+
this.assigned_at = assigned_at || null;
|
|
146
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
147
|
+
this.assigned_employee_name = assigned_employee_name || "";
|
|
148
|
+
this.civil_id_card_number = civil_id_card_number || null;
|
|
149
|
+
this.employee_id = employee_id || "";
|
|
150
|
+
this.current_job_position = current_job_position || "";
|
|
151
|
+
this.assigned_job_position = assigned_job_position || "";
|
|
152
|
+
this.current_entity = current_entity || "";
|
|
153
|
+
this.transferred_to_entity = transferred_to_entity || "";
|
|
154
|
+
this.start_date = start_date || new Date();
|
|
155
|
+
this.end_date = end_date || new Date();
|
|
156
|
+
this.phone_number = phone_number || "";
|
|
157
|
+
this.reason_for_request = reason_for_request || "";
|
|
158
|
+
this.request_type = request_type || ServiceTransferRequestType.INTERNAL;
|
|
159
|
+
this.salary_details = salary_details || SalaryDetailsType.RETAINED;
|
|
160
|
+
this.salary_details_description = salary_details_description || null;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
|