@platform-modules/civil-aviation-authority 2.3.2 → 2.3.4

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.
Files changed (30) hide show
  1. package/.env +20 -1
  2. package/dist/data-source.js +1 -11
  3. package/dist/index.d.ts +13 -0
  4. package/dist/index.js +20 -1
  5. package/dist/models/DutyMissionAirTicketDetailsModel.d.ts +20 -0
  6. package/dist/models/DutyMissionAirTicketDetailsModel.js +100 -0
  7. package/dist/models/DutyMissionApprovalModel.d.ts +23 -0
  8. package/dist/models/DutyMissionApprovalModel.js +96 -0
  9. package/dist/models/DutyMissionAttachmentModel.d.ts +12 -0
  10. package/dist/models/DutyMissionAttachmentModel.js +64 -0
  11. package/dist/models/DutyMissionChatModel.d.ts +19 -0
  12. package/dist/models/DutyMissionChatModel.js +77 -0
  13. package/dist/models/DutyMissionEmployeeDetailsModel.d.ts +17 -0
  14. package/dist/models/DutyMissionEmployeeDetailsModel.js +85 -0
  15. package/dist/models/DutyMissionRequestModel.d.ts +67 -0
  16. package/dist/models/DutyMissionRequestModel.js +252 -0
  17. package/dist/models/DutyMissionWorkflowModel.d.ts +18 -0
  18. package/dist/models/DutyMissionWorkflowModel.js +76 -0
  19. package/dist/models/Workflows.d.ts +0 -9
  20. package/package.json +1 -1
  21. package/src/data-source.ts +183 -181
  22. package/src/index.ts +109 -96
  23. package/src/models/DutyMissionAirTicketDetailsModel.ts +87 -0
  24. package/src/models/DutyMissionApprovalModel.ts +83 -0
  25. package/src/models/DutyMissionAttachmentModel.ts +51 -0
  26. package/src/models/DutyMissionChatModel.ts +65 -0
  27. package/src/models/DutyMissionEmployeeDetailsModel.ts +72 -0
  28. package/src/models/DutyMissionRequestModel.ts +239 -0
  29. package/src/models/DutyMissionWorkflowModel.ts +62 -0
  30. package/src/models/HrServiceRequestModel.ts +167 -167
@@ -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
+