@platform-modules/civil-aviation-authority 2.3.183 → 2.3.185
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 +9 -17
- package/dist/data-source.js +5 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -2
- 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/RequestATenderRequestModel.d.ts +37 -0
- package/dist/models/RequestATenderRequestModel.js +143 -0
- package/dist/models/RequestTenderAnalysisRequestModel.d.ts +22 -0
- package/dist/models/RequestTenderAnalysisRequestModel.js +98 -0
- package/dist/models/RespondToEnquiriesRequestModel.d.ts +1 -7
- package/dist/models/RespondToEnquiriesRequestModel.js +3 -20
- package/dist/models/Workflows.d.ts +9 -0
- package/dist/models/Workflows.js +31 -0
- package/package.json +24 -24
- package/src/data-source.ts +5 -1
- package/src/index.ts +414 -413
- package/src/models/AccommodationApprovalModel.ts +8 -8
- package/src/models/AccommodationRequestModel.ts +8 -8
- package/src/models/AirportEntryPermitModel.ts +276 -276
- package/src/models/AnnualIncrementRequestEmployeeModel.ts +65 -65
- package/src/models/AnnualIncrementRequestModel.ts +25 -25
- package/src/models/AnnualTrainingPlanRequestModel.ts +153 -153
- package/src/models/AppealAgainstAdministrativeDecisionRequestModel.ts +23 -23
- package/src/models/CAAServices.ts +33 -33
- package/src/models/CAASubServices.ts +33 -33
- package/src/models/CAIRatingMasterModel.ts +39 -39
- package/src/models/CSRMBusinessImpactRatingMasterModel.ts +25 -25
- package/src/models/CSRMLikelihoodMasterModel.ts +25 -25
- package/src/models/CashAllowanceLeaveRequestModel.ts +11 -11
- 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/HrServiceRequestModel.ts +193 -193
- package/src/models/ITRequestAttachmentModel.ts +73 -73
- package/src/models/ITRequestChatModel.ts +74 -74
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/src/models/MissionTravelPassportExpiryNotificationConfigModel.ts +36 -36
- package/src/models/PerformanceCyclePeriodModel.ts +26 -26
- package/src/models/PerformanceGoalMasterModel.ts +27 -27
- package/src/models/PerformanceManagementRequestGoalModel.ts +46 -46
- package/src/models/PerformanceManagementRequestModel.ts +14 -14
- package/src/models/PromotionRequestModel.ts +11 -11
- package/src/models/RequestATenderRequestModel.ts +102 -0
- package/src/models/RequestTenderAnalysisRequestModel.ts +65 -0
- package/src/models/ResidentialUnitRentalChatModel.ts +56 -56
- package/src/models/ResidentialUnitRentalRequestModel.ts +218 -218
- package/src/models/RespondToEnquiriesRequestModel.ts +31 -48
- package/src/models/ServicesNotificationConfigModel.ts +55 -55
- package/src/models/StudyLeaveRequestModel.ts +144 -144
- package/src/models/TrainingRequestModel.ts +164 -164
- package/src/models/TrainingRoomBookingRequestModel.ts +142 -142
- package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
- package/src/models/UserSkillModel.ts +56 -56
- package/dist/models/DocumentMetadataModel.d.ts +0 -45
- package/dist/models/DocumentMetadataModel.js +0 -171
- package/dist/models/DocumentationDepartmentsModel.d.ts +0 -13
- package/dist/models/DocumentationDepartmentsModel.js +0 -53
- package/dist/models/FolderModel.d.ts +0 -16
- package/dist/models/FolderModel.js +0 -85
- package/dist/models/PermissionModel.d.ts +0 -18
- package/dist/models/PermissionModel.js +0 -68
- package/dist/models/UUIDBaseModel.d.ts +0 -14
- package/dist/models/UUIDBaseModel.js +0 -66
|
@@ -1,144 +1,144 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
export enum StudyLeaveRequestStatus {
|
|
5
|
-
PENDING = "Pending",
|
|
6
|
-
IN_PROGRESS = "In Progress",
|
|
7
|
-
COMPLETED = "Completed",
|
|
8
|
-
APPROVED = "Approved",
|
|
9
|
-
REJECTED = "Rejected"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@Entity({ name: "study_leave_requests" })
|
|
13
|
-
export class StudyLeaveRequest extends BaseModel {
|
|
14
|
-
@Column({ type: "integer", nullable: true })
|
|
15
|
-
req_user_department_id: number | null;
|
|
16
|
-
|
|
17
|
-
@Column({ type: "integer", nullable: true })
|
|
18
|
-
req_user_section_id: number | null;
|
|
19
|
-
|
|
20
|
-
@Column({ type: "integer", nullable: true })
|
|
21
|
-
req_user_position_id: number | null;
|
|
22
|
-
|
|
23
|
-
@Column({ type: "integer", nullable: true })
|
|
24
|
-
service_id: number | null;
|
|
25
|
-
|
|
26
|
-
@Column({ type: "integer", nullable: true })
|
|
27
|
-
sub_service_id: number | null;
|
|
28
|
-
|
|
29
|
-
@Column({ type: "integer", nullable: false })
|
|
30
|
-
user_id: number;
|
|
31
|
-
|
|
32
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
33
|
-
course_name: string;
|
|
34
|
-
|
|
35
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
36
|
-
institute_name: string;
|
|
37
|
-
|
|
38
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
39
|
-
duration_of_course: string | null;
|
|
40
|
-
|
|
41
|
-
@Column({ type: "date", nullable: false })
|
|
42
|
-
course_start_date: Date;
|
|
43
|
-
|
|
44
|
-
@Column({ type: "date", nullable: false })
|
|
45
|
-
course_end_date: Date;
|
|
46
|
-
|
|
47
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
48
|
-
location: string;
|
|
49
|
-
|
|
50
|
-
@Column({ type: "text", nullable: false })
|
|
51
|
-
description: string;
|
|
52
|
-
|
|
53
|
-
@Column({
|
|
54
|
-
type: "enum",
|
|
55
|
-
enum: StudyLeaveRequestStatus,
|
|
56
|
-
default: StudyLeaveRequestStatus.PENDING,
|
|
57
|
-
nullable: false
|
|
58
|
-
})
|
|
59
|
-
status: StudyLeaveRequestStatus;
|
|
60
|
-
|
|
61
|
-
@Column({ type: "integer", nullable: true })
|
|
62
|
-
reviewer_user_id: number | null;
|
|
63
|
-
|
|
64
|
-
@Column({ type: "integer", nullable: true })
|
|
65
|
-
assigned_to_user_id: number | null;
|
|
66
|
-
|
|
67
|
-
@Column({ type: "timestamp", nullable: true })
|
|
68
|
-
assigned_at: Date | null;
|
|
69
|
-
|
|
70
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
71
|
-
workflow_execution_id: string | null;
|
|
72
|
-
|
|
73
|
-
@Column({ type: "boolean", default: false, nullable: true })
|
|
74
|
-
already_submitted_in_ministry_of_education_system: boolean | null;
|
|
75
|
-
|
|
76
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
77
|
-
area_name: string | null;
|
|
78
|
-
|
|
79
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
80
|
-
country_name: string | null;
|
|
81
|
-
|
|
82
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
83
|
-
qualification_required: string | null;
|
|
84
|
-
|
|
85
|
-
@Column({ type: "boolean", default: false, nullable: true })
|
|
86
|
-
have_you_ever_received_authority: boolean | null;
|
|
87
|
-
|
|
88
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
89
|
-
scholarship: string | null;
|
|
90
|
-
|
|
91
|
-
constructor(
|
|
92
|
-
user_id: number,
|
|
93
|
-
course_name: string,
|
|
94
|
-
institute_name: string,
|
|
95
|
-
course_start_date: Date,
|
|
96
|
-
course_end_date: Date,
|
|
97
|
-
location: string,
|
|
98
|
-
description: string,
|
|
99
|
-
status: StudyLeaveRequestStatus = StudyLeaveRequestStatus.PENDING,
|
|
100
|
-
service_id?: number | null,
|
|
101
|
-
sub_service_id?: number | null,
|
|
102
|
-
req_user_department_id?: number | null,
|
|
103
|
-
req_user_section_id?: number | null,
|
|
104
|
-
req_user_position_id?: number | null,
|
|
105
|
-
duration_of_course?: string | null,
|
|
106
|
-
reviewer_user_id?: number | null,
|
|
107
|
-
assigned_to_user_id?: number | null,
|
|
108
|
-
assigned_at?: Date | null,
|
|
109
|
-
workflow_execution_id?: string | null,
|
|
110
|
-
already_submitted_in_ministry_of_education_system?: boolean | null,
|
|
111
|
-
area_name?: string | null,
|
|
112
|
-
country_name?: string | null,
|
|
113
|
-
qualification_required?: string | null,
|
|
114
|
-
have_you_ever_received_authority?: boolean | null,
|
|
115
|
-
scholarship?: string | null
|
|
116
|
-
) {
|
|
117
|
-
super();
|
|
118
|
-
this.user_id = user_id;
|
|
119
|
-
this.course_name = course_name;
|
|
120
|
-
this.institute_name = institute_name;
|
|
121
|
-
this.course_start_date = course_start_date;
|
|
122
|
-
this.course_end_date = course_end_date;
|
|
123
|
-
this.location = location;
|
|
124
|
-
this.description = description;
|
|
125
|
-
this.status = status;
|
|
126
|
-
this.service_id = service_id || null;
|
|
127
|
-
this.sub_service_id = sub_service_id || null;
|
|
128
|
-
this.req_user_department_id = req_user_department_id || null;
|
|
129
|
-
this.req_user_section_id = req_user_section_id || null;
|
|
130
|
-
this.req_user_position_id = req_user_position_id || null;
|
|
131
|
-
this.duration_of_course = duration_of_course || null;
|
|
132
|
-
this.reviewer_user_id = reviewer_user_id || null;
|
|
133
|
-
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
134
|
-
this.assigned_at = assigned_at || null;
|
|
135
|
-
this.workflow_execution_id = workflow_execution_id || null;
|
|
136
|
-
this.already_submitted_in_ministry_of_education_system = already_submitted_in_ministry_of_education_system ?? null;
|
|
137
|
-
this.area_name = area_name ?? null;
|
|
138
|
-
this.country_name = country_name ?? null;
|
|
139
|
-
this.qualification_required = qualification_required ?? null;
|
|
140
|
-
this.have_you_ever_received_authority = have_you_ever_received_authority ?? null;
|
|
141
|
-
this.scholarship = scholarship ?? null;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum StudyLeaveRequestStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
IN_PROGRESS = "In Progress",
|
|
7
|
+
COMPLETED = "Completed",
|
|
8
|
+
APPROVED = "Approved",
|
|
9
|
+
REJECTED = "Rejected"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Entity({ name: "study_leave_requests" })
|
|
13
|
+
export class StudyLeaveRequest extends BaseModel {
|
|
14
|
+
@Column({ type: "integer", nullable: true })
|
|
15
|
+
req_user_department_id: number | null;
|
|
16
|
+
|
|
17
|
+
@Column({ type: "integer", nullable: true })
|
|
18
|
+
req_user_section_id: number | null;
|
|
19
|
+
|
|
20
|
+
@Column({ type: "integer", nullable: true })
|
|
21
|
+
req_user_position_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: "integer", nullable: true })
|
|
24
|
+
service_id: number | null;
|
|
25
|
+
|
|
26
|
+
@Column({ type: "integer", nullable: true })
|
|
27
|
+
sub_service_id: number | null;
|
|
28
|
+
|
|
29
|
+
@Column({ type: "integer", nullable: false })
|
|
30
|
+
user_id: number;
|
|
31
|
+
|
|
32
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
33
|
+
course_name: string;
|
|
34
|
+
|
|
35
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
36
|
+
institute_name: string;
|
|
37
|
+
|
|
38
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
39
|
+
duration_of_course: string | null;
|
|
40
|
+
|
|
41
|
+
@Column({ type: "date", nullable: false })
|
|
42
|
+
course_start_date: Date;
|
|
43
|
+
|
|
44
|
+
@Column({ type: "date", nullable: false })
|
|
45
|
+
course_end_date: Date;
|
|
46
|
+
|
|
47
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
48
|
+
location: string;
|
|
49
|
+
|
|
50
|
+
@Column({ type: "text", nullable: false })
|
|
51
|
+
description: string;
|
|
52
|
+
|
|
53
|
+
@Column({
|
|
54
|
+
type: "enum",
|
|
55
|
+
enum: StudyLeaveRequestStatus,
|
|
56
|
+
default: StudyLeaveRequestStatus.PENDING,
|
|
57
|
+
nullable: false
|
|
58
|
+
})
|
|
59
|
+
status: StudyLeaveRequestStatus;
|
|
60
|
+
|
|
61
|
+
@Column({ type: "integer", nullable: true })
|
|
62
|
+
reviewer_user_id: number | null;
|
|
63
|
+
|
|
64
|
+
@Column({ type: "integer", nullable: true })
|
|
65
|
+
assigned_to_user_id: number | null;
|
|
66
|
+
|
|
67
|
+
@Column({ type: "timestamp", nullable: true })
|
|
68
|
+
assigned_at: Date | null;
|
|
69
|
+
|
|
70
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
71
|
+
workflow_execution_id: string | null;
|
|
72
|
+
|
|
73
|
+
@Column({ type: "boolean", default: false, nullable: true })
|
|
74
|
+
already_submitted_in_ministry_of_education_system: boolean | null;
|
|
75
|
+
|
|
76
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
77
|
+
area_name: string | null;
|
|
78
|
+
|
|
79
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
80
|
+
country_name: string | null;
|
|
81
|
+
|
|
82
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
83
|
+
qualification_required: string | null;
|
|
84
|
+
|
|
85
|
+
@Column({ type: "boolean", default: false, nullable: true })
|
|
86
|
+
have_you_ever_received_authority: boolean | null;
|
|
87
|
+
|
|
88
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
89
|
+
scholarship: string | null;
|
|
90
|
+
|
|
91
|
+
constructor(
|
|
92
|
+
user_id: number,
|
|
93
|
+
course_name: string,
|
|
94
|
+
institute_name: string,
|
|
95
|
+
course_start_date: Date,
|
|
96
|
+
course_end_date: Date,
|
|
97
|
+
location: string,
|
|
98
|
+
description: string,
|
|
99
|
+
status: StudyLeaveRequestStatus = StudyLeaveRequestStatus.PENDING,
|
|
100
|
+
service_id?: number | null,
|
|
101
|
+
sub_service_id?: number | null,
|
|
102
|
+
req_user_department_id?: number | null,
|
|
103
|
+
req_user_section_id?: number | null,
|
|
104
|
+
req_user_position_id?: number | null,
|
|
105
|
+
duration_of_course?: string | null,
|
|
106
|
+
reviewer_user_id?: number | null,
|
|
107
|
+
assigned_to_user_id?: number | null,
|
|
108
|
+
assigned_at?: Date | null,
|
|
109
|
+
workflow_execution_id?: string | null,
|
|
110
|
+
already_submitted_in_ministry_of_education_system?: boolean | null,
|
|
111
|
+
area_name?: string | null,
|
|
112
|
+
country_name?: string | null,
|
|
113
|
+
qualification_required?: string | null,
|
|
114
|
+
have_you_ever_received_authority?: boolean | null,
|
|
115
|
+
scholarship?: string | null
|
|
116
|
+
) {
|
|
117
|
+
super();
|
|
118
|
+
this.user_id = user_id;
|
|
119
|
+
this.course_name = course_name;
|
|
120
|
+
this.institute_name = institute_name;
|
|
121
|
+
this.course_start_date = course_start_date;
|
|
122
|
+
this.course_end_date = course_end_date;
|
|
123
|
+
this.location = location;
|
|
124
|
+
this.description = description;
|
|
125
|
+
this.status = status;
|
|
126
|
+
this.service_id = service_id || null;
|
|
127
|
+
this.sub_service_id = sub_service_id || null;
|
|
128
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
129
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
130
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
131
|
+
this.duration_of_course = duration_of_course || null;
|
|
132
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
133
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
134
|
+
this.assigned_at = assigned_at || null;
|
|
135
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
136
|
+
this.already_submitted_in_ministry_of_education_system = already_submitted_in_ministry_of_education_system ?? null;
|
|
137
|
+
this.area_name = area_name ?? null;
|
|
138
|
+
this.country_name = country_name ?? null;
|
|
139
|
+
this.qualification_required = qualification_required ?? null;
|
|
140
|
+
this.have_you_ever_received_authority = have_you_ever_received_authority ?? null;
|
|
141
|
+
this.scholarship = scholarship ?? null;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
@@ -1,164 +1,164 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
export enum TrainingRequestStatus {
|
|
5
|
-
PENDING = "Pending",
|
|
6
|
-
ASSIGNED = "Assigned",
|
|
7
|
-
IN_PROGRESS = "In Progress",
|
|
8
|
-
COMPLETED = "Completed",
|
|
9
|
-
APPROVED = "Approved",
|
|
10
|
-
REJECTED = "Rejected"
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export enum TypeOfTraining {
|
|
14
|
-
INSIDE_TRAINING = "Inside Training",
|
|
15
|
-
OUTSIDE_TRAINING = "Outside Training"
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export enum TypeOfCategory {
|
|
19
|
-
PLANNED = "Planned",
|
|
20
|
-
OUT_OF_PLANNED = "Out of planned"
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export enum TrainingMediaCoverageRequired {
|
|
24
|
-
YES = "Yes",
|
|
25
|
-
NO = "No"
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@Entity({ name: "training_requests" })
|
|
29
|
-
export class TrainingRequest extends BaseModel {
|
|
30
|
-
@Column({ type: "integer", nullable: true })
|
|
31
|
-
req_user_department_id: number | null;
|
|
32
|
-
|
|
33
|
-
@Column({ type: "integer", nullable: true })
|
|
34
|
-
req_user_section_id: number | null;
|
|
35
|
-
|
|
36
|
-
@Column({ type: "integer", nullable: true })
|
|
37
|
-
req_user_position_id: number | null;
|
|
38
|
-
|
|
39
|
-
@Column({ type: "integer", nullable: true })
|
|
40
|
-
service_id: number | null;
|
|
41
|
-
|
|
42
|
-
@Column({ type: "integer", nullable: true })
|
|
43
|
-
sub_service_id: number | null;
|
|
44
|
-
|
|
45
|
-
@Column({ type: "integer", nullable: false })
|
|
46
|
-
user_id: number;
|
|
47
|
-
|
|
48
|
-
@Column({
|
|
49
|
-
type: "enum",
|
|
50
|
-
enum: TypeOfTraining,
|
|
51
|
-
nullable: true
|
|
52
|
-
})
|
|
53
|
-
type_of_training: TypeOfTraining | null;
|
|
54
|
-
|
|
55
|
-
@Column({
|
|
56
|
-
type: "enum",
|
|
57
|
-
enum: TypeOfCategory,
|
|
58
|
-
nullable: true
|
|
59
|
-
})
|
|
60
|
-
type_of_category: TypeOfCategory | null;
|
|
61
|
-
|
|
62
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
63
|
-
course_name: string | null;
|
|
64
|
-
|
|
65
|
-
@Column({ type: "varchar", length: 100, nullable: true })
|
|
66
|
-
course_id: string | null;
|
|
67
|
-
|
|
68
|
-
@Column({ type: "text", nullable: false })
|
|
69
|
-
description: string;
|
|
70
|
-
|
|
71
|
-
@Column({ type: "date", nullable: true })
|
|
72
|
-
start_date: Date | null;
|
|
73
|
-
|
|
74
|
-
@Column({ type: "date", nullable: true })
|
|
75
|
-
end_date: Date | null;
|
|
76
|
-
|
|
77
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
78
|
-
place: string | null;
|
|
79
|
-
|
|
80
|
-
/** Selected attendees (e.g. user_id + optional display name from UI selection) */
|
|
81
|
-
@Column({ type: "jsonb", nullable: true })
|
|
82
|
-
name_of_attendees_selection: Array<{ user_id: number; name?: string }> | null;
|
|
83
|
-
|
|
84
|
-
@Column({ type: "integer", nullable: false })
|
|
85
|
-
no_of_attendees: number;
|
|
86
|
-
|
|
87
|
-
@Column({
|
|
88
|
-
type: "enum",
|
|
89
|
-
enum: TrainingMediaCoverageRequired,
|
|
90
|
-
default: TrainingMediaCoverageRequired.NO,
|
|
91
|
-
nullable: false
|
|
92
|
-
})
|
|
93
|
-
media_coverage_required: TrainingMediaCoverageRequired;
|
|
94
|
-
|
|
95
|
-
@Column({
|
|
96
|
-
type: "enum",
|
|
97
|
-
enum: TrainingRequestStatus,
|
|
98
|
-
default: TrainingRequestStatus.PENDING,
|
|
99
|
-
nullable: false
|
|
100
|
-
})
|
|
101
|
-
status: TrainingRequestStatus;
|
|
102
|
-
|
|
103
|
-
@Column({ type: "integer", nullable: true })
|
|
104
|
-
reviewer_user_id: number | null;
|
|
105
|
-
|
|
106
|
-
@Column({ type: "integer", nullable: true })
|
|
107
|
-
assigned_to_user_id: number | null;
|
|
108
|
-
|
|
109
|
-
@Column({ type: "timestamp", nullable: true })
|
|
110
|
-
assigned_at: Date | null;
|
|
111
|
-
|
|
112
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
113
|
-
workflow_execution_id: string | null;
|
|
114
|
-
|
|
115
|
-
constructor(
|
|
116
|
-
user_id: number,
|
|
117
|
-
type_of_training: TypeOfTraining | null,
|
|
118
|
-
description: string,
|
|
119
|
-
place: string | null,
|
|
120
|
-
no_of_attendees: number,
|
|
121
|
-
media_coverage_required: TrainingMediaCoverageRequired,
|
|
122
|
-
status: TrainingRequestStatus = TrainingRequestStatus.PENDING,
|
|
123
|
-
service_id?: number | null,
|
|
124
|
-
sub_service_id?: number | null,
|
|
125
|
-
req_user_department_id?: number | null,
|
|
126
|
-
req_user_section_id?: number | null,
|
|
127
|
-
req_user_position_id?: number | null,
|
|
128
|
-
type_of_category?: TypeOfCategory | null,
|
|
129
|
-
course_name?: string | null,
|
|
130
|
-
course_id?: string | null,
|
|
131
|
-
name_of_attendees_selection?: Array<{ user_id: number; name?: string }> | null,
|
|
132
|
-
start_date?: Date | null,
|
|
133
|
-
end_date?: Date | null,
|
|
134
|
-
reviewer_user_id?: number | null,
|
|
135
|
-
assigned_to_user_id?: number | null,
|
|
136
|
-
assigned_at?: Date | null,
|
|
137
|
-
workflow_execution_id?: string | null
|
|
138
|
-
) {
|
|
139
|
-
super();
|
|
140
|
-
this.user_id = user_id;
|
|
141
|
-
this.type_of_training = type_of_training;
|
|
142
|
-
this.description = description;
|
|
143
|
-
this.place = place;
|
|
144
|
-
this.course_name = course_name ?? null;
|
|
145
|
-
this.course_id = course_id ?? null;
|
|
146
|
-
this.name_of_attendees_selection = name_of_attendees_selection ?? null;
|
|
147
|
-
this.no_of_attendees = no_of_attendees;
|
|
148
|
-
this.media_coverage_required = media_coverage_required;
|
|
149
|
-
this.status = status;
|
|
150
|
-
this.service_id = service_id || null;
|
|
151
|
-
this.sub_service_id = sub_service_id || null;
|
|
152
|
-
this.req_user_department_id = req_user_department_id || null;
|
|
153
|
-
this.req_user_section_id = req_user_section_id || null;
|
|
154
|
-
this.req_user_position_id = req_user_position_id || null;
|
|
155
|
-
this.type_of_category = type_of_category || null;
|
|
156
|
-
this.start_date = start_date || null;
|
|
157
|
-
this.end_date = end_date || null;
|
|
158
|
-
this.reviewer_user_id = reviewer_user_id || null;
|
|
159
|
-
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
160
|
-
this.assigned_at = assigned_at || null;
|
|
161
|
-
this.workflow_execution_id = workflow_execution_id || null;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum TrainingRequestStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
ASSIGNED = "Assigned",
|
|
7
|
+
IN_PROGRESS = "In Progress",
|
|
8
|
+
COMPLETED = "Completed",
|
|
9
|
+
APPROVED = "Approved",
|
|
10
|
+
REJECTED = "Rejected"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum TypeOfTraining {
|
|
14
|
+
INSIDE_TRAINING = "Inside Training",
|
|
15
|
+
OUTSIDE_TRAINING = "Outside Training"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export enum TypeOfCategory {
|
|
19
|
+
PLANNED = "Planned",
|
|
20
|
+
OUT_OF_PLANNED = "Out of planned"
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export enum TrainingMediaCoverageRequired {
|
|
24
|
+
YES = "Yes",
|
|
25
|
+
NO = "No"
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@Entity({ name: "training_requests" })
|
|
29
|
+
export class TrainingRequest extends BaseModel {
|
|
30
|
+
@Column({ type: "integer", nullable: true })
|
|
31
|
+
req_user_department_id: number | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: "integer", nullable: true })
|
|
34
|
+
req_user_section_id: number | null;
|
|
35
|
+
|
|
36
|
+
@Column({ type: "integer", nullable: true })
|
|
37
|
+
req_user_position_id: number | null;
|
|
38
|
+
|
|
39
|
+
@Column({ type: "integer", nullable: true })
|
|
40
|
+
service_id: number | null;
|
|
41
|
+
|
|
42
|
+
@Column({ type: "integer", nullable: true })
|
|
43
|
+
sub_service_id: number | null;
|
|
44
|
+
|
|
45
|
+
@Column({ type: "integer", nullable: false })
|
|
46
|
+
user_id: number;
|
|
47
|
+
|
|
48
|
+
@Column({
|
|
49
|
+
type: "enum",
|
|
50
|
+
enum: TypeOfTraining,
|
|
51
|
+
nullable: true
|
|
52
|
+
})
|
|
53
|
+
type_of_training: TypeOfTraining | null;
|
|
54
|
+
|
|
55
|
+
@Column({
|
|
56
|
+
type: "enum",
|
|
57
|
+
enum: TypeOfCategory,
|
|
58
|
+
nullable: true
|
|
59
|
+
})
|
|
60
|
+
type_of_category: TypeOfCategory | null;
|
|
61
|
+
|
|
62
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
63
|
+
course_name: string | null;
|
|
64
|
+
|
|
65
|
+
@Column({ type: "varchar", length: 100, nullable: true })
|
|
66
|
+
course_id: string | null;
|
|
67
|
+
|
|
68
|
+
@Column({ type: "text", nullable: false })
|
|
69
|
+
description: string;
|
|
70
|
+
|
|
71
|
+
@Column({ type: "date", nullable: true })
|
|
72
|
+
start_date: Date | null;
|
|
73
|
+
|
|
74
|
+
@Column({ type: "date", nullable: true })
|
|
75
|
+
end_date: Date | null;
|
|
76
|
+
|
|
77
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
78
|
+
place: string | null;
|
|
79
|
+
|
|
80
|
+
/** Selected attendees (e.g. user_id + optional display name from UI selection) */
|
|
81
|
+
@Column({ type: "jsonb", nullable: true })
|
|
82
|
+
name_of_attendees_selection: Array<{ user_id: number; name?: string }> | null;
|
|
83
|
+
|
|
84
|
+
@Column({ type: "integer", nullable: false })
|
|
85
|
+
no_of_attendees: number;
|
|
86
|
+
|
|
87
|
+
@Column({
|
|
88
|
+
type: "enum",
|
|
89
|
+
enum: TrainingMediaCoverageRequired,
|
|
90
|
+
default: TrainingMediaCoverageRequired.NO,
|
|
91
|
+
nullable: false
|
|
92
|
+
})
|
|
93
|
+
media_coverage_required: TrainingMediaCoverageRequired;
|
|
94
|
+
|
|
95
|
+
@Column({
|
|
96
|
+
type: "enum",
|
|
97
|
+
enum: TrainingRequestStatus,
|
|
98
|
+
default: TrainingRequestStatus.PENDING,
|
|
99
|
+
nullable: false
|
|
100
|
+
})
|
|
101
|
+
status: TrainingRequestStatus;
|
|
102
|
+
|
|
103
|
+
@Column({ type: "integer", nullable: true })
|
|
104
|
+
reviewer_user_id: number | null;
|
|
105
|
+
|
|
106
|
+
@Column({ type: "integer", nullable: true })
|
|
107
|
+
assigned_to_user_id: number | null;
|
|
108
|
+
|
|
109
|
+
@Column({ type: "timestamp", nullable: true })
|
|
110
|
+
assigned_at: Date | null;
|
|
111
|
+
|
|
112
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
113
|
+
workflow_execution_id: string | null;
|
|
114
|
+
|
|
115
|
+
constructor(
|
|
116
|
+
user_id: number,
|
|
117
|
+
type_of_training: TypeOfTraining | null,
|
|
118
|
+
description: string,
|
|
119
|
+
place: string | null,
|
|
120
|
+
no_of_attendees: number,
|
|
121
|
+
media_coverage_required: TrainingMediaCoverageRequired,
|
|
122
|
+
status: TrainingRequestStatus = TrainingRequestStatus.PENDING,
|
|
123
|
+
service_id?: number | null,
|
|
124
|
+
sub_service_id?: number | null,
|
|
125
|
+
req_user_department_id?: number | null,
|
|
126
|
+
req_user_section_id?: number | null,
|
|
127
|
+
req_user_position_id?: number | null,
|
|
128
|
+
type_of_category?: TypeOfCategory | null,
|
|
129
|
+
course_name?: string | null,
|
|
130
|
+
course_id?: string | null,
|
|
131
|
+
name_of_attendees_selection?: Array<{ user_id: number; name?: string }> | null,
|
|
132
|
+
start_date?: Date | null,
|
|
133
|
+
end_date?: Date | null,
|
|
134
|
+
reviewer_user_id?: number | null,
|
|
135
|
+
assigned_to_user_id?: number | null,
|
|
136
|
+
assigned_at?: Date | null,
|
|
137
|
+
workflow_execution_id?: string | null
|
|
138
|
+
) {
|
|
139
|
+
super();
|
|
140
|
+
this.user_id = user_id;
|
|
141
|
+
this.type_of_training = type_of_training;
|
|
142
|
+
this.description = description;
|
|
143
|
+
this.place = place;
|
|
144
|
+
this.course_name = course_name ?? null;
|
|
145
|
+
this.course_id = course_id ?? null;
|
|
146
|
+
this.name_of_attendees_selection = name_of_attendees_selection ?? null;
|
|
147
|
+
this.no_of_attendees = no_of_attendees;
|
|
148
|
+
this.media_coverage_required = media_coverage_required;
|
|
149
|
+
this.status = status;
|
|
150
|
+
this.service_id = service_id || null;
|
|
151
|
+
this.sub_service_id = sub_service_id || null;
|
|
152
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
153
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
154
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
155
|
+
this.type_of_category = type_of_category || null;
|
|
156
|
+
this.start_date = start_date || null;
|
|
157
|
+
this.end_date = end_date || null;
|
|
158
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
159
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
160
|
+
this.assigned_at = assigned_at || null;
|
|
161
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|