@platform-modules/civil-aviation-authority 2.2.200 → 2.2.202
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 +4 -4
- package/dist/data-source.js +11 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/models/AirportEntryPermitApprovalModel.d.ts +24 -0
- package/dist/models/AirportEntryPermitApprovalModel.js +97 -0
- package/dist/models/AirportEntryPermitAttachmentModel.d.ts +14 -0
- package/dist/models/AirportEntryPermitAttachmentModel.js +74 -0
- package/dist/models/AirportEntryPermitChatModel.d.ts +17 -0
- package/dist/models/AirportEntryPermitChatModel.js +67 -0
- package/dist/models/AirportEntryPermitModel.d.ts +78 -0
- package/dist/models/AirportEntryPermitModel.js +249 -0
- package/dist/models/AirportEntryPermitWorkflowModel.d.ts +18 -0
- package/dist/models/AirportEntryPermitWorkflowModel.js +75 -0
- package/dist/models/HotelreservationModal.d.ts +30 -0
- package/dist/models/HotelreservationModal.js +119 -0
- 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/Workflows.d.ts +0 -0
- package/dist/models/Workflows.js +31 -0
- package/package.json +1 -1
- package/src/data-source.ts +11 -1
- package/src/index.ts +5 -0
- package/src/models/AirportEntryPermitApprovalModel.ts +84 -0
- package/src/models/AirportEntryPermitAttachmentModel.ts +62 -0
- package/src/models/AirportEntryPermitChatModel.ts +55 -0
- package/src/models/AirportEntryPermitModel.ts +242 -0
- package/src/models/AirportEntryPermitWorkflowModel.ts +62 -0
- package/src/models/ITRequestChatModel.ts +62 -62
- package/src/models/ItWorkflowModel.ts +55 -55
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import { Column, Entity, Unique } from "typeorm";
|
|
3
|
+
// import { BaseModel } from './BaseModel';
|
|
4
|
+
// @Entity({ name: 'workflows' })
|
|
5
|
+
// @Unique(['service_id', 'sub_service_id', 'request_for'])
|
|
6
|
+
// export class Workflows extends BaseModel {
|
|
7
|
+
// @Column({ type: 'varchar', length: 100, nullable: false })
|
|
8
|
+
// name: string;
|
|
9
|
+
// @Column({ type: 'bigint', nullable: false })
|
|
10
|
+
// service_id: number;
|
|
11
|
+
// @Column({ type: 'bigint', nullable: false })
|
|
12
|
+
// sub_service_id: number;
|
|
13
|
+
// @Column({ type: 'varchar', length: 20, nullable: false })
|
|
14
|
+
// request_for: string; // 'Self' | 'Behalf of' | 'Internal'
|
|
15
|
+
// @Column({ type: 'int', nullable: false })
|
|
16
|
+
// levels: number;
|
|
17
|
+
// constructor(
|
|
18
|
+
// name: string,
|
|
19
|
+
// service_id: number,
|
|
20
|
+
// sub_service_id: number,
|
|
21
|
+
// request_for: string,
|
|
22
|
+
// levels: number,
|
|
23
|
+
// ) {
|
|
24
|
+
// super();
|
|
25
|
+
// this.name = name;
|
|
26
|
+
// this.service_id = service_id;
|
|
27
|
+
// this.sub_service_id = sub_service_id;
|
|
28
|
+
// this.request_for = request_for;
|
|
29
|
+
// this.levels = levels;
|
|
30
|
+
// }
|
|
31
|
+
// }
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -67,6 +67,11 @@ import { SecurityAwarenessApproval } from './models/SecurityAwarenessApprovalMod
|
|
|
67
67
|
import { SecurityAwarenessAttachment } from './models/SecurityAwarenessAttachmentModel';
|
|
68
68
|
import { SecurityAwarenessChat } from './models/SecurityAwarenessChatModel';
|
|
69
69
|
import { SecurityAwarenessWorkFlow } from './models/SecurityAwarenessWorkflowModel';
|
|
70
|
+
import { AirportEntryPermit } from './models/AirportEntryPermitModel';
|
|
71
|
+
import { AirportEntryPermitApproval } from './models/AirportEntryPermitApprovalModel';
|
|
72
|
+
import { AirportEntryPermitWorkFlow } from './models/AirportEntryPermitWorkflowModel';
|
|
73
|
+
import { AirportEntryPermitChat } from './models/AirportEntryPermitChatModel';
|
|
74
|
+
import { AirportEntryPermitAttachment } from './models/AirportEntryPermitAttachmentModel';
|
|
70
75
|
import { GroupNames } from './models/GroupNamesModel';
|
|
71
76
|
import { Group } from './models/GroupModel';
|
|
72
77
|
|
|
@@ -144,6 +149,11 @@ export const AppDataSource = new DataSource({
|
|
|
144
149
|
SecurityAwarenessChat,
|
|
145
150
|
SecurityAwarenessWorkFlow,
|
|
146
151
|
GroupNames,
|
|
147
|
-
Group
|
|
152
|
+
Group,
|
|
153
|
+
AirportEntryPermit,
|
|
154
|
+
AirportEntryPermitApproval,
|
|
155
|
+
AirportEntryPermitWorkFlow,
|
|
156
|
+
AirportEntryPermitChat,
|
|
157
|
+
AirportEntryPermitAttachment
|
|
148
158
|
],
|
|
149
159
|
});
|
package/src/index.ts
CHANGED
|
@@ -62,5 +62,10 @@ export * from './models/SecurityAwarenessApprovalModel';
|
|
|
62
62
|
export * from './models/SecurityAwarenessAttachmentModel';
|
|
63
63
|
export * from './models/SecurityAwarenessChatModel';
|
|
64
64
|
export * from './models/SecurityAwarenessWorkflowModel';
|
|
65
|
+
export * from './models/AirportEntryPermitModel';
|
|
66
|
+
export * from './models/AirportEntryPermitApprovalModel';
|
|
67
|
+
export * from './models/AirportEntryPermitWorkflowModel';
|
|
68
|
+
export * from './models/AirportEntryPermitChatModel';
|
|
69
|
+
export * from './models/AirportEntryPermitAttachmentModel';
|
|
65
70
|
export * from './models/GroupNamesModel';
|
|
66
71
|
export * from './models/GroupModel';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum AirportEntryPermitApprovalStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
IN_PROGRESS = "In Progress",
|
|
7
|
+
APPROVED = "Approved",
|
|
8
|
+
REJECTED = "Rejected",
|
|
9
|
+
RFC = "Request For Change"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Entity({ name: 'airport_entry_permit_approvals' })
|
|
13
|
+
export class AirportEntryPermitApproval extends BaseModel {
|
|
14
|
+
@Column({ type: 'integer', nullable: false })
|
|
15
|
+
request_id: number;
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'integer', nullable: true })
|
|
18
|
+
service_id: number | null;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'integer', nullable: true })
|
|
21
|
+
sub_service_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'integer', nullable: false })
|
|
24
|
+
level: number;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'integer', nullable: false })
|
|
27
|
+
approver_role_id: number;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'integer', nullable: true })
|
|
30
|
+
department_id: number | null;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'integer', nullable: true })
|
|
33
|
+
section_id: number | null;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'integer', nullable: true })
|
|
36
|
+
approver_user_id: number | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'integer', nullable: true })
|
|
39
|
+
delegate_user_id: number | null;
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'integer', nullable: true })
|
|
42
|
+
approved_by: number | null;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'varchar', length: 500, nullable: true, default: '' })
|
|
45
|
+
comment: string;
|
|
46
|
+
|
|
47
|
+
@Column({ type: 'enum', enum: AirportEntryPermitApprovalStatus, default: AirportEntryPermitApprovalStatus.PENDING, nullable: false })
|
|
48
|
+
approval_status: AirportEntryPermitApprovalStatus;
|
|
49
|
+
|
|
50
|
+
@Column({ type: 'boolean', default: false, nullable: false })
|
|
51
|
+
is_manager: boolean;
|
|
52
|
+
|
|
53
|
+
constructor(
|
|
54
|
+
request_id: number,
|
|
55
|
+
approver_role_id: number,
|
|
56
|
+
comment: string,
|
|
57
|
+
approval_status: AirportEntryPermitApprovalStatus,
|
|
58
|
+
level: number,
|
|
59
|
+
is_manager: boolean = false,
|
|
60
|
+
department_id?: number | null,
|
|
61
|
+
section_id?: number | null,
|
|
62
|
+
approver_user_id?: number | null,
|
|
63
|
+
delegate_user_id?: number | null,
|
|
64
|
+
approved_by?: number | null,
|
|
65
|
+
service_id?: number,
|
|
66
|
+
sub_service_id?: number
|
|
67
|
+
) {
|
|
68
|
+
super();
|
|
69
|
+
this.request_id = request_id;
|
|
70
|
+
this.service_id = service_id || null;
|
|
71
|
+
this.sub_service_id = sub_service_id || null;
|
|
72
|
+
this.approver_role_id = approver_role_id;
|
|
73
|
+
this.comment = comment;
|
|
74
|
+
this.approval_status = approval_status;
|
|
75
|
+
this.level = level;
|
|
76
|
+
this.is_manager = is_manager;
|
|
77
|
+
this.department_id = department_id || null;
|
|
78
|
+
this.section_id = section_id || null;
|
|
79
|
+
this.approver_user_id = approver_user_id || null;
|
|
80
|
+
this.delegate_user_id = delegate_user_id || null;
|
|
81
|
+
this.approved_by = approved_by || null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'airport_entry_permit_attachments' })
|
|
5
|
+
export class AirportEntryPermitAttachment extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'integer', nullable: false })
|
|
8
|
+
request_id: number;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'integer', nullable: true })
|
|
11
|
+
service_id: number | null;
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'integer', nullable: true })
|
|
14
|
+
sub_service_id: number | null;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
17
|
+
file_url: string;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
20
|
+
file_name: string;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
23
|
+
file_type: string;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'bigint', nullable: true })
|
|
26
|
+
file_size: number | null;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
chat_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: "integer", nullable: false })
|
|
32
|
+
uploaded_by: number;
|
|
33
|
+
|
|
34
|
+
@Column({ type: "text", nullable: true })
|
|
35
|
+
description: string;
|
|
36
|
+
|
|
37
|
+
constructor(
|
|
38
|
+
request_id: number,
|
|
39
|
+
uploaded_by: number,
|
|
40
|
+
file_url: string,
|
|
41
|
+
file_name?: string,
|
|
42
|
+
file_type?: string,
|
|
43
|
+
file_size?: number,
|
|
44
|
+
service_id?: number,
|
|
45
|
+
sub_service_id?: number,
|
|
46
|
+
chat_id?: number,
|
|
47
|
+
description?: string
|
|
48
|
+
) {
|
|
49
|
+
super();
|
|
50
|
+
this.request_id = request_id;
|
|
51
|
+
this.service_id = service_id || null;
|
|
52
|
+
this.sub_service_id = sub_service_id || null;
|
|
53
|
+
this.file_url = file_url;
|
|
54
|
+
this.file_name = file_name || '';
|
|
55
|
+
this.file_type = file_type || '';
|
|
56
|
+
this.file_size = file_size || null;
|
|
57
|
+
this.chat_id = chat_id || null;
|
|
58
|
+
this.uploaded_by = uploaded_by;
|
|
59
|
+
this.description = description || '';
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum AirportEntryPermitMessageTypes {
|
|
5
|
+
TEXT = "text",
|
|
6
|
+
IMAGE = "image",
|
|
7
|
+
VIDEO = "video",
|
|
8
|
+
FILE = "file",
|
|
9
|
+
LINK = "link"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Entity({ name: 'airport_entry_permit_chat' })
|
|
13
|
+
export class AirportEntryPermitChat extends BaseModel {
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'integer', nullable: false })
|
|
16
|
+
request_id: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'integer', nullable: true })
|
|
19
|
+
service_id: number | null;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'integer', nullable: true })
|
|
22
|
+
sub_service_id: number | null;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'integer', nullable: false })
|
|
25
|
+
user_id: number;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'text', nullable: false })
|
|
28
|
+
message: string;
|
|
29
|
+
|
|
30
|
+
@Column({
|
|
31
|
+
type: 'enum',
|
|
32
|
+
enum: AirportEntryPermitMessageTypes,
|
|
33
|
+
default: AirportEntryPermitMessageTypes.TEXT,
|
|
34
|
+
nullable: false
|
|
35
|
+
})
|
|
36
|
+
messageType: AirportEntryPermitMessageTypes;
|
|
37
|
+
|
|
38
|
+
constructor(
|
|
39
|
+
request_id: number,
|
|
40
|
+
user_id: number,
|
|
41
|
+
message: string,
|
|
42
|
+
service_id?: number,
|
|
43
|
+
sub_service_id?: number,
|
|
44
|
+
messageType?: AirportEntryPermitMessageTypes
|
|
45
|
+
) {
|
|
46
|
+
super();
|
|
47
|
+
this.request_id = request_id;
|
|
48
|
+
this.service_id = service_id || null;
|
|
49
|
+
this.sub_service_id = sub_service_id || null;
|
|
50
|
+
this.user_id = user_id;
|
|
51
|
+
this.message = message;
|
|
52
|
+
this.messageType = messageType || AirportEntryPermitMessageTypes.TEXT;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { Entity, Column } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum AirportEntryPermitCategory {
|
|
5
|
+
ISSUING_NEW_PERMIT = "Issuing New Permit",
|
|
6
|
+
RENEWAL_OF_PERMIT = "Renewal of Permit",
|
|
7
|
+
AMENDING = "Amending",
|
|
8
|
+
REPLACING_LOST = "Replacing lost",
|
|
9
|
+
CANCELLING_AIRPORT_SECURITY_PERMITS = "Cancelling airport security permits"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum AirportEntryPermitType {
|
|
13
|
+
PERMANENT = "Permanent",
|
|
14
|
+
TEMPORARY = "Temporary"
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export enum AirportEntryPermitLocation {
|
|
18
|
+
MUSCAT = "Muscat",
|
|
19
|
+
SALALAH = "Salalah",
|
|
20
|
+
MARMUL = "Marmul",
|
|
21
|
+
DURUM = "Durum",
|
|
22
|
+
SOHAR = "Sohar",
|
|
23
|
+
FUHUD = "Fuhud",
|
|
24
|
+
MUKHAZINA = "Mukhazina"
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export enum AirportEntryPermitArea {
|
|
28
|
+
PURPLE = "VIP building",
|
|
29
|
+
HEAVENLY = "Cargo Building with import and export sections",
|
|
30
|
+
ORANGE = "[ Arrivals Hall] and Arrivals building",
|
|
31
|
+
GREEN = "[departures Hall ] and departures building",
|
|
32
|
+
YELLOW = "Information centre and control tower building",
|
|
33
|
+
BLUE = "Vehicle, Aircraft building, Aircraft parking area, fire station and fuel filling stations, repair shop",
|
|
34
|
+
PINK = "Baggage sorting area",
|
|
35
|
+
GRAY = "Supply building",
|
|
36
|
+
ALL_CIVIL_AIRPORTS = "All Civil Airports"
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export enum AirportEntryPermitStatus {
|
|
40
|
+
PENDING = "Pending",
|
|
41
|
+
APPROVED = "Approved",
|
|
42
|
+
REJECTED = "Rejected",
|
|
43
|
+
IN_PROGRESS = "In Progress"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export enum VisitorOption {
|
|
47
|
+
VISA_TYPE = "Visa Type",
|
|
48
|
+
VISA_NO = "Visa No",
|
|
49
|
+
DATE_EXPIRY_VISA = "Date Expiry Visa"
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@Entity({ name: 'airport_entry_permits' })
|
|
53
|
+
export class AirportEntryPermit extends BaseModel {
|
|
54
|
+
// Workflow fields
|
|
55
|
+
@Column({ type: 'int', nullable: true })
|
|
56
|
+
req_user_department_id: number | null;
|
|
57
|
+
|
|
58
|
+
@Column({ type: 'int', nullable: true })
|
|
59
|
+
req_user_section_id: number | null;
|
|
60
|
+
|
|
61
|
+
@Column({ type: 'int', nullable: true })
|
|
62
|
+
service_id: number | null;
|
|
63
|
+
|
|
64
|
+
@Column({ type: 'int', nullable: true })
|
|
65
|
+
sub_service_id: number | null;
|
|
66
|
+
|
|
67
|
+
@Column({ type: 'varchar', length: 20, nullable: true })
|
|
68
|
+
service_type: string | null;
|
|
69
|
+
|
|
70
|
+
@Column({ type: 'varchar', nullable: true })
|
|
71
|
+
workflow_execution_id: string | null;
|
|
72
|
+
|
|
73
|
+
@Column({
|
|
74
|
+
type: "enum",
|
|
75
|
+
enum: AirportEntryPermitStatus,
|
|
76
|
+
default: AirportEntryPermitStatus.PENDING,
|
|
77
|
+
nullable: false,
|
|
78
|
+
})
|
|
79
|
+
status: AirportEntryPermitStatus;
|
|
80
|
+
|
|
81
|
+
@Column({ nullable: false })
|
|
82
|
+
user_id: number;
|
|
83
|
+
|
|
84
|
+
// Request ID - Auto generated
|
|
85
|
+
@Column({ type: 'varchar', length: 50, nullable: true, unique: true })
|
|
86
|
+
request_id: string | null;
|
|
87
|
+
|
|
88
|
+
// User fields from requirements
|
|
89
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
90
|
+
name_full_family_name: string;
|
|
91
|
+
|
|
92
|
+
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
93
|
+
nationality: string;
|
|
94
|
+
|
|
95
|
+
@Column({ type: 'date', nullable: false })
|
|
96
|
+
dob: Date;
|
|
97
|
+
|
|
98
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
99
|
+
place: string;
|
|
100
|
+
|
|
101
|
+
@Column({ type: 'varchar', length: 50, nullable: false })
|
|
102
|
+
passport_id_card_no: string;
|
|
103
|
+
|
|
104
|
+
@Column({
|
|
105
|
+
type: "enum",
|
|
106
|
+
enum: AirportEntryPermitCategory,
|
|
107
|
+
nullable: false,
|
|
108
|
+
})
|
|
109
|
+
category_of_permit: AirportEntryPermitCategory;
|
|
110
|
+
|
|
111
|
+
@Column({ type: 'date', nullable: false })
|
|
112
|
+
date_of_submission: Date;
|
|
113
|
+
|
|
114
|
+
@Column({ type: 'varchar', length: 20, nullable: false })
|
|
115
|
+
phone_number: string;
|
|
116
|
+
|
|
117
|
+
@Column({
|
|
118
|
+
type: "enum",
|
|
119
|
+
enum: AirportEntryPermitLocation,
|
|
120
|
+
nullable: false,
|
|
121
|
+
})
|
|
122
|
+
location: AirportEntryPermitLocation;
|
|
123
|
+
|
|
124
|
+
@Column({
|
|
125
|
+
type: "enum",
|
|
126
|
+
enum: AirportEntryPermitType,
|
|
127
|
+
nullable: false,
|
|
128
|
+
})
|
|
129
|
+
type_of_permit: AirportEntryPermitType;
|
|
130
|
+
|
|
131
|
+
@Column({ type: 'time', nullable: true })
|
|
132
|
+
temporary_start_time: string | null;
|
|
133
|
+
|
|
134
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
135
|
+
temporary_duration: string | null;
|
|
136
|
+
|
|
137
|
+
@Column({ type: 'text', array: true, nullable: false })
|
|
138
|
+
permission_to_required_areas: AirportEntryPermitArea[];
|
|
139
|
+
|
|
140
|
+
@Column({ type: 'text', nullable: true })
|
|
141
|
+
attachment_url: string | null;
|
|
142
|
+
|
|
143
|
+
@Column({ type: 'text', nullable: false })
|
|
144
|
+
details: string;
|
|
145
|
+
|
|
146
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
147
|
+
occupation_staff: string;
|
|
148
|
+
|
|
149
|
+
// Visitor fields (optional)
|
|
150
|
+
@Column({ type: 'text', array: true, nullable: true })
|
|
151
|
+
for_visitor: VisitorOption[] | null;
|
|
152
|
+
|
|
153
|
+
// Acknowledgement fields (from form checkboxes)
|
|
154
|
+
@Column({ type: 'boolean', default: false })
|
|
155
|
+
acknowledge_security_policies: boolean;
|
|
156
|
+
|
|
157
|
+
@Column({ type: 'boolean', default: false })
|
|
158
|
+
acknowledge_disciplinary_action: boolean;
|
|
159
|
+
|
|
160
|
+
// Consent fields (for approvers - not in create form)
|
|
161
|
+
@Column({ type: 'boolean', default: false })
|
|
162
|
+
consent_approve_to_issue_permit: boolean;
|
|
163
|
+
|
|
164
|
+
@Column({ type: 'boolean', default: false })
|
|
165
|
+
consent_do_not_approve_to_issue_permit: boolean;
|
|
166
|
+
|
|
167
|
+
@Column({ type: 'text', nullable: true })
|
|
168
|
+
consent_justification: string | null;
|
|
169
|
+
|
|
170
|
+
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
171
|
+
requested_by: string;
|
|
172
|
+
|
|
173
|
+
constructor(
|
|
174
|
+
name_full_family_name: string,
|
|
175
|
+
nationality: string,
|
|
176
|
+
dob: Date,
|
|
177
|
+
place: string,
|
|
178
|
+
passport_id_card_no: string,
|
|
179
|
+
category_of_permit: AirportEntryPermitCategory,
|
|
180
|
+
date_of_submission: Date,
|
|
181
|
+
phone_number: string,
|
|
182
|
+
location: AirportEntryPermitLocation,
|
|
183
|
+
type_of_permit: AirportEntryPermitType,
|
|
184
|
+
permission_to_required_areas: AirportEntryPermitArea[],
|
|
185
|
+
details: string,
|
|
186
|
+
occupation_staff: string,
|
|
187
|
+
requested_by: string,
|
|
188
|
+
user_id: number,
|
|
189
|
+
status: AirportEntryPermitStatus = AirportEntryPermitStatus.PENDING,
|
|
190
|
+
service_id?: number | null,
|
|
191
|
+
sub_service_id?: number | null,
|
|
192
|
+
service_type?: string | null,
|
|
193
|
+
workflow_execution_id?: string | null,
|
|
194
|
+
req_user_department_id?: number | null,
|
|
195
|
+
req_user_section_id?: number | null,
|
|
196
|
+
attachment_url?: string | null,
|
|
197
|
+
temporary_start_time?: string | null,
|
|
198
|
+
temporary_duration?: string | null,
|
|
199
|
+
for_visitor?: VisitorOption[] | null,
|
|
200
|
+
acknowledge_security_policies: boolean = false,
|
|
201
|
+
acknowledge_disciplinary_action: boolean = false,
|
|
202
|
+
consent_approve_to_issue_permit: boolean = false,
|
|
203
|
+
consent_do_not_approve_to_issue_permit: boolean = false,
|
|
204
|
+
consent_justification?: string | null,
|
|
205
|
+
request_id?: string | null
|
|
206
|
+
) {
|
|
207
|
+
super();
|
|
208
|
+
this.name_full_family_name = name_full_family_name;
|
|
209
|
+
this.nationality = nationality;
|
|
210
|
+
this.dob = dob;
|
|
211
|
+
this.place = place;
|
|
212
|
+
this.passport_id_card_no = passport_id_card_no;
|
|
213
|
+
this.category_of_permit = category_of_permit;
|
|
214
|
+
this.date_of_submission = date_of_submission;
|
|
215
|
+
this.phone_number = phone_number;
|
|
216
|
+
this.location = location;
|
|
217
|
+
this.type_of_permit = type_of_permit;
|
|
218
|
+
this.permission_to_required_areas = permission_to_required_areas;
|
|
219
|
+
this.details = details;
|
|
220
|
+
this.occupation_staff = occupation_staff;
|
|
221
|
+
this.requested_by = requested_by;
|
|
222
|
+
this.user_id = user_id;
|
|
223
|
+
this.status = status;
|
|
224
|
+
this.service_id = service_id ?? null;
|
|
225
|
+
this.sub_service_id = sub_service_id ?? null;
|
|
226
|
+
this.service_type = service_type ?? null;
|
|
227
|
+
this.workflow_execution_id = workflow_execution_id ?? null;
|
|
228
|
+
this.req_user_department_id = req_user_department_id ?? null;
|
|
229
|
+
this.req_user_section_id = req_user_section_id ?? null;
|
|
230
|
+
this.attachment_url = attachment_url ?? null;
|
|
231
|
+
this.temporary_start_time = temporary_start_time ?? null;
|
|
232
|
+
this.temporary_duration = temporary_duration ?? null;
|
|
233
|
+
this.for_visitor = for_visitor ?? null;
|
|
234
|
+
this.acknowledge_security_policies = acknowledge_security_policies;
|
|
235
|
+
this.acknowledge_disciplinary_action = acknowledge_disciplinary_action;
|
|
236
|
+
this.consent_approve_to_issue_permit = consent_approve_to_issue_permit;
|
|
237
|
+
this.consent_do_not_approve_to_issue_permit = consent_do_not_approve_to_issue_permit;
|
|
238
|
+
this.consent_justification = consent_justification ?? null;
|
|
239
|
+
this.request_id = request_id ?? null;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum AirportEntryPermitWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@Entity({ name: 'airport_entry_permit_workflows' })
|
|
11
|
+
export class AirportEntryPermitWorkFlow extends BaseModel {
|
|
12
|
+
@Column({ type: 'integer', nullable: false })
|
|
13
|
+
request_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'integer', nullable: true })
|
|
16
|
+
service_id: number | null;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'integer', nullable: true })
|
|
19
|
+
sub_service_id: number | null;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
22
|
+
content: string;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'enum', enum: AirportEntryPermitWorkFlowStatus, default: AirportEntryPermitWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
25
|
+
status: AirportEntryPermitWorkFlowStatus;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'integer', nullable: true })
|
|
28
|
+
user_id: number | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'integer', nullable: true })
|
|
31
|
+
role_id: number | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'integer', nullable: true })
|
|
34
|
+
department_id: number | null;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'integer', nullable: true })
|
|
37
|
+
section_id: number | null;
|
|
38
|
+
|
|
39
|
+
constructor(
|
|
40
|
+
request_id: number,
|
|
41
|
+
content: string,
|
|
42
|
+
status: AirportEntryPermitWorkFlowStatus,
|
|
43
|
+
service_id?: number,
|
|
44
|
+
sub_service_id?: number,
|
|
45
|
+
user_id?: number,
|
|
46
|
+
role_id?: number,
|
|
47
|
+
department_id?: number,
|
|
48
|
+
section_id?: number
|
|
49
|
+
) {
|
|
50
|
+
super();
|
|
51
|
+
this.request_id = request_id;
|
|
52
|
+
this.service_id = service_id || null;
|
|
53
|
+
this.sub_service_id = sub_service_id || null;
|
|
54
|
+
this.content = content;
|
|
55
|
+
this.status = status;
|
|
56
|
+
this.user_id = user_id || null;
|
|
57
|
+
this.role_id = role_id || null;
|
|
58
|
+
this.department_id = department_id || null;
|
|
59
|
+
this.section_id = section_id || null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|