@platform-modules/civil-aviation-authority 2.2.324 → 2.2.999

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.
@@ -1,163 +0,0 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from "./BaseModel";
3
-
4
- export enum SecondmentRequestStatus {
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: "secondment_requests" })
14
- export class SecondmentRequest 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: SecondmentRequestStatus, default: SecondmentRequestStatus.PENDING, nullable: false })
37
- status: SecondmentRequestStatus;
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
- // Secondment 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
- original_department: string;
63
-
64
- @Column({ type: "varchar", length: 255, nullable: false })
65
- assigned_department: 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: "varchar", length: 20, nullable: false })
74
- phone_number: string;
75
-
76
- @Column({ type: "text", nullable: false })
77
- reason_for_request: string;
78
-
79
- // Replacement tracking fields
80
- @Column({ type: "boolean", default: false, nullable: false })
81
- is_replaced: boolean;
82
-
83
- @Column({ type: "varchar", length: 255, nullable: true })
84
- replacement_employee_name: string | null;
85
-
86
- @Column({ type: "varchar", length: 100, nullable: true })
87
- replacement_employee_id: string | null;
88
-
89
- @Column({ type: "varchar", length: 50, nullable: true })
90
- replacement_civil_id_card_number: string | null;
91
-
92
- @Column({ type: "text", nullable: true })
93
- replacement_reason: string | null;
94
-
95
- @Column({ type: "integer", nullable: true })
96
- replaced_by_user_id: number | null;
97
-
98
- @Column({ type: "timestamp", nullable: true })
99
- replaced_at: Date | null;
100
-
101
- constructor(
102
- user_id: number,
103
- status: SecondmentRequestStatus = SecondmentRequestStatus.PENDING,
104
- service_id?: number | null,
105
- sub_service_id?: number | null,
106
- req_user_department_id?: number | null,
107
- req_user_section_id?: number | null,
108
- req_user_position_id?: number | null,
109
- description?: string | null,
110
- reviewer_user_id?: number | null,
111
- assigned_to_user_id?: number | null,
112
- assigned_at?: Date | null,
113
- workflow_execution_id?: string | null,
114
- assigned_employee_name?: string,
115
- civil_id_card_number?: string | null,
116
- employee_id?: string,
117
- original_department?: string,
118
- assigned_department?: string,
119
- start_date?: Date,
120
- end_date?: Date,
121
- phone_number?: string,
122
- reason_for_request?: string,
123
- is_replaced?: boolean,
124
- replacement_employee_name?: string | null,
125
- replacement_employee_id?: string | null,
126
- replacement_civil_id_card_number?: string | null,
127
- replacement_reason?: string | null,
128
- replaced_by_user_id?: number | null,
129
- replaced_at?: Date | null
130
- ) {
131
- super();
132
- this.user_id = user_id;
133
- this.status = status;
134
- this.service_id = service_id || null;
135
- this.sub_service_id = sub_service_id || null;
136
- this.req_user_department_id = req_user_department_id || null;
137
- this.req_user_section_id = req_user_section_id || null;
138
- this.req_user_position_id = req_user_position_id || null;
139
- this.description = description || null;
140
- this.reviewer_user_id = reviewer_user_id || null;
141
- this.assigned_to_user_id = assigned_to_user_id || null;
142
- this.assigned_at = assigned_at || null;
143
- this.workflow_execution_id = workflow_execution_id || null;
144
- this.assigned_employee_name = assigned_employee_name || "";
145
- this.civil_id_card_number = civil_id_card_number || null;
146
- this.employee_id = employee_id || "";
147
- this.original_department = original_department || "";
148
- this.assigned_department = assigned_department || "";
149
- this.start_date = start_date || new Date();
150
- this.end_date = end_date || new Date();
151
- this.phone_number = phone_number || "";
152
- this.reason_for_request = reason_for_request || "";
153
- this.is_replaced = is_replaced || false;
154
- this.replacement_employee_name = replacement_employee_name || null;
155
- this.replacement_employee_id = replacement_employee_id || null;
156
- this.replacement_civil_id_card_number = replacement_civil_id_card_number || null;
157
- this.replacement_reason = replacement_reason || null;
158
- this.replaced_by_user_id = replaced_by_user_id || null;
159
- this.replaced_at = replaced_at || null;
160
- }
161
- }
162
-
163
-