@platform-modules/civil-aviation-authority 2.3.40 → 2.3.42
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 +4 -0
- package/dist/index.js +9 -1
- package/dist/models/ITApprovalSettings.d.ts +7 -0
- package/dist/models/ITApprovalSettings.js +40 -0
- package/dist/models/ITServicesTypesMuscatModel.d.ts +6 -0
- package/dist/models/ITServicesTypesMuscatModel.js +34 -0
- package/dist/models/ITServicesTypesSalalahModel.d.ts +6 -0
- package/dist/models/ITServicesTypesSalalahModel.js +34 -0
- package/dist/models/JobTransferRequestModel.d.ts +31 -0
- package/dist/models/JobTransferRequestModel.js +128 -0
- package/dist/models/LogisticsForeignVehicleModel.js +1 -0
- package/dist/models/LogisticsVehicleMaintenanceRequestModel.js +2 -0
- package/dist/models/ServiceTransferRequestModel.d.ts +3 -3
- package/dist/models/ServiceTransferRequestModel.js +7 -8
- package/dist/models/ShiftAllowanceRequestModel.d.ts +37 -0
- package/dist/models/ShiftAllowanceRequestModel.js +140 -0
- package/dist/models/Workflows.d.ts +9 -0
- package/dist/models/Workflows.js +31 -0
- package/dist/models/roleRightsModel.d.ts +9 -12
- package/dist/models/roleRightsModel.js +16 -15
- package/package.json +1 -1
- package/src/index.ts +7 -0
- package/src/models/HrServiceRequestModel.ts +167 -167
- package/src/models/ITRequestChatModel.ts +62 -62
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/src/models/JobTransferRequestModel.ts +115 -0
- package/src/models/LogisticsForeignVehicleModel.ts +1 -0
- package/src/models/LogisticsVehicleMaintenanceRequestModel.ts +2 -0
- package/src/models/RequestForCoverageRequestModel.ts +174 -174
- package/src/models/ServiceTransferRequestModel.ts +8 -8
- package/src/models/ShiftAllowanceRequestModel.ts +126 -0
- package/src/models/roleRightsModel.ts +13 -14
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
@author
|
|
3
|
-
|
|
4
|
-
@
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Role
|
|
8
|
-
@usage
|
|
9
|
-
Userrole Information will store
|
|
10
|
-
*/
|
|
1
|
+
/**
|
|
2
|
+
* @author Amnet Digital
|
|
3
|
+
* @date 2024-05-20
|
|
4
|
+
* @Model RoleRights
|
|
5
|
+
* @usage Stores role rights/permissions for user roles, mapping services and sub-services that a role can access
|
|
6
|
+
*/
|
|
11
7
|
import { BaseModel } from './BaseModel';
|
|
12
8
|
export declare class RoleRights extends BaseModel {
|
|
13
|
-
user_role_id: number;
|
|
9
|
+
user_role_id: number | null;
|
|
14
10
|
service_id: number;
|
|
15
|
-
|
|
11
|
+
sub_service_ids: number[] | null;
|
|
12
|
+
constructor(user_role_id?: number | null, service_id?: number, sub_service_ids?: number[] | null);
|
|
16
13
|
}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
@author
|
|
4
|
-
|
|
5
|
-
@
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Role
|
|
9
|
-
@usage
|
|
10
|
-
Userrole Information will store
|
|
11
|
-
*/
|
|
2
|
+
/**
|
|
3
|
+
* @author Amnet Digital
|
|
4
|
+
* @date 2024-05-20
|
|
5
|
+
* @Model RoleRights
|
|
6
|
+
* @usage Stores role rights/permissions for user roles, mapping services and sub-services that a role can access
|
|
7
|
+
*/
|
|
12
8
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
13
9
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14
10
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -23,22 +19,27 @@ exports.RoleRights = void 0;
|
|
|
23
19
|
const typeorm_1 = require("typeorm");
|
|
24
20
|
const BaseModel_1 = require("./BaseModel");
|
|
25
21
|
let RoleRights = class RoleRights extends BaseModel_1.BaseModel {
|
|
26
|
-
constructor(user_role_id, service_id) {
|
|
22
|
+
constructor(user_role_id, service_id, sub_service_ids) {
|
|
27
23
|
super();
|
|
28
|
-
this.user_role_id = user_role_id;
|
|
29
|
-
this.service_id = service_id;
|
|
24
|
+
this.user_role_id = user_role_id ?? null;
|
|
25
|
+
this.service_id = service_id ?? 0;
|
|
26
|
+
this.sub_service_ids = sub_service_ids ?? null;
|
|
30
27
|
}
|
|
31
28
|
};
|
|
32
29
|
exports.RoleRights = RoleRights;
|
|
33
30
|
__decorate([
|
|
34
31
|
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
35
|
-
__metadata("design:type",
|
|
32
|
+
__metadata("design:type", Object)
|
|
36
33
|
], RoleRights.prototype, "user_role_id", void 0);
|
|
37
34
|
__decorate([
|
|
38
35
|
(0, typeorm_1.Column)({ type: 'bigint', nullable: false }),
|
|
39
36
|
__metadata("design:type", Number)
|
|
40
37
|
], RoleRights.prototype, "service_id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'int', array: true, nullable: true }),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], RoleRights.prototype, "sub_service_ids", void 0);
|
|
41
42
|
exports.RoleRights = RoleRights = __decorate([
|
|
42
43
|
(0, typeorm_1.Entity)({ name: 'role_rights' }),
|
|
43
|
-
__metadata("design:paramtypes", [Number,
|
|
44
|
+
__metadata("design:paramtypes", [Object, Number, Object])
|
|
44
45
|
], RoleRights);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -185,3 +185,10 @@ export {AssignTasksEmpWorkFlowStatus} from './models/AssignTasksEmpWorkflowModel
|
|
|
185
185
|
export {AssignTasksEmpRequestAttachment} from './models/AssignTasksEmpAttachmentModel';
|
|
186
186
|
export {AssignTasksEmpRequestChat} from './models/AssignTasksEmpChatModel';
|
|
187
187
|
export {AssignTasksEmpMessageType} from './models/AssignTasksEmpChatModel';
|
|
188
|
+
|
|
189
|
+
export * from './models/ShiftAllowanceRequestModel';
|
|
190
|
+
export {ShiftAllowanceRequestStatus, ShiftAllowanceValue} from './models/ShiftAllowanceRequestModel';
|
|
191
|
+
|
|
192
|
+
// Job Transfer (Transfer from One Job to Another Job Nature) Service
|
|
193
|
+
export * from './models/JobTransferRequestModel';
|
|
194
|
+
export {JobTransferRequestStatus} from './models/JobTransferRequestModel';
|
|
@@ -1,167 +1,167 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
export enum HrServiceRequestStatus {
|
|
5
|
-
PENDING = "Pending",
|
|
6
|
-
ASSIGNED = "Assigned",
|
|
7
|
-
IN_PROGRESS = "In Progress",
|
|
8
|
-
COMPLETED = "Completed",
|
|
9
|
-
APPROVED = "Approved",
|
|
10
|
-
REJECTED = "Rejected"
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@Entity({ name: "hr_service_requests" })
|
|
14
|
-
export class HrServiceRequest extends BaseModel {
|
|
15
|
-
@Column({ type: "integer", nullable: true })
|
|
16
|
-
req_user_department_id: number | null;
|
|
17
|
-
|
|
18
|
-
@Column({ type: "integer", nullable: true })
|
|
19
|
-
req_user_section_id: number | null;
|
|
20
|
-
|
|
21
|
-
@Column({ type: "integer", nullable: true })
|
|
22
|
-
req_user_position_id: number | null;
|
|
23
|
-
|
|
24
|
-
@Column({ type: "integer", nullable: true })
|
|
25
|
-
service_id: number | null;
|
|
26
|
-
|
|
27
|
-
@Column({ type: "integer", nullable: true })
|
|
28
|
-
sub_service_id: number | null;
|
|
29
|
-
|
|
30
|
-
@Column({ type: "integer", nullable: false })
|
|
31
|
-
user_id: number;
|
|
32
|
-
|
|
33
|
-
@Column({ type: "text", nullable: true })
|
|
34
|
-
description: string | null;
|
|
35
|
-
|
|
36
|
-
@Column({ type: "enum", enum: HrServiceRequestStatus, default: HrServiceRequestStatus.PENDING, nullable: false })
|
|
37
|
-
status: HrServiceRequestStatus;
|
|
38
|
-
|
|
39
|
-
@Column({ type: "integer", nullable: true })
|
|
40
|
-
reviewer_user_id: number | null;
|
|
41
|
-
|
|
42
|
-
@Column({ type: "integer", nullable: true })
|
|
43
|
-
assigned_to_user_id: number | null;
|
|
44
|
-
|
|
45
|
-
@Column({ type: "timestamp", nullable: true })
|
|
46
|
-
assigned_at: Date | null;
|
|
47
|
-
|
|
48
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
49
|
-
workflow_execution_id: string | null;
|
|
50
|
-
|
|
51
|
-
// Assignment Decision specific fields
|
|
52
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
53
|
-
assigned_employee_name: string;
|
|
54
|
-
|
|
55
|
-
@Column({ type: "varchar", length: 50, nullable: true })
|
|
56
|
-
civil_id_card_number: string | null;
|
|
57
|
-
|
|
58
|
-
@Column({ type: "varchar", length: 100, nullable: false })
|
|
59
|
-
employee_id: string;
|
|
60
|
-
|
|
61
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
62
|
-
current_job_position: string;
|
|
63
|
-
|
|
64
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
65
|
-
assigned_job_position: string;
|
|
66
|
-
|
|
67
|
-
@Column({ type: "date", nullable: false })
|
|
68
|
-
start_date: Date;
|
|
69
|
-
|
|
70
|
-
@Column({ type: "date", nullable: false })
|
|
71
|
-
end_date: Date;
|
|
72
|
-
|
|
73
|
-
@Column({ type: "decimal", precision: 5, scale: 2, nullable: true })
|
|
74
|
-
assignment_allowance: number | null; // 0-100 percentage
|
|
75
|
-
|
|
76
|
-
@Column({ type: "varchar", length: 20, nullable: false })
|
|
77
|
-
phone_number: string;
|
|
78
|
-
|
|
79
|
-
@Column({ type: "text", nullable: false })
|
|
80
|
-
reason_for_request: string;
|
|
81
|
-
|
|
82
|
-
// Replacement tracking fields
|
|
83
|
-
@Column({ type: "boolean", default: false, nullable: false })
|
|
84
|
-
is_replaced: boolean;
|
|
85
|
-
|
|
86
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
87
|
-
replacement_employee_name: string | null;
|
|
88
|
-
|
|
89
|
-
@Column({ type: "varchar", length: 100, nullable: true })
|
|
90
|
-
replacement_employee_id: string | null;
|
|
91
|
-
|
|
92
|
-
@Column({ type: "varchar", length: 50, nullable: true })
|
|
93
|
-
replacement_civil_id_card_number: string | null;
|
|
94
|
-
|
|
95
|
-
@Column({ type: "text", nullable: true })
|
|
96
|
-
replacement_reason: string | null;
|
|
97
|
-
|
|
98
|
-
@Column({ type: "integer", nullable: true })
|
|
99
|
-
replaced_by_user_id: number | null;
|
|
100
|
-
|
|
101
|
-
@Column({ type: "timestamp", nullable: true })
|
|
102
|
-
replaced_at: Date | null;
|
|
103
|
-
|
|
104
|
-
constructor(
|
|
105
|
-
user_id: number,
|
|
106
|
-
status: HrServiceRequestStatus = HrServiceRequestStatus.PENDING,
|
|
107
|
-
service_id?: number | null,
|
|
108
|
-
sub_service_id?: number | null,
|
|
109
|
-
req_user_department_id?: number | null,
|
|
110
|
-
req_user_section_id?: number | null,
|
|
111
|
-
req_user_position_id?: number | null,
|
|
112
|
-
description?: string | null,
|
|
113
|
-
reviewer_user_id?: number | null,
|
|
114
|
-
assigned_to_user_id?: number | null,
|
|
115
|
-
assigned_at?: Date | null,
|
|
116
|
-
workflow_execution_id?: string | null,
|
|
117
|
-
assigned_employee_name?: string,
|
|
118
|
-
civil_id_card_number?: string | null,
|
|
119
|
-
employee_id?: string,
|
|
120
|
-
current_job_position?: string,
|
|
121
|
-
assigned_job_position?: string,
|
|
122
|
-
start_date?: Date,
|
|
123
|
-
end_date?: Date,
|
|
124
|
-
assignment_allowance?: number | null,
|
|
125
|
-
phone_number?: string,
|
|
126
|
-
reason_for_request?: string,
|
|
127
|
-
is_replaced?: boolean,
|
|
128
|
-
replacement_employee_name?: string | null,
|
|
129
|
-
replacement_employee_id?: string | null,
|
|
130
|
-
replacement_civil_id_card_number?: string | null,
|
|
131
|
-
replacement_reason?: string | null,
|
|
132
|
-
replaced_by_user_id?: number | null,
|
|
133
|
-
replaced_at?: Date | null
|
|
134
|
-
) {
|
|
135
|
-
super();
|
|
136
|
-
this.user_id = user_id;
|
|
137
|
-
this.status = status;
|
|
138
|
-
this.service_id = service_id || null;
|
|
139
|
-
this.sub_service_id = sub_service_id || null;
|
|
140
|
-
this.req_user_department_id = req_user_department_id || null;
|
|
141
|
-
this.req_user_section_id = req_user_section_id || null;
|
|
142
|
-
this.req_user_position_id = req_user_position_id || null;
|
|
143
|
-
this.description = description || null;
|
|
144
|
-
this.reviewer_user_id = reviewer_user_id || null;
|
|
145
|
-
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
146
|
-
this.assigned_at = assigned_at || null;
|
|
147
|
-
this.workflow_execution_id = workflow_execution_id || null;
|
|
148
|
-
this.assigned_employee_name = assigned_employee_name || "";
|
|
149
|
-
this.civil_id_card_number = civil_id_card_number || null;
|
|
150
|
-
this.employee_id = employee_id || "";
|
|
151
|
-
this.current_job_position = current_job_position || "";
|
|
152
|
-
this.assigned_job_position = assigned_job_position || "";
|
|
153
|
-
this.start_date = start_date || new Date();
|
|
154
|
-
this.end_date = end_date || new Date();
|
|
155
|
-
this.assignment_allowance = assignment_allowance || null;
|
|
156
|
-
this.phone_number = phone_number || "";
|
|
157
|
-
this.reason_for_request = reason_for_request || "";
|
|
158
|
-
this.is_replaced = is_replaced || false;
|
|
159
|
-
this.replacement_employee_name = replacement_employee_name || null;
|
|
160
|
-
this.replacement_employee_id = replacement_employee_id || null;
|
|
161
|
-
this.replacement_civil_id_card_number = replacement_civil_id_card_number || null;
|
|
162
|
-
this.replacement_reason = replacement_reason || null;
|
|
163
|
-
this.replaced_by_user_id = replaced_by_user_id || null;
|
|
164
|
-
this.replaced_at = replaced_at || null;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum HrServiceRequestStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
ASSIGNED = "Assigned",
|
|
7
|
+
IN_PROGRESS = "In Progress",
|
|
8
|
+
COMPLETED = "Completed",
|
|
9
|
+
APPROVED = "Approved",
|
|
10
|
+
REJECTED = "Rejected"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@Entity({ name: "hr_service_requests" })
|
|
14
|
+
export class HrServiceRequest extends BaseModel {
|
|
15
|
+
@Column({ type: "integer", nullable: true })
|
|
16
|
+
req_user_department_id: number | null;
|
|
17
|
+
|
|
18
|
+
@Column({ type: "integer", nullable: true })
|
|
19
|
+
req_user_section_id: number | null;
|
|
20
|
+
|
|
21
|
+
@Column({ type: "integer", nullable: true })
|
|
22
|
+
req_user_position_id: number | null;
|
|
23
|
+
|
|
24
|
+
@Column({ type: "integer", nullable: true })
|
|
25
|
+
service_id: number | null;
|
|
26
|
+
|
|
27
|
+
@Column({ type: "integer", nullable: true })
|
|
28
|
+
sub_service_id: number | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: "integer", nullable: false })
|
|
31
|
+
user_id: number;
|
|
32
|
+
|
|
33
|
+
@Column({ type: "text", nullable: true })
|
|
34
|
+
description: string | null;
|
|
35
|
+
|
|
36
|
+
@Column({ type: "enum", enum: HrServiceRequestStatus, default: HrServiceRequestStatus.PENDING, nullable: false })
|
|
37
|
+
status: HrServiceRequestStatus;
|
|
38
|
+
|
|
39
|
+
@Column({ type: "integer", nullable: true })
|
|
40
|
+
reviewer_user_id: number | null;
|
|
41
|
+
|
|
42
|
+
@Column({ type: "integer", nullable: true })
|
|
43
|
+
assigned_to_user_id: number | null;
|
|
44
|
+
|
|
45
|
+
@Column({ type: "timestamp", nullable: true })
|
|
46
|
+
assigned_at: Date | null;
|
|
47
|
+
|
|
48
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
49
|
+
workflow_execution_id: string | null;
|
|
50
|
+
|
|
51
|
+
// Assignment Decision specific fields
|
|
52
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
53
|
+
assigned_employee_name: string;
|
|
54
|
+
|
|
55
|
+
@Column({ type: "varchar", length: 50, nullable: true })
|
|
56
|
+
civil_id_card_number: string | null;
|
|
57
|
+
|
|
58
|
+
@Column({ type: "varchar", length: 100, nullable: false })
|
|
59
|
+
employee_id: string;
|
|
60
|
+
|
|
61
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
62
|
+
current_job_position: string;
|
|
63
|
+
|
|
64
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
65
|
+
assigned_job_position: string;
|
|
66
|
+
|
|
67
|
+
@Column({ type: "date", nullable: false })
|
|
68
|
+
start_date: Date;
|
|
69
|
+
|
|
70
|
+
@Column({ type: "date", nullable: false })
|
|
71
|
+
end_date: Date;
|
|
72
|
+
|
|
73
|
+
@Column({ type: "decimal", precision: 5, scale: 2, nullable: true })
|
|
74
|
+
assignment_allowance: number | null; // 0-100 percentage
|
|
75
|
+
|
|
76
|
+
@Column({ type: "varchar", length: 20, nullable: false })
|
|
77
|
+
phone_number: string;
|
|
78
|
+
|
|
79
|
+
@Column({ type: "text", nullable: false })
|
|
80
|
+
reason_for_request: string;
|
|
81
|
+
|
|
82
|
+
// Replacement tracking fields
|
|
83
|
+
@Column({ type: "boolean", default: false, nullable: false })
|
|
84
|
+
is_replaced: boolean;
|
|
85
|
+
|
|
86
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
87
|
+
replacement_employee_name: string | null;
|
|
88
|
+
|
|
89
|
+
@Column({ type: "varchar", length: 100, nullable: true })
|
|
90
|
+
replacement_employee_id: string | null;
|
|
91
|
+
|
|
92
|
+
@Column({ type: "varchar", length: 50, nullable: true })
|
|
93
|
+
replacement_civil_id_card_number: string | null;
|
|
94
|
+
|
|
95
|
+
@Column({ type: "text", nullable: true })
|
|
96
|
+
replacement_reason: string | null;
|
|
97
|
+
|
|
98
|
+
@Column({ type: "integer", nullable: true })
|
|
99
|
+
replaced_by_user_id: number | null;
|
|
100
|
+
|
|
101
|
+
@Column({ type: "timestamp", nullable: true })
|
|
102
|
+
replaced_at: Date | null;
|
|
103
|
+
|
|
104
|
+
constructor(
|
|
105
|
+
user_id: number,
|
|
106
|
+
status: HrServiceRequestStatus = HrServiceRequestStatus.PENDING,
|
|
107
|
+
service_id?: number | null,
|
|
108
|
+
sub_service_id?: number | null,
|
|
109
|
+
req_user_department_id?: number | null,
|
|
110
|
+
req_user_section_id?: number | null,
|
|
111
|
+
req_user_position_id?: number | null,
|
|
112
|
+
description?: string | null,
|
|
113
|
+
reviewer_user_id?: number | null,
|
|
114
|
+
assigned_to_user_id?: number | null,
|
|
115
|
+
assigned_at?: Date | null,
|
|
116
|
+
workflow_execution_id?: string | null,
|
|
117
|
+
assigned_employee_name?: string,
|
|
118
|
+
civil_id_card_number?: string | null,
|
|
119
|
+
employee_id?: string,
|
|
120
|
+
current_job_position?: string,
|
|
121
|
+
assigned_job_position?: string,
|
|
122
|
+
start_date?: Date,
|
|
123
|
+
end_date?: Date,
|
|
124
|
+
assignment_allowance?: number | null,
|
|
125
|
+
phone_number?: string,
|
|
126
|
+
reason_for_request?: string,
|
|
127
|
+
is_replaced?: boolean,
|
|
128
|
+
replacement_employee_name?: string | null,
|
|
129
|
+
replacement_employee_id?: string | null,
|
|
130
|
+
replacement_civil_id_card_number?: string | null,
|
|
131
|
+
replacement_reason?: string | null,
|
|
132
|
+
replaced_by_user_id?: number | null,
|
|
133
|
+
replaced_at?: Date | null
|
|
134
|
+
) {
|
|
135
|
+
super();
|
|
136
|
+
this.user_id = user_id;
|
|
137
|
+
this.status = status;
|
|
138
|
+
this.service_id = service_id || null;
|
|
139
|
+
this.sub_service_id = sub_service_id || null;
|
|
140
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
141
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
142
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
143
|
+
this.description = description || null;
|
|
144
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
145
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
146
|
+
this.assigned_at = assigned_at || null;
|
|
147
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
148
|
+
this.assigned_employee_name = assigned_employee_name || "";
|
|
149
|
+
this.civil_id_card_number = civil_id_card_number || null;
|
|
150
|
+
this.employee_id = employee_id || "";
|
|
151
|
+
this.current_job_position = current_job_position || "";
|
|
152
|
+
this.assigned_job_position = assigned_job_position || "";
|
|
153
|
+
this.start_date = start_date || new Date();
|
|
154
|
+
this.end_date = end_date || new Date();
|
|
155
|
+
this.assignment_allowance = assignment_allowance || null;
|
|
156
|
+
this.phone_number = phone_number || "";
|
|
157
|
+
this.reason_for_request = reason_for_request || "";
|
|
158
|
+
this.is_replaced = is_replaced || false;
|
|
159
|
+
this.replacement_employee_name = replacement_employee_name || null;
|
|
160
|
+
this.replacement_employee_id = replacement_employee_id || null;
|
|
161
|
+
this.replacement_civil_id_card_number = replacement_civil_id_card_number || null;
|
|
162
|
+
this.replacement_reason = replacement_reason || null;
|
|
163
|
+
this.replaced_by_user_id = replaced_by_user_id || null;
|
|
164
|
+
this.replaced_at = replaced_at || null;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
import { ITHelpDeskRequests } from './ITHelpDeskModel';
|
|
4
|
-
import { User } from './user';
|
|
5
|
-
|
|
6
|
-
@Entity({ name: 'it_request_chat' })
|
|
7
|
-
export class ITRequestChat extends BaseModel {
|
|
8
|
-
|
|
9
|
-
@Column({ type: 'integer', nullable: false })
|
|
10
|
-
request_id: number;
|
|
11
|
-
|
|
12
|
-
@ManyToOne(() => ITHelpDeskRequests)
|
|
13
|
-
@JoinColumn({ name: 'request_id' })
|
|
14
|
-
request: ITHelpDeskRequests;
|
|
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
|
-
user_id: number;
|
|
24
|
-
|
|
25
|
-
@ManyToOne(() => User)
|
|
26
|
-
@JoinColumn({ name: 'user_id' })
|
|
27
|
-
user: User;
|
|
28
|
-
|
|
29
|
-
@Column({ type: 'integer', nullable: true })
|
|
30
|
-
role_id: number | null;
|
|
31
|
-
|
|
32
|
-
@Column({ type: 'text', nullable: false })
|
|
33
|
-
message: string;
|
|
34
|
-
|
|
35
|
-
@Column({ type: 'text', nullable: true })
|
|
36
|
-
status: string | null;
|
|
37
|
-
|
|
38
|
-
@Column({ type: 'boolean', default: false })
|
|
39
|
-
is_internal: boolean;
|
|
40
|
-
|
|
41
|
-
constructor(
|
|
42
|
-
request_id: number,
|
|
43
|
-
user_id: number,
|
|
44
|
-
message: string,
|
|
45
|
-
is_internal?: boolean,
|
|
46
|
-
service_id?: number | null,
|
|
47
|
-
sub_service_id?: number | null,
|
|
48
|
-
role_id?: number | null,
|
|
49
|
-
status?: string | null
|
|
50
|
-
) {
|
|
51
|
-
super();
|
|
52
|
-
this.request_id = request_id;
|
|
53
|
-
this.service_id = service_id || null;
|
|
54
|
-
this.sub_service_id = sub_service_id || null;
|
|
55
|
-
this.user_id = user_id;
|
|
56
|
-
this.role_id = role_id || null;
|
|
57
|
-
this.message = message;
|
|
58
|
-
this.status = status || null;
|
|
59
|
-
this.is_internal = is_internal || false;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { ITHelpDeskRequests } from './ITHelpDeskModel';
|
|
4
|
+
import { User } from './user';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'it_request_chat' })
|
|
7
|
+
export class ITRequestChat extends BaseModel {
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'integer', nullable: false })
|
|
10
|
+
request_id: number;
|
|
11
|
+
|
|
12
|
+
@ManyToOne(() => ITHelpDeskRequests)
|
|
13
|
+
@JoinColumn({ name: 'request_id' })
|
|
14
|
+
request: ITHelpDeskRequests;
|
|
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
|
+
user_id: number;
|
|
24
|
+
|
|
25
|
+
@ManyToOne(() => User)
|
|
26
|
+
@JoinColumn({ name: 'user_id' })
|
|
27
|
+
user: User;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'integer', nullable: true })
|
|
30
|
+
role_id: number | null;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'text', nullable: false })
|
|
33
|
+
message: string;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'text', nullable: true })
|
|
36
|
+
status: string | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'boolean', default: false })
|
|
39
|
+
is_internal: boolean;
|
|
40
|
+
|
|
41
|
+
constructor(
|
|
42
|
+
request_id: number,
|
|
43
|
+
user_id: number,
|
|
44
|
+
message: string,
|
|
45
|
+
is_internal?: boolean,
|
|
46
|
+
service_id?: number | null,
|
|
47
|
+
sub_service_id?: number | null,
|
|
48
|
+
role_id?: number | null,
|
|
49
|
+
status?: string | null
|
|
50
|
+
) {
|
|
51
|
+
super();
|
|
52
|
+
this.request_id = request_id;
|
|
53
|
+
this.service_id = service_id || null;
|
|
54
|
+
this.sub_service_id = sub_service_id || null;
|
|
55
|
+
this.user_id = user_id;
|
|
56
|
+
this.role_id = role_id || null;
|
|
57
|
+
this.message = message;
|
|
58
|
+
this.status = status || null;
|
|
59
|
+
this.is_internal = is_internal || false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|