@platform-modules/civil-aviation-authority 2.3.8 → 2.3.10

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 CHANGED
@@ -1,17 +1,12 @@
1
- # DB_HOST=localhost
2
- # DB_PORT=5433
3
- # DB_USER=postgres
4
- # DB_PASS=123
1
+ # DB_HOST=164.52.222.169
2
+ # DB_PORT=5432
3
+ # DB_USER=postgres_admin_user
4
+ # DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
5
5
  # DB_NAME=CAA
6
6
 
7
- DB_HOST=164.52.222.169
8
- DB_PORT=5432
9
- DB_USER=postgres_admin_user
10
- DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
11
- DB_NAME=CAA
12
7
 
13
- # DB_HOST=216.48.187.46
14
- # DB_PORT=5432
15
- # DB_USER=adminuser
16
- # DB_PASS=postgres_caa_fm_qa_34567
17
- # DB_NAME=CAA_QA
8
+ DB_HOST=localhost
9
+ DB_PORT=5432
10
+ DB_USER=postgres
11
+ DB_PASS=stevejobs
12
+ DB_NAME=CAA
@@ -27,7 +27,8 @@ export declare class SecondmentRequest extends BaseModel {
27
27
  assigned_job_position: string;
28
28
  original_department_id: number;
29
29
  assigned_department_id: number;
30
- entity: string | null;
30
+ from_entity: string | null;
31
+ to_entity: string | null;
31
32
  start_date: Date;
32
33
  end_date: Date;
33
34
  phone_number: string;
@@ -39,5 +40,5 @@ export declare class SecondmentRequest extends BaseModel {
39
40
  replacement_reason: string | null;
40
41
  replaced_by_user_id: number | null;
41
42
  replaced_at: Date | null;
42
- constructor(user_id: number, status?: SecondmentRequestStatus, 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, original_department_id?: number, assigned_department_id?: number, entity?: string | null, start_date?: Date, end_date?: Date, phone_number?: string, reason_for_request?: string, is_replaced?: boolean, replacement_employee_name?: string | null, replacement_employee_id?: string | null, replacement_civil_id_card_number?: string | null, replacement_reason?: string | null, replaced_by_user_id?: number | null, replaced_at?: Date | null);
43
+ constructor(user_id: number, status?: SecondmentRequestStatus, 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, original_department_id?: number, assigned_department_id?: number, from_entity?: string | null, to_entity?: string | null, start_date?: Date, end_date?: Date, phone_number?: string, reason_for_request?: string, is_replaced?: boolean, replacement_employee_name?: string | null, replacement_employee_id?: string | null, replacement_civil_id_card_number?: string | null, replacement_reason?: string | null, replaced_by_user_id?: number | null, replaced_at?: Date | null);
43
44
  }
@@ -22,7 +22,7 @@ var SecondmentRequestStatus;
22
22
  SecondmentRequestStatus["REJECTED"] = "Rejected";
23
23
  })(SecondmentRequestStatus || (exports.SecondmentRequestStatus = SecondmentRequestStatus = {}));
24
24
  let SecondmentRequest = class SecondmentRequest extends BaseModel_1.BaseModel {
25
- constructor(user_id, status = SecondmentRequestStatus.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, original_department_id, assigned_department_id, entity, start_date, end_date, phone_number, reason_for_request, is_replaced, replacement_employee_name, replacement_employee_id, replacement_civil_id_card_number, replacement_reason, replaced_by_user_id, replaced_at) {
25
+ constructor(user_id, status = SecondmentRequestStatus.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, original_department_id, assigned_department_id, from_entity, to_entity, start_date, end_date, phone_number, reason_for_request, is_replaced, replacement_employee_name, replacement_employee_id, replacement_civil_id_card_number, replacement_reason, replaced_by_user_id, replaced_at) {
26
26
  super();
27
27
  this.user_id = user_id;
28
28
  this.status = status;
@@ -43,7 +43,8 @@ let SecondmentRequest = class SecondmentRequest extends BaseModel_1.BaseModel {
43
43
  this.assigned_job_position = assigned_job_position || "";
44
44
  this.original_department_id = original_department_id || 0;
45
45
  this.assigned_department_id = assigned_department_id || 0;
46
- this.entity = entity || null;
46
+ this.from_entity = from_entity || null;
47
+ this.to_entity = to_entity || null;
47
48
  this.start_date = start_date || new Date();
48
49
  this.end_date = end_date || new Date();
49
50
  this.phone_number = phone_number || "";
@@ -137,7 +138,11 @@ __decorate([
137
138
  __decorate([
138
139
  (0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
139
140
  __metadata("design:type", Object)
140
- ], SecondmentRequest.prototype, "entity", void 0);
141
+ ], SecondmentRequest.prototype, "from_entity", void 0);
142
+ __decorate([
143
+ (0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
144
+ __metadata("design:type", Object)
145
+ ], SecondmentRequest.prototype, "to_entity", void 0);
141
146
  __decorate([
142
147
  (0, typeorm_1.Column)({ type: "date", nullable: false }),
143
148
  __metadata("design:type", Date)
@@ -184,6 +189,6 @@ __decorate([
184
189
  ], SecondmentRequest.prototype, "replaced_at", void 0);
185
190
  exports.SecondmentRequest = SecondmentRequest = __decorate([
186
191
  (0, typeorm_1.Entity)({ name: "secondment_requests" }),
187
- __metadata("design:paramtypes", [Number, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, String, Object, String, String, String, Number, Number, Object, Date,
192
+ __metadata("design:paramtypes", [Number, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, String, Object, String, String, String, Number, Number, Object, Object, Date,
188
193
  Date, String, String, Boolean, Object, Object, Object, Object, Object, Object])
189
194
  ], SecondmentRequest);
@@ -31,7 +31,8 @@ export declare class TemporaryAssignmentRequest extends BaseModel {
31
31
  assigned_job_position: string;
32
32
  original_department_id: number;
33
33
  assigned_department_id: number;
34
- entity: string | null;
34
+ from_entity: string | null;
35
+ to_entity: string | null;
35
36
  start_date: Date;
36
37
  end_date: Date;
37
38
  phone_number: string;
@@ -45,5 +46,5 @@ export declare class TemporaryAssignmentRequest extends BaseModel {
45
46
  replacement_reason: string | null;
46
47
  replaced_by_user_id: number | null;
47
48
  replaced_at: Date | null;
48
- constructor(user_id: number, status?: TemporaryAssignmentRequestStatus, 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, original_department_id?: number, assigned_department_id?: number, entity?: string | null, start_date?: Date, end_date?: Date, phone_number?: string, reason_for_request?: string, salary_payment_source?: SalaryPaymentSource, social_service_fund_contribution?: string | null, is_replaced?: boolean, replacement_employee_name?: string | null, replacement_employee_id?: string | null, replacement_civil_id_card_number?: string | null, replacement_reason?: string | null, replaced_by_user_id?: number | null, replaced_at?: Date | null);
49
+ constructor(user_id: number, status?: TemporaryAssignmentRequestStatus, 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, original_department_id?: number, assigned_department_id?: number, from_entity?: string | null, to_entity?: string | null, start_date?: Date, end_date?: Date, phone_number?: string, reason_for_request?: string, salary_payment_source?: SalaryPaymentSource, social_service_fund_contribution?: string | null, is_replaced?: boolean, replacement_employee_name?: string | null, replacement_employee_id?: string | null, replacement_civil_id_card_number?: string | null, replacement_reason?: string | null, replaced_by_user_id?: number | null, replaced_at?: Date | null);
49
50
  }
@@ -27,7 +27,7 @@ var SalaryPaymentSource;
27
27
  SalaryPaymentSource["OTHER_ENTITY"] = "Other Entity";
28
28
  })(SalaryPaymentSource || (exports.SalaryPaymentSource = SalaryPaymentSource = {}));
29
29
  let TemporaryAssignmentRequest = class TemporaryAssignmentRequest extends BaseModel_1.BaseModel {
30
- constructor(user_id, status = TemporaryAssignmentRequestStatus.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, original_department_id, assigned_department_id, entity, start_date, end_date, phone_number, reason_for_request, salary_payment_source, social_service_fund_contribution, is_replaced, replacement_employee_name, replacement_employee_id, replacement_civil_id_card_number, replacement_reason, replaced_by_user_id, replaced_at) {
30
+ constructor(user_id, status = TemporaryAssignmentRequestStatus.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, original_department_id, assigned_department_id, from_entity, to_entity, start_date, end_date, phone_number, reason_for_request, salary_payment_source, social_service_fund_contribution, is_replaced, replacement_employee_name, replacement_employee_id, replacement_civil_id_card_number, replacement_reason, replaced_by_user_id, replaced_at) {
31
31
  super();
32
32
  this.user_id = user_id;
33
33
  this.status = status;
@@ -48,7 +48,8 @@ let TemporaryAssignmentRequest = class TemporaryAssignmentRequest extends BaseMo
48
48
  this.assigned_job_position = assigned_job_position || "";
49
49
  this.original_department_id = original_department_id || 0;
50
50
  this.assigned_department_id = assigned_department_id || 0;
51
- this.entity = entity || null;
51
+ this.from_entity = from_entity || null;
52
+ this.to_entity = to_entity || null;
52
53
  this.start_date = start_date || new Date();
53
54
  this.end_date = end_date || new Date();
54
55
  this.phone_number = phone_number || "";
@@ -144,7 +145,11 @@ __decorate([
144
145
  __decorate([
145
146
  (0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
146
147
  __metadata("design:type", Object)
147
- ], TemporaryAssignmentRequest.prototype, "entity", void 0);
148
+ ], TemporaryAssignmentRequest.prototype, "from_entity", void 0);
149
+ __decorate([
150
+ (0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
151
+ __metadata("design:type", Object)
152
+ ], TemporaryAssignmentRequest.prototype, "to_entity", void 0);
148
153
  __decorate([
149
154
  (0, typeorm_1.Column)({ type: "date", nullable: false }),
150
155
  __metadata("design:type", Date)
@@ -199,6 +204,6 @@ __decorate([
199
204
  ], TemporaryAssignmentRequest.prototype, "replaced_at", void 0);
200
205
  exports.TemporaryAssignmentRequest = TemporaryAssignmentRequest = __decorate([
201
206
  (0, typeorm_1.Entity)({ name: "temporary_assignment_requests" }),
202
- __metadata("design:paramtypes", [Number, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, String, Object, String, String, String, Number, Number, Object, Date,
207
+ __metadata("design:paramtypes", [Number, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, String, Object, String, String, String, Number, Number, Object, Object, Date,
203
208
  Date, String, String, String, Object, Boolean, Object, Object, Object, Object, Object, Object])
204
209
  ], TemporaryAssignmentRequest);
@@ -0,0 +1,9 @@
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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.3.8",
3
+ "version": "2.3.10",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -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
+
@@ -71,7 +71,10 @@ export class SecondmentRequest extends BaseModel {
71
71
  assigned_department_id: number;
72
72
 
73
73
  @Column({ type: "varchar", length: 500, nullable: true })
74
- entity: string | null;
74
+ from_entity: string | null;
75
+
76
+ @Column({ type: "varchar", length: 500, nullable: true })
77
+ to_entity: string | null;
75
78
 
76
79
  @Column({ type: "date", nullable: false })
77
80
  start_date: Date;
@@ -127,7 +130,8 @@ export class SecondmentRequest extends BaseModel {
127
130
  assigned_job_position?: string,
128
131
  original_department_id?: number,
129
132
  assigned_department_id?: number,
130
- entity?: string | null,
133
+ from_entity?: string | null,
134
+ to_entity?: string | null,
131
135
  start_date?: Date,
132
136
  end_date?: Date,
133
137
  phone_number?: string,
@@ -160,7 +164,8 @@ export class SecondmentRequest extends BaseModel {
160
164
  this.assigned_job_position = assigned_job_position || "";
161
165
  this.original_department_id = original_department_id || 0;
162
166
  this.assigned_department_id = assigned_department_id || 0;
163
- this.entity = entity || null;
167
+ this.from_entity = from_entity || null;
168
+ this.to_entity = to_entity || null;
164
169
  this.start_date = start_date || new Date();
165
170
  this.end_date = end_date || new Date();
166
171
  this.phone_number = phone_number || "";
@@ -76,7 +76,10 @@ export class TemporaryAssignmentRequest extends BaseModel {
76
76
  assigned_department_id: number;
77
77
 
78
78
  @Column({ type: "varchar", length: 500, nullable: true })
79
- entity: string | null;
79
+ from_entity: string | null;
80
+
81
+ @Column({ type: "varchar", length: 500, nullable: true })
82
+ to_entity: string | null;
80
83
 
81
84
  @Column({ type: "date", nullable: false })
82
85
  start_date: Date;
@@ -139,7 +142,8 @@ export class TemporaryAssignmentRequest extends BaseModel {
139
142
  assigned_job_position?: string,
140
143
  original_department_id?: number,
141
144
  assigned_department_id?: number,
142
- entity?: string | null,
145
+ from_entity?: string | null,
146
+ to_entity?: string | null,
143
147
  start_date?: Date,
144
148
  end_date?: Date,
145
149
  phone_number?: string,
@@ -174,7 +178,8 @@ export class TemporaryAssignmentRequest extends BaseModel {
174
178
  this.assigned_job_position = assigned_job_position || "";
175
179
  this.original_department_id = original_department_id || 0;
176
180
  this.assigned_department_id = assigned_department_id || 0;
177
- this.entity = entity || null;
181
+ this.from_entity = from_entity || null;
182
+ this.to_entity = to_entity || null;
178
183
  this.start_date = start_date || new Date();
179
184
  this.end_date = end_date || new Date();
180
185
  this.phone_number = phone_number || "";