@platform-modules/civil-aviation-authority 2.3.152 → 2.3.155
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 +8 -0
- package/dist/models/DocumentMetadataModel.d.ts +45 -0
- package/dist/models/DocumentMetadataModel.js +171 -0
- package/dist/models/DocumentationDepartmentsModel.d.ts +13 -0
- package/dist/models/DocumentationDepartmentsModel.js +53 -0
- package/dist/models/FolderModel.d.ts +16 -0
- package/dist/models/FolderModel.js +85 -0
- package/dist/models/LegalComplaintRequestModel.d.ts +101 -6
- package/dist/models/LegalComplaintRequestModel.js +257 -5
- package/dist/models/PermissionModel.d.ts +18 -0
- package/dist/models/PermissionModel.js +68 -0
- package/dist/models/UUIDBaseModel.d.ts +14 -0
- package/dist/models/UUIDBaseModel.js +66 -0
- package/package.json +1 -1
- package/src/models/AnnualTrainingPlanRequestModel.ts +153 -153
- package/src/models/DepartmentsModel.ts +25 -25
- package/src/models/DocumentDriveModel.ts +28 -28
- package/src/models/DocumentFolderModel.ts +45 -45
- package/src/models/HousingContractCancelChatModel.ts +56 -56
- package/src/models/HousingContractRenewalChatModel.ts +59 -59
- package/src/models/ITRequestChatModel.ts +62 -62
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/src/models/LegalComplaintRequestModel.ts +322 -8
- package/src/models/MissionTravelPassportExpiryNotificationConfigModel.ts +36 -36
- package/src/models/ResidentialUnitRentalChatModel.ts +56 -56
- package/src/models/ResidentialUnitRentalRequestModel.ts +218 -218
- package/src/models/ServicesNotificationConfigModel.ts +55 -55
- package/src/models/StudyLeaveRequestModel.ts +144 -144
- package/src/models/TrainingRoomBookingRequestModel.ts +142 -142
- package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
|
@@ -8,6 +8,260 @@ export enum LegalComplaintRequestStatus {
|
|
|
8
8
|
RFC = 'RFC',
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
/** Step 2 — Complaint details (individuals, time, incident date, location, events, other details). */
|
|
12
|
+
export interface LegalComplaintIncidentInput {
|
|
13
|
+
incident_time?: string | null;
|
|
14
|
+
/** Date of the incident (step 2); distinct from request `complaint_date` / `date` on the body. */
|
|
15
|
+
incident_date?: string | null;
|
|
16
|
+
incident_location?: string | null;
|
|
17
|
+
individuals_involved?: string | null;
|
|
18
|
+
/** Events / narrative (UI “Events”). */
|
|
19
|
+
incident_events?: string | null;
|
|
20
|
+
/** “Any other details related to complaint”. */
|
|
21
|
+
incident_other_details?: string | null;
|
|
22
|
+
/** Optional combined narrative; if omitted, parser may derive from events + other_details. */
|
|
23
|
+
incident_description?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Step 3 — Complainant: Name / Position / Employee ID / Directorate / Department / Section. */
|
|
27
|
+
export interface LegalComplaintComplainantInput {
|
|
28
|
+
name: string;
|
|
29
|
+
position?: string | null;
|
|
30
|
+
employee_id?: string | null;
|
|
31
|
+
directorate?: string | null;
|
|
32
|
+
department_id?: number | null;
|
|
33
|
+
section_id?: number | null;
|
|
34
|
+
/** When UI sends department as text instead of id. */
|
|
35
|
+
department_name?: string | null;
|
|
36
|
+
section_name?: string | null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Step 4 — Subject of complaint: Name / Position / Salary grade / Directorate / Department / Section. */
|
|
40
|
+
export interface LegalComplaintSubjectEmployeeInput {
|
|
41
|
+
name: string;
|
|
42
|
+
position?: string | null;
|
|
43
|
+
salary_grade?: string | null;
|
|
44
|
+
directorate?: string | null;
|
|
45
|
+
department_id?: number | null;
|
|
46
|
+
section_id?: number | null;
|
|
47
|
+
department_name?: string | null;
|
|
48
|
+
section_name?: string | null;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface LegalComplaintStructuredCreateFields {
|
|
52
|
+
incident_time: string | null;
|
|
53
|
+
incident_date: string | null;
|
|
54
|
+
incident_location: string | null;
|
|
55
|
+
individuals_involved: string | null;
|
|
56
|
+
incident_events: string | null;
|
|
57
|
+
incident_other_details: string | null;
|
|
58
|
+
incident_description: string;
|
|
59
|
+
complainant_name: string;
|
|
60
|
+
complainant_position: string | null;
|
|
61
|
+
complainant_employee_id: string | null;
|
|
62
|
+
complainant_directorate: string | null;
|
|
63
|
+
complainant_department_id: number | null;
|
|
64
|
+
complainant_department_name: string | null;
|
|
65
|
+
complainant_section_id: number | null;
|
|
66
|
+
complainant_section_name: string | null;
|
|
67
|
+
complained_employee_name: string;
|
|
68
|
+
complained_employee_position: string | null;
|
|
69
|
+
complained_employee_salary_grade: string | null;
|
|
70
|
+
complained_employee_directorate: string | null;
|
|
71
|
+
complained_employee_department_id: number | null;
|
|
72
|
+
complained_employee_department_name: string | null;
|
|
73
|
+
complained_employee_section_id: number | null;
|
|
74
|
+
complained_employee_section_name: string | null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type LegalComplaintCreateFieldParseResult =
|
|
78
|
+
| { ok: true; fields: LegalComplaintStructuredCreateFields }
|
|
79
|
+
| { ok: false; message: string };
|
|
80
|
+
|
|
81
|
+
function pickStr(v: unknown): string | null {
|
|
82
|
+
if (v == null || v === '') return null;
|
|
83
|
+
const s = String(v).trim();
|
|
84
|
+
return s === '' ? null : s;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function pickNum(v: unknown): number | null {
|
|
88
|
+
if (v == null || v === '') return null;
|
|
89
|
+
const n = Number(v);
|
|
90
|
+
return Number.isFinite(n) && n > 0 ? Math.floor(n) : null;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** YYYY-MM-DD or parseable date string; returns null if invalid. */
|
|
94
|
+
function pickDateOnlyStr(v: unknown): string | null {
|
|
95
|
+
if (v == null || v === '') return null;
|
|
96
|
+
const s = String(v).trim();
|
|
97
|
+
const iso = s.match(/^(\d{4}-\d{2}-\d{2})/);
|
|
98
|
+
if (iso) return iso[1];
|
|
99
|
+
const d = new Date(s);
|
|
100
|
+
if (Number.isNaN(d.getTime())) return null;
|
|
101
|
+
return d.toISOString().slice(0, 10);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function pickDepartmentSectionNames(
|
|
105
|
+
obj: Record<string, any>,
|
|
106
|
+
idKey: string,
|
|
107
|
+
altIdKey: string,
|
|
108
|
+
nameKey: string,
|
|
109
|
+
plainKey: string,
|
|
110
|
+
): { id: number | null; name: string | null } {
|
|
111
|
+
let id = pickNum(obj[idKey] ?? obj[altIdKey]);
|
|
112
|
+
let name = pickStr(obj[nameKey]);
|
|
113
|
+
const plain = obj[plainKey];
|
|
114
|
+
if (plain != null && plain !== '') {
|
|
115
|
+
if (typeof plain === 'number' || (typeof plain === 'string' && /^\d+$/.test(String(plain).trim()))) {
|
|
116
|
+
const n = pickNum(plain);
|
|
117
|
+
if (n != null && id == null) id = n;
|
|
118
|
+
} else {
|
|
119
|
+
const ps = pickStr(plain);
|
|
120
|
+
if (ps) name = name || ps;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return { id, name };
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Maps API / Conductor `requestData` to DB columns.
|
|
128
|
+
* Preferred: `complaint_incident`, `complainant`, `complained_employee` objects.
|
|
129
|
+
* Legacy: `complaint_details`, `complainant_details`, `complained_employee_details` non-empty strings.
|
|
130
|
+
*/
|
|
131
|
+
export function parseLegalComplaintCreateFields(body: Record<string, any>): LegalComplaintCreateFieldParseResult {
|
|
132
|
+
const legacyComplaint = body.complaint_details;
|
|
133
|
+
const legacyComplainant = body.complainant_details;
|
|
134
|
+
const legacySubject = body.complained_employee_details;
|
|
135
|
+
|
|
136
|
+
const inc = body.complaint_incident ?? body.complaintIncident;
|
|
137
|
+
let incident_time: string | null = null;
|
|
138
|
+
let incident_date: string | null = null;
|
|
139
|
+
let incident_location: string | null = null;
|
|
140
|
+
let individuals_involved: string | null = null;
|
|
141
|
+
let incident_events: string | null = null;
|
|
142
|
+
let incident_other_details: string | null = null;
|
|
143
|
+
let incident_description = '';
|
|
144
|
+
|
|
145
|
+
if (typeof legacyComplaint === 'string' && legacyComplaint.trim() !== '' && (inc == null || typeof inc !== 'object')) {
|
|
146
|
+
incident_description = legacyComplaint.trim();
|
|
147
|
+
} else if (inc != null && typeof inc === 'object' && !Array.isArray(inc)) {
|
|
148
|
+
incident_time = pickStr(inc.incident_time ?? inc.time);
|
|
149
|
+
incident_date = pickDateOnlyStr(inc.incident_date ?? inc.date_of_incident);
|
|
150
|
+
incident_location = pickStr(inc.incident_location ?? inc.location);
|
|
151
|
+
individuals_involved = pickStr(inc.individuals_involved ?? inc.persons_involved);
|
|
152
|
+
incident_events = pickStr(inc.incident_events ?? inc.events);
|
|
153
|
+
incident_other_details = pickStr(
|
|
154
|
+
inc.incident_other_details ?? inc.other_details ?? inc.any_other_details_related_to_complaint,
|
|
155
|
+
);
|
|
156
|
+
incident_description = String(inc.incident_description ?? inc.description ?? '').trim();
|
|
157
|
+
if (!incident_description) {
|
|
158
|
+
const parts = [incident_events, incident_other_details].filter((x) => x && String(x).trim()) as string[];
|
|
159
|
+
incident_description = parts.join('\n\n').trim();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (!incident_description) {
|
|
164
|
+
return {
|
|
165
|
+
ok: false,
|
|
166
|
+
message:
|
|
167
|
+
'complaint_incident must include incident_description, or incident_events / incident_other_details, or legacy complaint_details text',
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const comp = body.complainant;
|
|
172
|
+
let complainant_name = '';
|
|
173
|
+
let complainant_position: string | null = null;
|
|
174
|
+
let complainant_employee_id: string | null = null;
|
|
175
|
+
let complainant_directorate: string | null = null;
|
|
176
|
+
let complainant_department_id: number | null = null;
|
|
177
|
+
let complainant_department_name: string | null = null;
|
|
178
|
+
let complainant_section_id: number | null = null;
|
|
179
|
+
let complainant_section_name: string | null = null;
|
|
180
|
+
|
|
181
|
+
if (typeof legacyComplainant === 'string' && legacyComplainant.trim() !== '' && (comp == null || typeof comp !== 'object')) {
|
|
182
|
+
complainant_name = legacyComplainant.trim();
|
|
183
|
+
} else if (comp != null && typeof comp === 'object' && !Array.isArray(comp)) {
|
|
184
|
+
complainant_name = String(comp.name ?? '').trim();
|
|
185
|
+
complainant_position = pickStr(comp.position);
|
|
186
|
+
complainant_employee_id = pickStr(comp.employee_id ?? comp.employeeId);
|
|
187
|
+
complainant_directorate = pickStr(comp.directorate);
|
|
188
|
+
const dep = pickDepartmentSectionNames(comp, 'department_id', 'departmentId', 'department_name', 'department');
|
|
189
|
+
const sec = pickDepartmentSectionNames(comp, 'section_id', 'sectionId', 'section_name', 'section');
|
|
190
|
+
complainant_department_id = dep.id;
|
|
191
|
+
complainant_department_name = dep.name;
|
|
192
|
+
complainant_section_id = sec.id;
|
|
193
|
+
complainant_section_name = sec.name;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if (!complainant_name) {
|
|
197
|
+
return {
|
|
198
|
+
ok: false,
|
|
199
|
+
message: 'complainant.name is required (or legacy complainant_details text)',
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const sub = body.complained_employee ?? body.complainedEmployee;
|
|
204
|
+
let complained_employee_name = '';
|
|
205
|
+
let complained_employee_position: string | null = null;
|
|
206
|
+
let complained_employee_salary_grade: string | null = null;
|
|
207
|
+
let complained_employee_directorate: string | null = null;
|
|
208
|
+
let complained_employee_department_id: number | null = null;
|
|
209
|
+
let complained_employee_department_name: string | null = null;
|
|
210
|
+
let complained_employee_section_id: number | null = null;
|
|
211
|
+
let complained_employee_section_name: string | null = null;
|
|
212
|
+
|
|
213
|
+
if (typeof legacySubject === 'string' && legacySubject.trim() !== '' && (sub == null || typeof sub !== 'object')) {
|
|
214
|
+
complained_employee_name = legacySubject.trim();
|
|
215
|
+
} else if (sub != null && typeof sub === 'object' && !Array.isArray(sub)) {
|
|
216
|
+
complained_employee_name = String(sub.name ?? '').trim();
|
|
217
|
+
complained_employee_position = pickStr(sub.position);
|
|
218
|
+
complained_employee_salary_grade = pickStr(sub.salary_grade ?? sub.salaryGrade);
|
|
219
|
+
complained_employee_directorate = pickStr(sub.directorate);
|
|
220
|
+
const dep = pickDepartmentSectionNames(sub, 'department_id', 'departmentId', 'department_name', 'department');
|
|
221
|
+
const sec = pickDepartmentSectionNames(sub, 'section_id', 'sectionId', 'section_name', 'section');
|
|
222
|
+
complained_employee_department_id = dep.id;
|
|
223
|
+
complained_employee_department_name = dep.name;
|
|
224
|
+
complained_employee_section_id = sec.id;
|
|
225
|
+
complained_employee_section_name = sec.name;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if (!complained_employee_name) {
|
|
229
|
+
return {
|
|
230
|
+
ok: false,
|
|
231
|
+
message: 'complained_employee.name is required (or legacy complained_employee_details text)',
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
return {
|
|
236
|
+
ok: true,
|
|
237
|
+
fields: {
|
|
238
|
+
incident_time,
|
|
239
|
+
incident_date,
|
|
240
|
+
incident_location,
|
|
241
|
+
individuals_involved,
|
|
242
|
+
incident_events,
|
|
243
|
+
incident_other_details,
|
|
244
|
+
incident_description,
|
|
245
|
+
complainant_name,
|
|
246
|
+
complainant_position,
|
|
247
|
+
complainant_employee_id,
|
|
248
|
+
complainant_directorate,
|
|
249
|
+
complainant_department_id,
|
|
250
|
+
complainant_department_name,
|
|
251
|
+
complainant_section_id,
|
|
252
|
+
complainant_section_name,
|
|
253
|
+
complained_employee_name,
|
|
254
|
+
complained_employee_position,
|
|
255
|
+
complained_employee_salary_grade,
|
|
256
|
+
complained_employee_directorate,
|
|
257
|
+
complained_employee_department_id,
|
|
258
|
+
complained_employee_department_name,
|
|
259
|
+
complained_employee_section_id,
|
|
260
|
+
complained_employee_section_name,
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
|
|
11
265
|
@Entity({ name: 'legal_complaint_requests' })
|
|
12
266
|
export class LegalComplaintRequest extends BaseModel {
|
|
13
267
|
@Column({ type: 'date', nullable: false })
|
|
@@ -19,17 +273,77 @@ export class LegalComplaintRequest extends BaseModel {
|
|
|
19
273
|
@Column({ type: 'text', nullable: false })
|
|
20
274
|
description: string;
|
|
21
275
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
complaint_details: string;
|
|
276
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
277
|
+
incident_time: string | null;
|
|
25
278
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
279
|
+
@Column({ type: 'text', nullable: true })
|
|
280
|
+
incident_location: string | null;
|
|
281
|
+
|
|
282
|
+
@Column({ type: 'text', nullable: true })
|
|
283
|
+
individuals_involved: string | null;
|
|
284
|
+
|
|
285
|
+
/** Date of the incident (wizard step 2); request submission date remains `complaint_date`. */
|
|
286
|
+
@Column({ type: 'date', nullable: true })
|
|
287
|
+
incident_date: Date | null;
|
|
288
|
+
|
|
289
|
+
/** UI “Events”. */
|
|
290
|
+
@Column({ type: 'text', nullable: true })
|
|
291
|
+
incident_events: string | null;
|
|
292
|
+
|
|
293
|
+
/** “Any other details related to complaint”. */
|
|
294
|
+
@Column({ type: 'text', nullable: true })
|
|
295
|
+
incident_other_details: string | null;
|
|
29
296
|
|
|
30
|
-
/** Subject of complaint: Name / Position / Salary Grade / Directorate / Department / Section */
|
|
31
297
|
@Column({ type: 'text', nullable: false })
|
|
32
|
-
|
|
298
|
+
incident_description: string;
|
|
299
|
+
|
|
300
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
301
|
+
complainant_name: string;
|
|
302
|
+
|
|
303
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
304
|
+
complainant_position: string | null;
|
|
305
|
+
|
|
306
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
307
|
+
complainant_employee_id: string | null;
|
|
308
|
+
|
|
309
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
310
|
+
complainant_directorate: string | null;
|
|
311
|
+
|
|
312
|
+
@Column({ type: 'int', nullable: true })
|
|
313
|
+
complainant_department_id: number | null;
|
|
314
|
+
|
|
315
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
316
|
+
complainant_department_name: string | null;
|
|
317
|
+
|
|
318
|
+
@Column({ type: 'int', nullable: true })
|
|
319
|
+
complainant_section_id: number | null;
|
|
320
|
+
|
|
321
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
322
|
+
complainant_section_name: string | null;
|
|
323
|
+
|
|
324
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
325
|
+
complained_employee_name: string;
|
|
326
|
+
|
|
327
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
328
|
+
complained_employee_position: string | null;
|
|
329
|
+
|
|
330
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
331
|
+
complained_employee_salary_grade: string | null;
|
|
332
|
+
|
|
333
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
334
|
+
complained_employee_directorate: string | null;
|
|
335
|
+
|
|
336
|
+
@Column({ type: 'int', nullable: true })
|
|
337
|
+
complained_employee_department_id: number | null;
|
|
338
|
+
|
|
339
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
340
|
+
complained_employee_department_name: string | null;
|
|
341
|
+
|
|
342
|
+
@Column({ type: 'int', nullable: true })
|
|
343
|
+
complained_employee_section_id: number | null;
|
|
344
|
+
|
|
345
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
346
|
+
complained_employee_section_name: string | null;
|
|
33
347
|
|
|
34
348
|
@Column({ type: 'int', nullable: true })
|
|
35
349
|
req_user_department_id: number | null;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
@Entity({ name: "mission_travel_passport_expiry_notification_configs" })
|
|
6
|
-
export class MissionTravelPassportExpiryNotificationConfig extends BaseModel {
|
|
7
|
-
@Column({ type: "integer", nullable: false })
|
|
8
|
-
department_id: number;
|
|
9
|
-
|
|
10
|
-
@Column({ type: "integer", nullable: true })
|
|
11
|
-
section_id: number | null;
|
|
12
|
-
|
|
13
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
14
|
-
frequency: string | null;
|
|
15
|
-
|
|
16
|
-
@Column({ type: "integer", nullable: true })
|
|
17
|
-
repeat_interval_days: number | null; // Repeating after every N days (default 10)
|
|
18
|
-
|
|
19
|
-
@Column({ type: "boolean", nullable: false, default: true })
|
|
20
|
-
is_active: boolean;
|
|
21
|
-
|
|
22
|
-
constructor(
|
|
23
|
-
department_id: number,
|
|
24
|
-
section_id: number | null = null,
|
|
25
|
-
frequency: string | null = null,
|
|
26
|
-
repeat_interval_days: number = 10,
|
|
27
|
-
is_active: boolean = true
|
|
28
|
-
) {
|
|
29
|
-
super();
|
|
30
|
-
this.department_id = department_id;
|
|
31
|
-
this.section_id = section_id;
|
|
32
|
-
this.frequency = frequency;
|
|
33
|
-
this.repeat_interval_days = repeat_interval_days;
|
|
34
|
-
this.is_active = is_active;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@Entity({ name: "mission_travel_passport_expiry_notification_configs" })
|
|
6
|
+
export class MissionTravelPassportExpiryNotificationConfig extends BaseModel {
|
|
7
|
+
@Column({ type: "integer", nullable: false })
|
|
8
|
+
department_id: number;
|
|
9
|
+
|
|
10
|
+
@Column({ type: "integer", nullable: true })
|
|
11
|
+
section_id: number | null;
|
|
12
|
+
|
|
13
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
14
|
+
frequency: string | null;
|
|
15
|
+
|
|
16
|
+
@Column({ type: "integer", nullable: true })
|
|
17
|
+
repeat_interval_days: number | null; // Repeating after every N days (default 10)
|
|
18
|
+
|
|
19
|
+
@Column({ type: "boolean", nullable: false, default: true })
|
|
20
|
+
is_active: boolean;
|
|
21
|
+
|
|
22
|
+
constructor(
|
|
23
|
+
department_id: number,
|
|
24
|
+
section_id: number | null = null,
|
|
25
|
+
frequency: string | null = null,
|
|
26
|
+
repeat_interval_days: number = 10,
|
|
27
|
+
is_active: boolean = true
|
|
28
|
+
) {
|
|
29
|
+
super();
|
|
30
|
+
this.department_id = department_id;
|
|
31
|
+
this.section_id = section_id;
|
|
32
|
+
this.frequency = frequency;
|
|
33
|
+
this.repeat_interval_days = repeat_interval_days;
|
|
34
|
+
this.is_active = is_active;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
|
|
3
|
-
import { BaseModel } from "./BaseModel";
|
|
4
|
-
|
|
5
|
-
export enum ResidentialUnitRentalMessageType {
|
|
6
|
-
text = "text",
|
|
7
|
-
image = "image",
|
|
8
|
-
video = "video",
|
|
9
|
-
file = "file",
|
|
10
|
-
link = "link",
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export enum ResidentialUnitRentalChatStatus {
|
|
14
|
-
Pending = "Pending",
|
|
15
|
-
Received = "Received",
|
|
16
|
-
Approved = "Approved",
|
|
17
|
-
Rejected = "Rejected",
|
|
18
|
-
InProgress = "In Progress",
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@Entity({ name: "residential_unit_rental_chat" })
|
|
22
|
-
export class ResidentialUnitRentalChat extends BaseModel {
|
|
23
|
-
@Column({ type: "int", nullable: false })
|
|
24
|
-
request_id: number;
|
|
25
|
-
|
|
26
|
-
@Column({ type: "int", nullable: false })
|
|
27
|
-
service_id: number;
|
|
28
|
-
|
|
29
|
-
@Column({ type: "int", nullable: false })
|
|
30
|
-
sub_service_id: number;
|
|
31
|
-
|
|
32
|
-
@Column({ type: "int", nullable: false })
|
|
33
|
-
user_id: number;
|
|
34
|
-
|
|
35
|
-
@Column({ type: "text", nullable: false })
|
|
36
|
-
message: string;
|
|
37
|
-
|
|
38
|
-
@Column({ type: "int", nullable: true })
|
|
39
|
-
approver_role_id: number | null;
|
|
40
|
-
|
|
41
|
-
@Column({ type: "varchar", length: 255, nullable: false, default: "Pending" })
|
|
42
|
-
status: string;
|
|
43
|
-
|
|
44
|
-
@Column({ type: "varchar", length: 20, nullable: false })
|
|
45
|
-
message_type: string;
|
|
46
|
-
|
|
47
|
-
@Column({ type: "boolean", nullable: false, default: false })
|
|
48
|
-
is_internal: boolean;
|
|
49
|
-
|
|
50
|
-
@Column({ type: "int", nullable: false })
|
|
51
|
-
created_by: number;
|
|
52
|
-
|
|
53
|
-
constructor() {
|
|
54
|
-
super();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
|
|
3
|
+
import { BaseModel } from "./BaseModel";
|
|
4
|
+
|
|
5
|
+
export enum ResidentialUnitRentalMessageType {
|
|
6
|
+
text = "text",
|
|
7
|
+
image = "image",
|
|
8
|
+
video = "video",
|
|
9
|
+
file = "file",
|
|
10
|
+
link = "link",
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum ResidentialUnitRentalChatStatus {
|
|
14
|
+
Pending = "Pending",
|
|
15
|
+
Received = "Received",
|
|
16
|
+
Approved = "Approved",
|
|
17
|
+
Rejected = "Rejected",
|
|
18
|
+
InProgress = "In Progress",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@Entity({ name: "residential_unit_rental_chat" })
|
|
22
|
+
export class ResidentialUnitRentalChat extends BaseModel {
|
|
23
|
+
@Column({ type: "int", nullable: false })
|
|
24
|
+
request_id: number;
|
|
25
|
+
|
|
26
|
+
@Column({ type: "int", nullable: false })
|
|
27
|
+
service_id: number;
|
|
28
|
+
|
|
29
|
+
@Column({ type: "int", nullable: false })
|
|
30
|
+
sub_service_id: number;
|
|
31
|
+
|
|
32
|
+
@Column({ type: "int", nullable: false })
|
|
33
|
+
user_id: number;
|
|
34
|
+
|
|
35
|
+
@Column({ type: "text", nullable: false })
|
|
36
|
+
message: string;
|
|
37
|
+
|
|
38
|
+
@Column({ type: "int", nullable: true })
|
|
39
|
+
approver_role_id: number | null;
|
|
40
|
+
|
|
41
|
+
@Column({ type: "varchar", length: 255, nullable: false, default: "Pending" })
|
|
42
|
+
status: string;
|
|
43
|
+
|
|
44
|
+
@Column({ type: "varchar", length: 20, nullable: false })
|
|
45
|
+
message_type: string;
|
|
46
|
+
|
|
47
|
+
@Column({ type: "boolean", nullable: false, default: false })
|
|
48
|
+
is_internal: boolean;
|
|
49
|
+
|
|
50
|
+
@Column({ type: "int", nullable: false })
|
|
51
|
+
created_by: number;
|
|
52
|
+
|
|
53
|
+
constructor() {
|
|
54
|
+
super();
|
|
55
|
+
}
|
|
56
|
+
}
|