@platform-modules/civil-aviation-authority 2.2.85 → 2.2.86
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 -10
- package/dist/data-source.js +10 -10
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/models/AccessCardChatModel.d.ts +1 -4
- package/dist/models/AccessCardChatModel.js +5 -16
- package/dist/models/{SecurityAwarenessApprovalModel.d.ts → AirportEntryPermitApprovalModel.d.ts} +4 -4
- package/dist/models/{SecurityAwarenessApprovalModel.js → AirportEntryPermitApprovalModel.js} +27 -27
- package/dist/models/AirportEntryPermitAttachmentModel.d.ts +14 -0
- package/dist/models/{SecurityAwarenessAttachmentModel.js → AirportEntryPermitAttachmentModel.js} +26 -16
- package/dist/models/AirportEntryPermitChatModel.d.ts +17 -0
- package/dist/models/AirportEntryPermitChatModel.js +67 -0
- package/dist/models/AirportEntryPermitModel.d.ts +75 -0
- package/dist/models/AirportEntryPermitModel.js +253 -0
- package/dist/models/AirportEntryPermitWorkflowModel.d.ts +14 -0
- package/dist/models/{SecurityAwarenessWorkflowModel.js → AirportEntryPermitWorkflowModel.js} +18 -19
- package/dist/models/HotelreservationModal.d.ts +30 -0
- package/dist/models/HotelreservationModal.js +119 -0
- package/dist/models/SecurityThreatApprovalModel.js +1 -1
- package/dist/models/SecurityThreatChatModel.d.ts +1 -4
- package/dist/models/SecurityThreatChatModel.js +2 -13
- package/dist/models/VpnRequestChatModel.d.ts +1 -2
- package/dist/models/VpnRequestChatModel.js +2 -7
- package/dist/models/VpnWorkflowModel.d.ts +1 -4
- package/dist/models/VpnWorkflowModel.js +2 -17
- package/package.json +1 -1
- package/src/data-source.ts +10 -10
- package/src/index.ts +5 -5
- package/src/models/AccessCardChatModel.ts +4 -15
- package/src/models/{SecurityAwarenessApprovalModel.ts → AirportEntryPermitApprovalModel.ts} +10 -11
- package/src/models/AirportEntryPermitAttachmentModel.ts +62 -0
- package/src/models/AirportEntryPermitChatModel.ts +55 -0
- package/src/models/AirportEntryPermitModel.ts +246 -0
- package/src/models/{SecurityAwarenessWorkflowModel.ts → AirportEntryPermitWorkflowModel.ts} +11 -12
- package/src/models/SecurityThreatApprovalModel.ts +1 -1
- package/src/models/SecurityThreatChatModel.ts +1 -12
- package/src/models/VpnRequestChatModel.ts +1 -6
- package/src/models/VpnWorkflowModel.ts +1 -16
- package/dist/models/SecurityAwarenessAttachmentModel.d.ts +0 -12
- package/dist/models/SecurityAwarenessChatModel.d.ts +0 -20
- package/dist/models/SecurityAwarenessChatModel.js +0 -78
- package/dist/models/SecurityAwarenessRequestModel.d.ts +0 -29
- package/dist/models/SecurityAwarenessRequestModel.js +0 -117
- package/dist/models/SecurityAwarenessWorkflowModel.d.ts +0 -14
- package/src/models/SecurityAwarenessAttachmentModel.ts +0 -52
- package/src/models/SecurityAwarenessChatModel.ts +0 -66
- package/src/models/SecurityAwarenessRequestModel.ts +0 -105
|
@@ -19,15 +19,12 @@ var VpnWorkFlowStatus;
|
|
|
19
19
|
VpnWorkFlowStatus["PENDING"] = "Pending";
|
|
20
20
|
})(VpnWorkFlowStatus || (exports.VpnWorkFlowStatus = VpnWorkFlowStatus = {}));
|
|
21
21
|
let VpnWorkFlow = class VpnWorkFlow extends BaseModel_1.BaseModel {
|
|
22
|
-
constructor(request_id, content, status, order
|
|
22
|
+
constructor(request_id, content, status, order) {
|
|
23
23
|
super();
|
|
24
24
|
this.request_id = request_id;
|
|
25
25
|
this.content = content;
|
|
26
26
|
this.status = status;
|
|
27
27
|
this.order = order || null;
|
|
28
|
-
this.approver_role_id = approver_role_id || null;
|
|
29
|
-
this.approver_user_id = approver_user_id || null;
|
|
30
|
-
this.approved_by = approved_by || null;
|
|
31
28
|
}
|
|
32
29
|
};
|
|
33
30
|
exports.VpnWorkFlow = VpnWorkFlow;
|
|
@@ -43,18 +40,6 @@ __decorate([
|
|
|
43
40
|
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
44
41
|
__metadata("design:type", String)
|
|
45
42
|
], VpnWorkFlow.prototype, "content", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
48
|
-
__metadata("design:type", Object)
|
|
49
|
-
], VpnWorkFlow.prototype, "approver_role_id", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
52
|
-
__metadata("design:type", Object)
|
|
53
|
-
], VpnWorkFlow.prototype, "approver_user_id", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
56
|
-
__metadata("design:type", Object)
|
|
57
|
-
], VpnWorkFlow.prototype, "approved_by", void 0);
|
|
58
43
|
__decorate([
|
|
59
44
|
(0, typeorm_1.Column)({
|
|
60
45
|
type: "enum",
|
|
@@ -66,5 +51,5 @@ __decorate([
|
|
|
66
51
|
], VpnWorkFlow.prototype, "status", void 0);
|
|
67
52
|
exports.VpnWorkFlow = VpnWorkFlow = __decorate([
|
|
68
53
|
(0, typeorm_1.Entity)({ name: "vpn_work_flows" }),
|
|
69
|
-
__metadata("design:paramtypes", [Number, String, String, Number
|
|
54
|
+
__metadata("design:paramtypes", [Number, String, String, Number])
|
|
70
55
|
], VpnWorkFlow);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -62,11 +62,11 @@ import { SecurityThreatApproval } from './models/SecurityThreatApprovalModel';
|
|
|
62
62
|
import { SecurityThreatAttachment } from './models/SecurityThreatAttachmentModel';
|
|
63
63
|
import { SecurityThreatChat } from './models/SecurityThreatChatModel';
|
|
64
64
|
import { SecurityThreatWorkFlow } from './models/SecurityThreatWorkflowModel';
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
65
|
+
import { AirportEntryPermit } from './models/AirportEntryPermitModel';
|
|
66
|
+
import { AirportEntryPermitChat } from './models/AirportEntryPermitChatModel';
|
|
67
|
+
import { AirportEntryPermitAttachment } from './models/AirportEntryPermitAttachmentModel';
|
|
68
|
+
import { AirportEntryPermitApproval } from './models/AirportEntryPermitApprovalModel';
|
|
69
|
+
import { AirportEntryPermitWorkFlow } from './models/AirportEntryPermitWorkflowModel';
|
|
70
70
|
|
|
71
71
|
export const AppDataSource = new DataSource({
|
|
72
72
|
type: 'postgres',
|
|
@@ -136,10 +136,10 @@ export const AppDataSource = new DataSource({
|
|
|
136
136
|
SecurityThreatAttachment,
|
|
137
137
|
SecurityThreatChat,
|
|
138
138
|
SecurityThreatWorkFlow,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
AirportEntryPermit,
|
|
140
|
+
AirportEntryPermitChat,
|
|
141
|
+
AirportEntryPermitAttachment,
|
|
142
|
+
AirportEntryPermitApproval,
|
|
143
|
+
AirportEntryPermitWorkFlow
|
|
144
144
|
],
|
|
145
145
|
});
|
package/src/index.ts
CHANGED
|
@@ -57,8 +57,8 @@ export * from './models/SecurityThreatApprovalModel';
|
|
|
57
57
|
export * from './models/SecurityThreatAttachmentModel';
|
|
58
58
|
export * from './models/SecurityThreatChatModel';
|
|
59
59
|
export * from './models/SecurityThreatWorkflowModel';
|
|
60
|
-
export * from './models/
|
|
61
|
-
export * from './models/
|
|
62
|
-
export * from './models/
|
|
63
|
-
export * from './models/
|
|
64
|
-
export * from './models/
|
|
60
|
+
export * from './models/AirportEntryPermitModel';
|
|
61
|
+
export * from './models/AirportEntryPermitChatModel';
|
|
62
|
+
export * from './models/AirportEntryPermitAttachmentModel';
|
|
63
|
+
export * from './models/AirportEntryPermitApprovalModel';
|
|
64
|
+
export * from './models/AirportEntryPermitWorkflowModel';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from "./BaseModel";
|
|
3
|
-
import { AccessCardApprovalStatus } from "./AccessCardApprovalModel";
|
|
4
3
|
|
|
5
4
|
export enum AccessCardMessageType {
|
|
6
5
|
TEXT = "text",
|
|
@@ -24,9 +23,6 @@ export class AccessCardRequestChat extends BaseModel {
|
|
|
24
23
|
@Column({ type: "integer", nullable: false })
|
|
25
24
|
user_id: number;
|
|
26
25
|
|
|
27
|
-
@Column({ type: "integer", nullable: true })
|
|
28
|
-
role_id: number;
|
|
29
|
-
|
|
30
26
|
@Column({ type: "text", nullable: false })
|
|
31
27
|
message: string;
|
|
32
28
|
|
|
@@ -38,28 +34,21 @@ export class AccessCardRequestChat extends BaseModel {
|
|
|
38
34
|
})
|
|
39
35
|
messageType: AccessCardMessageType;
|
|
40
36
|
|
|
41
|
-
@Column({ type: 'enum', enum: AccessCardApprovalStatus, default: AccessCardApprovalStatus.PENDING, nullable: false })
|
|
42
|
-
status: AccessCardApprovalStatus;
|
|
43
|
-
|
|
44
37
|
constructor(
|
|
45
38
|
request_id: number,
|
|
46
39
|
user_id: number,
|
|
47
|
-
role_id: number,
|
|
48
40
|
message: string,
|
|
49
41
|
service_id?: number,
|
|
50
42
|
sub_service_id?: number,
|
|
51
|
-
messageType?: AccessCardMessageType
|
|
52
|
-
status?: AccessCardApprovalStatus
|
|
43
|
+
messageType?: AccessCardMessageType
|
|
53
44
|
) {
|
|
54
45
|
super();
|
|
55
46
|
this.request_id = request_id;
|
|
56
|
-
this.service_id = service_id
|
|
57
|
-
this.sub_service_id = sub_service_id
|
|
47
|
+
this.service_id = service_id ?? null;
|
|
48
|
+
this.sub_service_id = sub_service_id ?? null;
|
|
58
49
|
this.user_id = user_id;
|
|
59
|
-
this.role_id = role_id;
|
|
60
50
|
this.message = message;
|
|
61
|
-
this.messageType = messageType
|
|
62
|
-
this.status = status || AccessCardApprovalStatus.PENDING;
|
|
51
|
+
this.messageType = messageType ?? AccessCardMessageType.TEXT;
|
|
63
52
|
}
|
|
64
53
|
}
|
|
65
54
|
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
export enum SecurityAwarenessApprovalStatus {
|
|
4
|
+
export enum AirportEntryPermitApprovalStatus {
|
|
6
5
|
PENDING = "Pending",
|
|
7
6
|
IN_PROGRESS = "In Progress",
|
|
8
7
|
APPROVED = "Approved",
|
|
9
8
|
REJECTED = "Rejected"
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
@Entity({ name: '
|
|
13
|
-
export class
|
|
11
|
+
@Entity({ name: 'airport_entry_permit_approvals' })
|
|
12
|
+
export class AirportEntryPermitApproval extends BaseModel {
|
|
14
13
|
@Column({ type: 'integer', nullable: false })
|
|
15
14
|
request_id: number;
|
|
16
15
|
|
|
@@ -23,7 +22,7 @@ export class SecurityAwarenessApproval extends BaseModel {
|
|
|
23
22
|
@Column({ type: 'integer', nullable: false })
|
|
24
23
|
level: number;
|
|
25
24
|
|
|
26
|
-
@Column({ type: 'integer', nullable:
|
|
25
|
+
@Column({ type: 'integer', nullable: false })
|
|
27
26
|
approver_role_id: number;
|
|
28
27
|
|
|
29
28
|
@Column({ type: 'integer', nullable: true })
|
|
@@ -44,14 +43,14 @@ export class SecurityAwarenessApproval extends BaseModel {
|
|
|
44
43
|
@Column({ type: 'varchar', length: 500, nullable: true, default: '' })
|
|
45
44
|
comment: string;
|
|
46
45
|
|
|
47
|
-
@Column({ type: 'enum', enum:
|
|
48
|
-
approval_status:
|
|
46
|
+
@Column({ type: 'enum', enum: AirportEntryPermitApprovalStatus, default: AirportEntryPermitApprovalStatus.PENDING, nullable: false })
|
|
47
|
+
approval_status: AirportEntryPermitApprovalStatus;
|
|
49
48
|
|
|
50
49
|
constructor(
|
|
51
|
-
request_id: number,
|
|
52
|
-
approver_role_id: number,
|
|
53
|
-
comment: string,
|
|
54
|
-
approval_status:
|
|
50
|
+
request_id: number,
|
|
51
|
+
approver_role_id: number,
|
|
52
|
+
comment: string,
|
|
53
|
+
approval_status: AirportEntryPermitApprovalStatus,
|
|
55
54
|
level: number,
|
|
56
55
|
department_id?: number | null,
|
|
57
56
|
section_id?: number | null,
|
|
@@ -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,246 @@
|
|
|
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
|
+
@Entity({ name: 'airport_entry_permits' })
|
|
47
|
+
export class AirportEntryPermit extends BaseModel {
|
|
48
|
+
// Workflow fields
|
|
49
|
+
@Column({ type: 'int', nullable: true })
|
|
50
|
+
req_user_department_id: number | null;
|
|
51
|
+
|
|
52
|
+
@Column({ type: 'int', nullable: true })
|
|
53
|
+
req_user_section_id: number | null;
|
|
54
|
+
|
|
55
|
+
@Column({ type: 'int', nullable: true })
|
|
56
|
+
service_id: number | null;
|
|
57
|
+
|
|
58
|
+
@Column({ type: 'int', nullable: true })
|
|
59
|
+
sub_service_id: number | null;
|
|
60
|
+
|
|
61
|
+
@Column({ type: 'varchar', length: 20, nullable: true })
|
|
62
|
+
service_type: string | null;
|
|
63
|
+
|
|
64
|
+
@Column({ type: 'varchar', nullable: true })
|
|
65
|
+
workflow_execution_id: string | null;
|
|
66
|
+
|
|
67
|
+
@Column({
|
|
68
|
+
type: "enum",
|
|
69
|
+
enum: AirportEntryPermitStatus,
|
|
70
|
+
default: AirportEntryPermitStatus.PENDING,
|
|
71
|
+
nullable: false,
|
|
72
|
+
})
|
|
73
|
+
status: AirportEntryPermitStatus;
|
|
74
|
+
|
|
75
|
+
@Column({ nullable: false })
|
|
76
|
+
user_id: number;
|
|
77
|
+
|
|
78
|
+
// Request ID - Auto generated
|
|
79
|
+
@Column({ type: 'varchar', length: 50, nullable: true, unique: true })
|
|
80
|
+
request_id: string | null;
|
|
81
|
+
|
|
82
|
+
// User fields from requirements
|
|
83
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
84
|
+
name_full_family_name: string;
|
|
85
|
+
|
|
86
|
+
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
87
|
+
nationality: string;
|
|
88
|
+
|
|
89
|
+
@Column({ type: 'date', nullable: false })
|
|
90
|
+
dob: Date;
|
|
91
|
+
|
|
92
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
93
|
+
place: string;
|
|
94
|
+
|
|
95
|
+
@Column({ type: 'varchar', length: 50, nullable: false })
|
|
96
|
+
passport_id_card_no: string;
|
|
97
|
+
|
|
98
|
+
@Column({
|
|
99
|
+
type: "enum",
|
|
100
|
+
enum: AirportEntryPermitCategory,
|
|
101
|
+
nullable: false,
|
|
102
|
+
})
|
|
103
|
+
category_of_permit: AirportEntryPermitCategory;
|
|
104
|
+
|
|
105
|
+
@Column({ type: 'date', nullable: false })
|
|
106
|
+
date_of_submission: Date;
|
|
107
|
+
|
|
108
|
+
@Column({ type: 'varchar', length: 20, nullable: false })
|
|
109
|
+
phone_number: string;
|
|
110
|
+
|
|
111
|
+
@Column({
|
|
112
|
+
type: "enum",
|
|
113
|
+
enum: AirportEntryPermitLocation,
|
|
114
|
+
nullable: false,
|
|
115
|
+
})
|
|
116
|
+
location: AirportEntryPermitLocation;
|
|
117
|
+
|
|
118
|
+
@Column({
|
|
119
|
+
type: "enum",
|
|
120
|
+
enum: AirportEntryPermitType,
|
|
121
|
+
nullable: false,
|
|
122
|
+
})
|
|
123
|
+
type_of_permit: AirportEntryPermitType;
|
|
124
|
+
|
|
125
|
+
@Column({ type: 'time', nullable: true })
|
|
126
|
+
temporary_start_time: string | null;
|
|
127
|
+
|
|
128
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
129
|
+
temporary_duration: string | null;
|
|
130
|
+
|
|
131
|
+
@Column({ type: 'text', array: true, nullable: false })
|
|
132
|
+
permission_to_required_areas: AirportEntryPermitArea[];
|
|
133
|
+
|
|
134
|
+
@Column({ type: 'text', nullable: true })
|
|
135
|
+
attachment_url: string | null;
|
|
136
|
+
|
|
137
|
+
@Column({ type: 'text', nullable: false })
|
|
138
|
+
details: string;
|
|
139
|
+
|
|
140
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
141
|
+
occupation_staff: string;
|
|
142
|
+
|
|
143
|
+
// Visitor fields (optional)
|
|
144
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
145
|
+
visitor_visa_type: string | null;
|
|
146
|
+
|
|
147
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
148
|
+
visitor_visa_no: string | null;
|
|
149
|
+
|
|
150
|
+
@Column({ type: 'date', nullable: true })
|
|
151
|
+
visitor_visa_expiry_date: Date | 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
|
+
visitor_visa_type?: string | null,
|
|
200
|
+
visitor_visa_no?: string | null,
|
|
201
|
+
visitor_visa_expiry_date?: Date | null,
|
|
202
|
+
acknowledge_security_policies: boolean = false,
|
|
203
|
+
acknowledge_disciplinary_action: boolean = false,
|
|
204
|
+
consent_approve_to_issue_permit: boolean = false,
|
|
205
|
+
consent_do_not_approve_to_issue_permit: boolean = false,
|
|
206
|
+
consent_justification?: string | null,
|
|
207
|
+
request_id?: string | null
|
|
208
|
+
) {
|
|
209
|
+
super();
|
|
210
|
+
this.name_full_family_name = name_full_family_name;
|
|
211
|
+
this.nationality = nationality;
|
|
212
|
+
this.dob = dob;
|
|
213
|
+
this.place = place;
|
|
214
|
+
this.passport_id_card_no = passport_id_card_no;
|
|
215
|
+
this.category_of_permit = category_of_permit;
|
|
216
|
+
this.date_of_submission = date_of_submission;
|
|
217
|
+
this.phone_number = phone_number;
|
|
218
|
+
this.location = location;
|
|
219
|
+
this.type_of_permit = type_of_permit;
|
|
220
|
+
this.permission_to_required_areas = permission_to_required_areas;
|
|
221
|
+
this.details = details;
|
|
222
|
+
this.occupation_staff = occupation_staff;
|
|
223
|
+
this.requested_by = requested_by;
|
|
224
|
+
this.user_id = user_id;
|
|
225
|
+
this.status = status;
|
|
226
|
+
this.service_id = service_id ?? null;
|
|
227
|
+
this.sub_service_id = sub_service_id ?? null;
|
|
228
|
+
this.service_type = service_type ?? null;
|
|
229
|
+
this.workflow_execution_id = workflow_execution_id ?? null;
|
|
230
|
+
this.req_user_department_id = req_user_department_id ?? null;
|
|
231
|
+
this.req_user_section_id = req_user_section_id ?? null;
|
|
232
|
+
this.attachment_url = attachment_url ?? null;
|
|
233
|
+
this.temporary_start_time = temporary_start_time ?? null;
|
|
234
|
+
this.temporary_duration = temporary_duration ?? null;
|
|
235
|
+
this.visitor_visa_type = visitor_visa_type ?? null;
|
|
236
|
+
this.visitor_visa_no = visitor_visa_no ?? null;
|
|
237
|
+
this.visitor_visa_expiry_date = visitor_visa_expiry_date ?? null;
|
|
238
|
+
this.acknowledge_security_policies = acknowledge_security_policies;
|
|
239
|
+
this.acknowledge_disciplinary_action = acknowledge_disciplinary_action;
|
|
240
|
+
this.consent_approve_to_issue_permit = consent_approve_to_issue_permit;
|
|
241
|
+
this.consent_do_not_approve_to_issue_permit = consent_do_not_approve_to_issue_permit;
|
|
242
|
+
this.consent_justification = consent_justification ?? null;
|
|
243
|
+
this.request_id = request_id ?? null;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
-
export enum
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export enum AirportEntryPermitWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending"
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export class SecurityAwarenessWorkFlow extends BaseModel {
|
|
10
|
+
@Entity({ name: 'airport_entry_permit_workflows' })
|
|
11
|
+
export class AirportEntryPermitWorkFlow extends BaseModel {
|
|
13
12
|
@Column({ type: 'integer', nullable: false })
|
|
14
13
|
request_id: number;
|
|
15
14
|
|
|
@@ -22,13 +21,13 @@ export class SecurityAwarenessWorkFlow extends BaseModel {
|
|
|
22
21
|
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
23
22
|
content: string;
|
|
24
23
|
|
|
25
|
-
@Column({ type: 'enum', enum:
|
|
26
|
-
status:
|
|
24
|
+
@Column({ type: 'enum', enum: AirportEntryPermitWorkFlowStatus, default: AirportEntryPermitWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
25
|
+
status: AirportEntryPermitWorkFlowStatus;
|
|
27
26
|
|
|
28
27
|
constructor(
|
|
29
|
-
request_id: number,
|
|
30
|
-
content: string,
|
|
31
|
-
status:
|
|
28
|
+
request_id: number,
|
|
29
|
+
content: string,
|
|
30
|
+
status: AirportEntryPermitWorkFlowStatus,
|
|
32
31
|
service_id?: number,
|
|
33
32
|
sub_service_id?: number
|
|
34
33
|
) {
|
|
@@ -23,7 +23,7 @@ export class SecurityThreatApproval extends BaseModel {
|
|
|
23
23
|
@Column({ type: 'integer', nullable: false })
|
|
24
24
|
level: number;
|
|
25
25
|
|
|
26
|
-
@Column({ type: 'integer', nullable:
|
|
26
|
+
@Column({ type: 'integer', nullable: false })
|
|
27
27
|
approver_role_id: number;
|
|
28
28
|
|
|
29
29
|
@Column({ type: 'integer', nullable: true })
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
-
import { SecurityThreatApprovalStatus } from './SecurityThreatApprovalModel';
|
|
4
3
|
|
|
5
4
|
export enum SecurityThreatMessageType {
|
|
6
5
|
TEXT = "text",
|
|
@@ -25,9 +24,6 @@ export class SecurityThreatChat extends BaseModel {
|
|
|
25
24
|
@Column({ type: 'integer', nullable: false })
|
|
26
25
|
user_id: number;
|
|
27
26
|
|
|
28
|
-
@Column({ type: 'integer', nullable: true })
|
|
29
|
-
role_id: number;
|
|
30
|
-
|
|
31
27
|
@Column({ type: 'text', nullable: false })
|
|
32
28
|
message: string;
|
|
33
29
|
|
|
@@ -39,28 +35,21 @@ export class SecurityThreatChat extends BaseModel {
|
|
|
39
35
|
})
|
|
40
36
|
messageType: SecurityThreatMessageType;
|
|
41
37
|
|
|
42
|
-
@Column({ type: 'enum', enum: SecurityThreatApprovalStatus, default: SecurityThreatApprovalStatus.PENDING, nullable: false })
|
|
43
|
-
status: SecurityThreatApprovalStatus;
|
|
44
|
-
|
|
45
38
|
constructor(
|
|
46
39
|
request_id: number,
|
|
47
40
|
user_id: number,
|
|
48
|
-
role_id: number,
|
|
49
41
|
message: string,
|
|
50
42
|
service_id?: number,
|
|
51
43
|
sub_service_id?: number,
|
|
52
|
-
messageType?: SecurityThreatMessageType
|
|
53
|
-
status?: SecurityThreatApprovalStatus
|
|
44
|
+
messageType?: SecurityThreatMessageType
|
|
54
45
|
) {
|
|
55
46
|
super();
|
|
56
47
|
this.request_id = request_id;
|
|
57
48
|
this.service_id = service_id || null;
|
|
58
49
|
this.sub_service_id = sub_service_id || null;
|
|
59
50
|
this.user_id = user_id;
|
|
60
|
-
this.role_id = role_id;
|
|
61
51
|
this.message = message;
|
|
62
52
|
this.messageType = messageType || SecurityThreatMessageType.TEXT;
|
|
63
|
-
this.status = status || SecurityThreatApprovalStatus.PENDING;
|
|
64
53
|
}
|
|
65
54
|
}
|
|
66
55
|
|