@platform-modules/civil-aviation-authority 2.3.33 → 2.3.40
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/dist/index.d.ts +0 -4
- package/dist/index.js +1 -9
- package/dist/models/LogisticsForeignVehicleModel.js +0 -1
- package/dist/models/LogisticsVehicleMaintenanceRequestModel.js +0 -2
- package/dist/models/RequestForCoverageRequestModel.d.ts +2 -1
- package/dist/models/RequestForCoverageRequestModel.js +7 -2
- package/package.json +1 -1
- package/src/index.ts +0 -7
- package/src/models/HrServiceRequestModel.ts +167 -167
- package/src/models/ITRequestChatModel.ts +62 -62
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/src/models/LogisticsForeignVehicleModel.ts +0 -1
- package/src/models/LogisticsVehicleMaintenanceRequestModel.ts +0 -2
- package/src/models/RequestForCoverageRequestModel.ts +174 -169
- package/dist/models/ITApprovalSettings.d.ts +0 -7
- package/dist/models/ITApprovalSettings.js +0 -40
- package/dist/models/ITServicesTypesMuscatModel.d.ts +0 -6
- package/dist/models/ITServicesTypesMuscatModel.js +0 -34
- package/dist/models/ITServicesTypesSalalahModel.d.ts +0 -6
- package/dist/models/ITServicesTypesSalalahModel.js +0 -34
- package/dist/models/JobTransferRequestModel.d.ts +0 -31
- package/dist/models/JobTransferRequestModel.js +0 -128
- package/dist/models/ShiftAllowanceRequestModel.d.ts +0 -37
- package/dist/models/ShiftAllowanceRequestModel.js +0 -140
- package/dist/models/Workflows.d.ts +0 -9
- package/dist/models/Workflows.js +0 -31
- package/src/models/JobTransferRequestModel.ts +0 -115
- package/src/models/ShiftAllowanceRequestModel.ts +0 -126
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export enum ApprovalStatus {
|
|
6
|
-
PENDING = "Pending",
|
|
7
|
-
APPROVED = "Approved",
|
|
8
|
-
REJECTED = "Rejected",
|
|
9
|
-
ASSIGNED = "Assigned",
|
|
10
|
-
REASSIGNED = "Reassigned"
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@Entity({ name: 'it_approvals' })
|
|
15
|
-
export class ItApprovalDetails extends BaseModel {
|
|
16
|
-
@Column({ type: 'integer', nullable: false })
|
|
17
|
-
request_id: number;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'integer', nullable: true })
|
|
20
|
-
service_id: number | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'integer', nullable: true })
|
|
23
|
-
sub_service_id: number | null;
|
|
24
|
-
|
|
25
|
-
@Column({ type: 'integer', nullable: false })
|
|
26
|
-
level: number;
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'integer', nullable: true })
|
|
29
|
-
approver_user_id: number | null;
|
|
30
|
-
|
|
31
|
-
@Column({ type: 'integer', nullable: true })
|
|
32
|
-
delegation_user_id: number | null;
|
|
33
|
-
|
|
34
|
-
@Column({ type: 'integer', nullable: false })
|
|
35
|
-
approver_role_id: number | null;
|
|
36
|
-
|
|
37
|
-
@Column({ type: 'integer', nullable: true })
|
|
38
|
-
department_id: number | null;
|
|
39
|
-
|
|
40
|
-
@Column({ type: 'integer', nullable: true })
|
|
41
|
-
section_id: number | null;
|
|
42
|
-
|
|
43
|
-
@Column({ type: 'integer', nullable: true })
|
|
44
|
-
approved_by: number | null;
|
|
45
|
-
|
|
46
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
47
|
-
comment: string;
|
|
48
|
-
|
|
49
|
-
@Column({ type: 'enum', enum: ApprovalStatus,default: ApprovalStatus.PENDING, nullable: false })
|
|
50
|
-
approval_status: ApprovalStatus;
|
|
51
|
-
|
|
52
|
-
@Column({ type: 'boolean', default: true, nullable: false })
|
|
53
|
-
is_allowed: boolean;
|
|
54
|
-
|
|
55
|
-
constructor(
|
|
56
|
-
request_id: number,
|
|
57
|
-
approver_user_id: number | null,
|
|
58
|
-
approver_role_id: number | null,
|
|
59
|
-
comment: string,
|
|
60
|
-
approval_status: ApprovalStatus,
|
|
61
|
-
level: number,
|
|
62
|
-
department_id?: number | null,
|
|
63
|
-
section_id?: number | null,
|
|
64
|
-
approved_by?: number | null,
|
|
65
|
-
service_id?: number | null,
|
|
66
|
-
sub_service_id?: number | null,
|
|
67
|
-
delegation_user_id?: number | null,
|
|
68
|
-
is_allowed?: boolean
|
|
69
|
-
) {
|
|
70
|
-
super();
|
|
71
|
-
this.request_id = request_id;
|
|
72
|
-
this.approver_user_id = approver_user_id;
|
|
73
|
-
this.approver_role_id = approver_role_id;
|
|
74
|
-
this.comment = comment;
|
|
75
|
-
this.approval_status = approval_status;
|
|
76
|
-
this.level = level;
|
|
77
|
-
this.department_id = department_id || null;
|
|
78
|
-
this.section_id = section_id || null;
|
|
79
|
-
this.approved_by = approved_by || null;
|
|
80
|
-
this.service_id = service_id ?? null;
|
|
81
|
-
this.sub_service_id = sub_service_id ?? null;
|
|
82
|
-
this.delegation_user_id = delegation_user_id || null;
|
|
83
|
-
this.is_allowed = is_allowed ?? true;
|
|
84
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export enum ApprovalStatus {
|
|
6
|
+
PENDING = "Pending",
|
|
7
|
+
APPROVED = "Approved",
|
|
8
|
+
REJECTED = "Rejected",
|
|
9
|
+
ASSIGNED = "Assigned",
|
|
10
|
+
REASSIGNED = "Reassigned"
|
|
11
|
+
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@Entity({ name: 'it_approvals' })
|
|
15
|
+
export class ItApprovalDetails extends BaseModel {
|
|
16
|
+
@Column({ type: 'integer', nullable: false })
|
|
17
|
+
request_id: number;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
service_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'integer', nullable: true })
|
|
23
|
+
sub_service_id: number | null;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'integer', nullable: false })
|
|
26
|
+
level: number;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
approver_user_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'integer', nullable: true })
|
|
32
|
+
delegation_user_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'integer', nullable: false })
|
|
35
|
+
approver_role_id: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'integer', nullable: true })
|
|
38
|
+
department_id: number | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'integer', nullable: true })
|
|
41
|
+
section_id: number | null;
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'integer', nullable: true })
|
|
44
|
+
approved_by: number | null;
|
|
45
|
+
|
|
46
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
47
|
+
comment: string;
|
|
48
|
+
|
|
49
|
+
@Column({ type: 'enum', enum: ApprovalStatus,default: ApprovalStatus.PENDING, nullable: false })
|
|
50
|
+
approval_status: ApprovalStatus;
|
|
51
|
+
|
|
52
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
53
|
+
is_allowed: boolean;
|
|
54
|
+
|
|
55
|
+
constructor(
|
|
56
|
+
request_id: number,
|
|
57
|
+
approver_user_id: number | null,
|
|
58
|
+
approver_role_id: number | null,
|
|
59
|
+
comment: string,
|
|
60
|
+
approval_status: ApprovalStatus,
|
|
61
|
+
level: number,
|
|
62
|
+
department_id?: number | null,
|
|
63
|
+
section_id?: number | null,
|
|
64
|
+
approved_by?: number | null,
|
|
65
|
+
service_id?: number | null,
|
|
66
|
+
sub_service_id?: number | null,
|
|
67
|
+
delegation_user_id?: number | null,
|
|
68
|
+
is_allowed?: boolean
|
|
69
|
+
) {
|
|
70
|
+
super();
|
|
71
|
+
this.request_id = request_id;
|
|
72
|
+
this.approver_user_id = approver_user_id;
|
|
73
|
+
this.approver_role_id = approver_role_id;
|
|
74
|
+
this.comment = comment;
|
|
75
|
+
this.approval_status = approval_status;
|
|
76
|
+
this.level = level;
|
|
77
|
+
this.department_id = department_id || null;
|
|
78
|
+
this.section_id = section_id || null;
|
|
79
|
+
this.approved_by = approved_by || null;
|
|
80
|
+
this.service_id = service_id ?? null;
|
|
81
|
+
this.sub_service_id = sub_service_id ?? null;
|
|
82
|
+
this.delegation_user_id = delegation_user_id || null;
|
|
83
|
+
this.is_allowed = is_allowed ?? true;
|
|
84
|
+
}
|
|
85
85
|
}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
export enum workFlowStatus {
|
|
5
|
-
COMPLETED = "Completed",
|
|
6
|
-
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
-
PENDING = "Pending"
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//This model is used to store the store the leave apporval matrix(HOD, Manager, HR, Director) based on leave type along with the levels
|
|
11
|
-
@Entity({ name: 'it_work_flows' })
|
|
12
|
-
export class ItWorkFlow extends BaseModel {
|
|
13
|
-
@Column({ type: 'int', nullable: false })
|
|
14
|
-
request_id: number;
|
|
15
|
-
|
|
16
|
-
@Column({ type: 'int', nullable: true })
|
|
17
|
-
service_id: number | null;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'int', nullable: true })
|
|
20
|
-
sub_service_id: number | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'int', nullable: true })
|
|
23
|
-
order: number | null;
|
|
24
|
-
|
|
25
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
26
|
-
content: string;
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'enum', enum: workFlowStatus, default: workFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
29
|
-
status: workFlowStatus;
|
|
30
|
-
|
|
31
|
-
@Column({ type: 'integer', nullable: true })
|
|
32
|
-
user_id: number | null;
|
|
33
|
-
|
|
34
|
-
@Column({ type: 'integer', nullable: true })
|
|
35
|
-
role_id: number | null;
|
|
36
|
-
|
|
37
|
-
@Column({ type: 'integer', nullable: true })
|
|
38
|
-
department_id: number | null;
|
|
39
|
-
|
|
40
|
-
@Column({ type: 'integer', nullable: true })
|
|
41
|
-
section_id: number | null;
|
|
42
|
-
|
|
43
|
-
constructor(request_id: number, content: string, status: workFlowStatus, order?: number, service_id?: number | null, sub_service_id?: number | null, user_id?: number | null, role_id?: number | null, department_id?: number | null, section_id?: number | null) {
|
|
44
|
-
super();
|
|
45
|
-
this.request_id = request_id;
|
|
46
|
-
this.content = content;
|
|
47
|
-
this.status = status;
|
|
48
|
-
this.order = order || null;
|
|
49
|
-
this.service_id = service_id ?? null;
|
|
50
|
-
this.sub_service_id = sub_service_id ?? null;
|
|
51
|
-
this.user_id = user_id || null;
|
|
52
|
-
this.role_id = role_id || null;
|
|
53
|
-
this.department_id = department_id || null;
|
|
54
|
-
this.section_id = section_id || null;
|
|
55
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum workFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//This model is used to store the store the leave apporval matrix(HOD, Manager, HR, Director) based on leave type along with the levels
|
|
11
|
+
@Entity({ name: 'it_work_flows' })
|
|
12
|
+
export class ItWorkFlow extends BaseModel {
|
|
13
|
+
@Column({ type: 'int', nullable: false })
|
|
14
|
+
request_id: number;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'int', nullable: true })
|
|
17
|
+
service_id: number | null;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'int', nullable: true })
|
|
20
|
+
sub_service_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'int', nullable: true })
|
|
23
|
+
order: number | null;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
26
|
+
content: string;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'enum', enum: workFlowStatus, default: workFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
29
|
+
status: workFlowStatus;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'integer', nullable: true })
|
|
32
|
+
user_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'integer', nullable: true })
|
|
35
|
+
role_id: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'integer', nullable: true })
|
|
38
|
+
department_id: number | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'integer', nullable: true })
|
|
41
|
+
section_id: number | null;
|
|
42
|
+
|
|
43
|
+
constructor(request_id: number, content: string, status: workFlowStatus, order?: number, service_id?: number | null, sub_service_id?: number | null, user_id?: number | null, role_id?: number | null, department_id?: number | null, section_id?: number | null) {
|
|
44
|
+
super();
|
|
45
|
+
this.request_id = request_id;
|
|
46
|
+
this.content = content;
|
|
47
|
+
this.status = status;
|
|
48
|
+
this.order = order || null;
|
|
49
|
+
this.service_id = service_id ?? null;
|
|
50
|
+
this.sub_service_id = sub_service_id ?? null;
|
|
51
|
+
this.user_id = user_id || null;
|
|
52
|
+
this.role_id = role_id || null;
|
|
53
|
+
this.department_id = department_id || null;
|
|
54
|
+
this.section_id = section_id || null;
|
|
55
|
+
}
|
|
56
56
|
}
|
|
@@ -57,7 +57,6 @@ export class LogisticsForeignVehicleRequests extends BaseModel {
|
|
|
57
57
|
@Column({
|
|
58
58
|
type: "enum",
|
|
59
59
|
enum: Foreign_Vehicle_Required_Location,
|
|
60
|
-
enumName: 'foreign_vehicle_required_location_en',
|
|
61
60
|
default: Foreign_Vehicle_Required_Location.INSIDE,
|
|
62
61
|
nullable: false,
|
|
63
62
|
})
|
|
@@ -40,8 +40,6 @@ export class LogisticsVehicleMaintenanceRequests extends BaseModel {
|
|
|
40
40
|
type: "enum",
|
|
41
41
|
enum: VehicleMaintenanceType,
|
|
42
42
|
nullable: false,
|
|
43
|
-
enumName: 'logistics_vehicle_maintenance_requests_en',
|
|
44
|
-
default:VehicleMaintenanceType.CORRECTIVE
|
|
45
43
|
})
|
|
46
44
|
type_of_maintenance_required: VehicleMaintenanceType;
|
|
47
45
|
|
|
@@ -1,169 +1,174 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
export enum RequestForCoverageRequestStatus {
|
|
5
|
-
PENDING = "Pending",
|
|
6
|
-
IN_PROGRESS = "In Progress",
|
|
7
|
-
COMPLETED = "Completed",
|
|
8
|
-
APPROVED = "Approved",
|
|
9
|
-
REJECTED = "Rejected"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export enum RequestForCoverageNewsSize {
|
|
13
|
-
SMALL = "Small",
|
|
14
|
-
MEDIUM = "Medium",
|
|
15
|
-
LARGE = "Large"
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@Entity({ name: "request_for_coverage_requests" })
|
|
19
|
-
export class RequestForCoverageRequest extends BaseModel {
|
|
20
|
-
@Column({ type: "integer", nullable: true })
|
|
21
|
-
req_user_department_id: number | null;
|
|
22
|
-
|
|
23
|
-
@Column({ type: "integer", nullable: true })
|
|
24
|
-
req_user_section_id: number | null;
|
|
25
|
-
|
|
26
|
-
@Column({ type: "integer", nullable: true })
|
|
27
|
-
req_user_position_id: number | null;
|
|
28
|
-
|
|
29
|
-
@Column({ type: "integer", nullable: true })
|
|
30
|
-
service_id: number | null;
|
|
31
|
-
|
|
32
|
-
@Column({ type: "integer", nullable: true })
|
|
33
|
-
sub_service_id: number | null;
|
|
34
|
-
|
|
35
|
-
@Column({ type: "integer", nullable: false })
|
|
36
|
-
user_id: number;
|
|
37
|
-
|
|
38
|
-
@Column({ type: "boolean", default: false, nullable: false })
|
|
39
|
-
required_for_president: boolean;
|
|
40
|
-
|
|
41
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
42
|
-
directorate_name: string;
|
|
43
|
-
|
|
44
|
-
@Column({ type: "integer", nullable: true })
|
|
45
|
-
department_id: number | null;
|
|
46
|
-
|
|
47
|
-
@Column({ type: "varchar", length: 50, nullable: true })
|
|
48
|
-
extension_number: string | null;
|
|
49
|
-
|
|
50
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
51
|
-
suggested_photography: string | null;
|
|
52
|
-
|
|
53
|
-
@Column({ type: "date", nullable: false })
|
|
54
|
-
event_date: Date;
|
|
55
|
-
|
|
56
|
-
@Column({ type: "time", nullable: false })
|
|
57
|
-
event_time: string;
|
|
58
|
-
|
|
59
|
-
@Column({ type: "varchar", length: 255, nullable: false })
|
|
60
|
-
event_location: string;
|
|
61
|
-
|
|
62
|
-
@Column({
|
|
63
|
-
type: "enum",
|
|
64
|
-
enum: RequestForCoverageNewsSize,
|
|
65
|
-
nullable: true
|
|
66
|
-
})
|
|
67
|
-
news_size: RequestForCoverageNewsSize | null;
|
|
68
|
-
|
|
69
|
-
@Column({ type: "text", nullable: true })
|
|
70
|
-
event_objective: string | null;
|
|
71
|
-
|
|
72
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
73
|
-
organizing_entity: string | null;
|
|
74
|
-
|
|
75
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
76
|
-
hosted_person: string | null;
|
|
77
|
-
|
|
78
|
-
@Column({ type: "text", nullable: true })
|
|
79
|
-
audience: string | null;
|
|
80
|
-
|
|
81
|
-
@Column({ type: "text", nullable: false })
|
|
82
|
-
event_details: string;
|
|
83
|
-
|
|
84
|
-
@Column({ type: "text", nullable: false })
|
|
85
|
-
importance_of_publishing: string;
|
|
86
|
-
|
|
87
|
-
@Column({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
@Column({ type: "integer", nullable: true })
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
@Column({ type: "
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
@Column({ type: "
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
@Column({ type: "varchar", length:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
this.
|
|
145
|
-
this.
|
|
146
|
-
this.
|
|
147
|
-
this.
|
|
148
|
-
this.
|
|
149
|
-
this.
|
|
150
|
-
this.
|
|
151
|
-
this.
|
|
152
|
-
this.
|
|
153
|
-
this.
|
|
154
|
-
this.
|
|
155
|
-
this.
|
|
156
|
-
this.
|
|
157
|
-
this.
|
|
158
|
-
this.
|
|
159
|
-
this.
|
|
160
|
-
this.
|
|
161
|
-
this.
|
|
162
|
-
this.
|
|
163
|
-
this.
|
|
164
|
-
this.
|
|
165
|
-
this.
|
|
166
|
-
this.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum RequestForCoverageRequestStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
IN_PROGRESS = "In Progress",
|
|
7
|
+
COMPLETED = "Completed",
|
|
8
|
+
APPROVED = "Approved",
|
|
9
|
+
REJECTED = "Rejected"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum RequestForCoverageNewsSize {
|
|
13
|
+
SMALL = "Small",
|
|
14
|
+
MEDIUM = "Medium",
|
|
15
|
+
LARGE = "Large"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@Entity({ name: "request_for_coverage_requests" })
|
|
19
|
+
export class RequestForCoverageRequest extends BaseModel {
|
|
20
|
+
@Column({ type: "integer", nullable: true })
|
|
21
|
+
req_user_department_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: "integer", nullable: true })
|
|
24
|
+
req_user_section_id: number | null;
|
|
25
|
+
|
|
26
|
+
@Column({ type: "integer", nullable: true })
|
|
27
|
+
req_user_position_id: number | null;
|
|
28
|
+
|
|
29
|
+
@Column({ type: "integer", nullable: true })
|
|
30
|
+
service_id: number | null;
|
|
31
|
+
|
|
32
|
+
@Column({ type: "integer", nullable: true })
|
|
33
|
+
sub_service_id: number | null;
|
|
34
|
+
|
|
35
|
+
@Column({ type: "integer", nullable: false })
|
|
36
|
+
user_id: number;
|
|
37
|
+
|
|
38
|
+
@Column({ type: "boolean", default: false, nullable: false })
|
|
39
|
+
required_for_president: boolean;
|
|
40
|
+
|
|
41
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
42
|
+
directorate_name: string;
|
|
43
|
+
|
|
44
|
+
@Column({ type: "integer", nullable: true })
|
|
45
|
+
department_id: number | null;
|
|
46
|
+
|
|
47
|
+
@Column({ type: "varchar", length: 50, nullable: true })
|
|
48
|
+
extension_number: string | null;
|
|
49
|
+
|
|
50
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
51
|
+
suggested_photography: string | null;
|
|
52
|
+
|
|
53
|
+
@Column({ type: "date", nullable: false })
|
|
54
|
+
event_date: Date;
|
|
55
|
+
|
|
56
|
+
@Column({ type: "time", nullable: false })
|
|
57
|
+
event_time: string;
|
|
58
|
+
|
|
59
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
60
|
+
event_location: string;
|
|
61
|
+
|
|
62
|
+
@Column({
|
|
63
|
+
type: "enum",
|
|
64
|
+
enum: RequestForCoverageNewsSize,
|
|
65
|
+
nullable: true
|
|
66
|
+
})
|
|
67
|
+
news_size: RequestForCoverageNewsSize | null;
|
|
68
|
+
|
|
69
|
+
@Column({ type: "text", nullable: true })
|
|
70
|
+
event_objective: string | null;
|
|
71
|
+
|
|
72
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
73
|
+
organizing_entity: string | null;
|
|
74
|
+
|
|
75
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
76
|
+
hosted_person: string | null;
|
|
77
|
+
|
|
78
|
+
@Column({ type: "text", nullable: true })
|
|
79
|
+
audience: string | null;
|
|
80
|
+
|
|
81
|
+
@Column({ type: "text", nullable: false })
|
|
82
|
+
event_details: string;
|
|
83
|
+
|
|
84
|
+
@Column({ type: "text", nullable: false })
|
|
85
|
+
importance_of_publishing: string;
|
|
86
|
+
|
|
87
|
+
@Column({ type: "text", nullable: true })
|
|
88
|
+
document_event: string | null;
|
|
89
|
+
|
|
90
|
+
@Column({
|
|
91
|
+
type: "enum",
|
|
92
|
+
enum: RequestForCoverageRequestStatus,
|
|
93
|
+
default: RequestForCoverageRequestStatus.PENDING,
|
|
94
|
+
nullable: false
|
|
95
|
+
})
|
|
96
|
+
status: RequestForCoverageRequestStatus;
|
|
97
|
+
|
|
98
|
+
@Column({ type: "integer", nullable: true })
|
|
99
|
+
reviewer_user_id: number | null;
|
|
100
|
+
|
|
101
|
+
@Column({ type: "integer", nullable: true })
|
|
102
|
+
assigned_to_user_id: number | null;
|
|
103
|
+
|
|
104
|
+
@Column({ type: "timestamp", nullable: true })
|
|
105
|
+
assigned_at: Date | null;
|
|
106
|
+
|
|
107
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
108
|
+
workflow_execution_id: string | null;
|
|
109
|
+
|
|
110
|
+
@Column({ type: "varchar", length: 500, nullable: true })
|
|
111
|
+
rejection_reason: string | null;
|
|
112
|
+
|
|
113
|
+
constructor(
|
|
114
|
+
user_id: number,
|
|
115
|
+
event_date: Date,
|
|
116
|
+
event_time: string,
|
|
117
|
+
event_location: string,
|
|
118
|
+
event_details: string,
|
|
119
|
+
importance_of_publishing: string,
|
|
120
|
+
directorate_name: string,
|
|
121
|
+
required_for_president: boolean = false,
|
|
122
|
+
status: RequestForCoverageRequestStatus = RequestForCoverageRequestStatus.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
|
+
department_id?: number | null,
|
|
129
|
+
extension_number?: string | null,
|
|
130
|
+
suggested_photography?: string | null,
|
|
131
|
+
news_size?: RequestForCoverageNewsSize | null,
|
|
132
|
+
event_objective?: string | null,
|
|
133
|
+
organizing_entity?: string | null,
|
|
134
|
+
hosted_person?: string | null,
|
|
135
|
+
audience?: string | null,
|
|
136
|
+
document_event?: string | null,
|
|
137
|
+
reviewer_user_id?: number | null,
|
|
138
|
+
assigned_to_user_id?: number | null,
|
|
139
|
+
assigned_at?: Date | null,
|
|
140
|
+
workflow_execution_id?: string | null,
|
|
141
|
+
rejection_reason?: string | null
|
|
142
|
+
) {
|
|
143
|
+
super();
|
|
144
|
+
this.user_id = user_id;
|
|
145
|
+
this.event_date = event_date;
|
|
146
|
+
this.event_time = event_time;
|
|
147
|
+
this.event_location = event_location;
|
|
148
|
+
this.event_details = event_details;
|
|
149
|
+
this.importance_of_publishing = importance_of_publishing;
|
|
150
|
+
this.directorate_name = directorate_name;
|
|
151
|
+
this.required_for_president = required_for_president;
|
|
152
|
+
this.status = status;
|
|
153
|
+
this.service_id = service_id || null;
|
|
154
|
+
this.sub_service_id = sub_service_id || null;
|
|
155
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
156
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
157
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
158
|
+
this.department_id = department_id || null;
|
|
159
|
+
this.extension_number = extension_number || null;
|
|
160
|
+
this.suggested_photography = suggested_photography || null;
|
|
161
|
+
this.news_size = news_size || null;
|
|
162
|
+
this.event_objective = event_objective || null;
|
|
163
|
+
this.organizing_entity = organizing_entity || null;
|
|
164
|
+
this.hosted_person = hosted_person || null;
|
|
165
|
+
this.audience = audience || null;
|
|
166
|
+
this.document_event = document_event || null;
|
|
167
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
168
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
169
|
+
this.assigned_at = assigned_at || null;
|
|
170
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
171
|
+
this.rejection_reason = rejection_reason || null;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|