@platform-modules/civil-aviation-authority 2.3.180 → 2.3.183
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +8 -0
- package/dist/models/AccessCardRequestModel.d.ts +2 -2
- package/dist/models/AccessCardRequestModel.js +4 -4
- package/dist/models/AnnualTrainingPlanRequestModel.d.ts +3 -3
- package/dist/models/AnnualTrainingPlanRequestModel.js +5 -5
- package/dist/models/DocumentMetadataModel.d.ts +45 -0
- package/dist/models/DocumentMetadataModel.js +171 -0
- package/dist/models/DocumentationDepartmentsModel.d.ts +13 -0
- package/dist/models/DocumentationDepartmentsModel.js +53 -0
- package/dist/models/FolderModel.d.ts +16 -0
- package/dist/models/FolderModel.js +85 -0
- package/dist/models/PermissionModel.d.ts +18 -0
- package/dist/models/PermissionModel.js +68 -0
- package/dist/models/TrainingRequestModel.d.ts +13 -3
- package/dist/models/TrainingRequestModel.js +21 -6
- package/dist/models/UUIDBaseModel.d.ts +14 -0
- package/dist/models/UUIDBaseModel.js +66 -0
- package/package.json +24 -24
- package/src/data-source.ts +385 -385
- package/src/models/AccessCardRequestModel.ts +4 -4
- package/src/models/AirportEntryPermitModel.ts +276 -276
- package/src/models/AnnualTrainingPlanRequestModel.ts +153 -153
- package/src/models/DepartmentsModel.ts +25 -25
- package/src/models/DocumentDriveModel.ts +28 -28
- package/src/models/DocumentFolderModel.ts +45 -45
- package/src/models/HousingContractCancelChatModel.ts +56 -56
- package/src/models/HousingContractRenewalChatModel.ts +59 -59
- package/src/models/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/ResidentialUnitRentalChatModel.ts +56 -56
- package/src/models/ResidentialUnitRentalRequestModel.ts +218 -218
- package/src/models/ServicesNotificationConfigModel.ts +55 -55
- package/src/models/StudyLeaveRequestModel.ts +144 -144
- package/src/models/TrainingRequestModel.ts +164 -148
- package/src/models/TrainingRoomBookingRequestModel.ts +142 -142
- package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
- package/platform-modules-civil-aviation-authority-2.3.179.tgz +0 -0
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
export enum HousingContractRenewalMessageType {
|
|
5
|
-
text = 'text',
|
|
6
|
-
image = 'image',
|
|
7
|
-
video = 'video',
|
|
8
|
-
file = 'file',
|
|
9
|
-
link = 'link'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** Aligns with request-for-coverage / accommodation chat `status` usage */
|
|
13
|
-
export enum HousingContractRenewalChatStatus {
|
|
14
|
-
Pending = 'Pending',
|
|
15
|
-
Received = 'Received',
|
|
16
|
-
Approved = 'Approved',
|
|
17
|
-
Rejected = 'Rejected',
|
|
18
|
-
InProgress = 'In Progress',
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@Entity({ name: 'housing_contract_renewal_chat' })
|
|
22
|
-
export class HousingContractRenewalChat extends BaseModel {
|
|
23
|
-
|
|
24
|
-
@Column({ type: 'int', nullable: false })
|
|
25
|
-
request_id: number;
|
|
26
|
-
|
|
27
|
-
@Column({ type: 'int', nullable: false })
|
|
28
|
-
service_id: number;
|
|
29
|
-
|
|
30
|
-
@Column({ type: 'int', nullable: false })
|
|
31
|
-
sub_service_id: number;
|
|
32
|
-
|
|
33
|
-
/** Message author (same pattern as request_for_coverage_request_chat.user_id) */
|
|
34
|
-
@Column({ type: 'int', nullable: false })
|
|
35
|
-
user_id: number;
|
|
36
|
-
|
|
37
|
-
@Column({ type: 'text', nullable: false })
|
|
38
|
-
message: string;
|
|
39
|
-
|
|
40
|
-
/** Role context for the chat line (e.g. active role when message was posted) */
|
|
41
|
-
@Column({ type: 'int', nullable: true })
|
|
42
|
-
approver_role_id: number | null;
|
|
43
|
-
|
|
44
|
-
@Column({ type: 'varchar', length: 255, nullable: false, default: 'Pending' })
|
|
45
|
-
status: string;
|
|
46
|
-
|
|
47
|
-
@Column({ type: 'varchar', length: 20, nullable: false })
|
|
48
|
-
message_type: string;
|
|
49
|
-
|
|
50
|
-
@Column({ type: 'boolean', nullable: false, default: false })
|
|
51
|
-
is_internal: boolean;
|
|
52
|
-
|
|
53
|
-
@Column({ type: 'int', nullable: false })
|
|
54
|
-
created_by: number;
|
|
55
|
-
|
|
56
|
-
constructor() {
|
|
57
|
-
super();
|
|
58
|
-
}
|
|
59
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum HousingContractRenewalMessageType {
|
|
5
|
+
text = 'text',
|
|
6
|
+
image = 'image',
|
|
7
|
+
video = 'video',
|
|
8
|
+
file = 'file',
|
|
9
|
+
link = 'link'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** Aligns with request-for-coverage / accommodation chat `status` usage */
|
|
13
|
+
export enum HousingContractRenewalChatStatus {
|
|
14
|
+
Pending = 'Pending',
|
|
15
|
+
Received = 'Received',
|
|
16
|
+
Approved = 'Approved',
|
|
17
|
+
Rejected = 'Rejected',
|
|
18
|
+
InProgress = 'In Progress',
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@Entity({ name: 'housing_contract_renewal_chat' })
|
|
22
|
+
export class HousingContractRenewalChat extends BaseModel {
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'int', nullable: false })
|
|
25
|
+
request_id: number;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'int', nullable: false })
|
|
28
|
+
service_id: number;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'int', nullable: false })
|
|
31
|
+
sub_service_id: number;
|
|
32
|
+
|
|
33
|
+
/** Message author (same pattern as request_for_coverage_request_chat.user_id) */
|
|
34
|
+
@Column({ type: 'int', nullable: false })
|
|
35
|
+
user_id: number;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'text', nullable: false })
|
|
38
|
+
message: string;
|
|
39
|
+
|
|
40
|
+
/** Role context for the chat line (e.g. active role when message was posted) */
|
|
41
|
+
@Column({ type: 'int', nullable: true })
|
|
42
|
+
approver_role_id: number | null;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'varchar', length: 255, nullable: false, default: 'Pending' })
|
|
45
|
+
status: string;
|
|
46
|
+
|
|
47
|
+
@Column({ type: 'varchar', length: 20, nullable: false })
|
|
48
|
+
message_type: string;
|
|
49
|
+
|
|
50
|
+
@Column({ type: 'boolean', nullable: false, default: false })
|
|
51
|
+
is_internal: boolean;
|
|
52
|
+
|
|
53
|
+
@Column({ type: 'int', nullable: false })
|
|
54
|
+
created_by: number;
|
|
55
|
+
|
|
56
|
+
constructor() {
|
|
57
|
+
super();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
import { ITHelpDeskRequests } from './ITHelpDeskModel';
|
|
4
|
-
import { User } from './user';
|
|
5
|
-
|
|
6
|
-
@Entity({ name: 'it_request_attachments' })
|
|
7
|
-
export class ITRequestAttachment extends BaseModel {
|
|
8
|
-
|
|
9
|
-
@Column({ type: 'integer', nullable: false })
|
|
10
|
-
request_id: number;
|
|
11
|
-
|
|
12
|
-
@ManyToOne(() => ITHelpDeskRequests)
|
|
13
|
-
@JoinColumn({ name: 'request_id' })
|
|
14
|
-
request: ITHelpDeskRequests;
|
|
15
|
-
|
|
16
|
-
@Column({ type: 'integer', nullable: true })
|
|
17
|
-
service_id: number | null;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'integer', nullable: true })
|
|
20
|
-
sub_service_id: number | null;
|
|
21
|
-
|
|
22
|
-
/** Optional link to it_request_chat when attachment was created from a media chat message */
|
|
23
|
-
@Column({ type: 'integer', nullable: true })
|
|
24
|
-
chat_id: number | null;
|
|
25
|
-
|
|
26
|
-
@Column({ type: 'integer', nullable: false })
|
|
27
|
-
uploaded_by: number;
|
|
28
|
-
|
|
29
|
-
@ManyToOne(() => User)
|
|
30
|
-
@JoinColumn({ name: 'uploaded_by' })
|
|
31
|
-
user: User;
|
|
32
|
-
|
|
33
|
-
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
34
|
-
file_url: string;
|
|
35
|
-
|
|
36
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
37
|
-
file_name: string;
|
|
38
|
-
|
|
39
|
-
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
40
|
-
file_type: string;
|
|
41
|
-
|
|
42
|
-
@Column({ type: 'bigint', nullable: true })
|
|
43
|
-
file_size: number | null;
|
|
44
|
-
|
|
45
|
-
@Column({ type: 'text', nullable: true })
|
|
46
|
-
description: string;
|
|
47
|
-
|
|
48
|
-
constructor(
|
|
49
|
-
request_id: number,
|
|
50
|
-
uploaded_by: number,
|
|
51
|
-
file_url: string,
|
|
52
|
-
file_name?: string,
|
|
53
|
-
file_type?: string,
|
|
54
|
-
file_size?: number,
|
|
55
|
-
description?: string,
|
|
56
|
-
service_id?: number | null,
|
|
57
|
-
sub_service_id?: number | null,
|
|
58
|
-
chat_id?: number | null
|
|
59
|
-
) {
|
|
60
|
-
super();
|
|
61
|
-
this.request_id = request_id;
|
|
62
|
-
this.uploaded_by = uploaded_by;
|
|
63
|
-
this.file_url = file_url;
|
|
64
|
-
this.file_name = file_name || '';
|
|
65
|
-
this.file_type = file_type || '';
|
|
66
|
-
this.file_size = file_size || null;
|
|
67
|
-
this.description = description || '';
|
|
68
|
-
this.service_id = service_id ?? null;
|
|
69
|
-
this.sub_service_id = sub_service_id ?? null;
|
|
70
|
-
this.chat_id = chat_id ?? null;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { ITHelpDeskRequests } from './ITHelpDeskModel';
|
|
4
|
+
import { User } from './user';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'it_request_attachments' })
|
|
7
|
+
export class ITRequestAttachment extends BaseModel {
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'integer', nullable: false })
|
|
10
|
+
request_id: number;
|
|
11
|
+
|
|
12
|
+
@ManyToOne(() => ITHelpDeskRequests)
|
|
13
|
+
@JoinColumn({ name: 'request_id' })
|
|
14
|
+
request: ITHelpDeskRequests;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'integer', nullable: true })
|
|
17
|
+
service_id: number | null;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
sub_service_id: number | null;
|
|
21
|
+
|
|
22
|
+
/** Optional link to it_request_chat when attachment was created from a media chat message */
|
|
23
|
+
@Column({ type: 'integer', nullable: true })
|
|
24
|
+
chat_id: number | null;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'integer', nullable: false })
|
|
27
|
+
uploaded_by: number;
|
|
28
|
+
|
|
29
|
+
@ManyToOne(() => User)
|
|
30
|
+
@JoinColumn({ name: 'uploaded_by' })
|
|
31
|
+
user: User;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
34
|
+
file_url: string;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
37
|
+
file_name: string;
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
40
|
+
file_type: string;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'bigint', nullable: true })
|
|
43
|
+
file_size: number | null;
|
|
44
|
+
|
|
45
|
+
@Column({ type: 'text', nullable: true })
|
|
46
|
+
description: string;
|
|
47
|
+
|
|
48
|
+
constructor(
|
|
49
|
+
request_id: number,
|
|
50
|
+
uploaded_by: number,
|
|
51
|
+
file_url: string,
|
|
52
|
+
file_name?: string,
|
|
53
|
+
file_type?: string,
|
|
54
|
+
file_size?: number,
|
|
55
|
+
description?: string,
|
|
56
|
+
service_id?: number | null,
|
|
57
|
+
sub_service_id?: number | null,
|
|
58
|
+
chat_id?: number | null
|
|
59
|
+
) {
|
|
60
|
+
super();
|
|
61
|
+
this.request_id = request_id;
|
|
62
|
+
this.uploaded_by = uploaded_by;
|
|
63
|
+
this.file_url = file_url;
|
|
64
|
+
this.file_name = file_name || '';
|
|
65
|
+
this.file_type = file_type || '';
|
|
66
|
+
this.file_size = file_size || null;
|
|
67
|
+
this.description = description || '';
|
|
68
|
+
this.service_id = service_id ?? null;
|
|
69
|
+
this.sub_service_id = sub_service_id ?? null;
|
|
70
|
+
this.chat_id = chat_id ?? null;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
import { ITHelpDeskRequests } from './ITHelpDeskModel';
|
|
4
|
-
import { User } from './user';
|
|
5
|
-
|
|
6
|
-
/** Same set as hotel / logistics / event-support chat */
|
|
7
|
-
export enum ITHelpDeskMessageType {
|
|
8
|
-
TEXT = 'text',
|
|
9
|
-
IMAGE = 'image',
|
|
10
|
-
VIDEO = 'video',
|
|
11
|
-
FILE = 'file',
|
|
12
|
-
LINK = 'link',
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@Entity({ name: 'it_request_chat' })
|
|
16
|
-
export class ITRequestChat extends BaseModel {
|
|
17
|
-
|
|
18
|
-
@Column({ type: 'integer', nullable: false })
|
|
19
|
-
request_id: number;
|
|
20
|
-
|
|
21
|
-
@ManyToOne(() => ITHelpDeskRequests)
|
|
22
|
-
@JoinColumn({ name: 'request_id' })
|
|
23
|
-
request: ITHelpDeskRequests;
|
|
24
|
-
|
|
25
|
-
@Column({ type: 'integer', nullable: true })
|
|
26
|
-
service_id: number | null;
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'integer', nullable: true })
|
|
29
|
-
sub_service_id: number | null;
|
|
30
|
-
|
|
31
|
-
@Column({ type: 'integer', nullable: false })
|
|
32
|
-
user_id: number;
|
|
33
|
-
|
|
34
|
-
@ManyToOne(() => User)
|
|
35
|
-
@JoinColumn({ name: 'user_id' })
|
|
36
|
-
user: User;
|
|
37
|
-
|
|
38
|
-
@Column({ type: 'integer', nullable: true })
|
|
39
|
-
role_id: number | null;
|
|
40
|
-
|
|
41
|
-
@Column({ type: 'text', nullable: false })
|
|
42
|
-
message: string;
|
|
43
|
-
|
|
44
|
-
@Column({ type: 'varchar', length: 20, nullable: false, default: ITHelpDeskMessageType.TEXT })
|
|
45
|
-
message_type: string;
|
|
46
|
-
|
|
47
|
-
@Column({ type: 'text', nullable: true })
|
|
48
|
-
status: string | null;
|
|
49
|
-
|
|
50
|
-
@Column({ type: 'boolean', default: false })
|
|
51
|
-
is_internal: boolean;
|
|
52
|
-
|
|
53
|
-
constructor(
|
|
54
|
-
request_id: number,
|
|
55
|
-
user_id: number,
|
|
56
|
-
message: string,
|
|
57
|
-
is_internal?: boolean,
|
|
58
|
-
service_id?: number | null,
|
|
59
|
-
sub_service_id?: number | null,
|
|
60
|
-
role_id?: number | null,
|
|
61
|
-
status?: string | null
|
|
62
|
-
) {
|
|
63
|
-
super();
|
|
64
|
-
this.request_id = request_id;
|
|
65
|
-
this.service_id = service_id || null;
|
|
66
|
-
this.sub_service_id = sub_service_id || null;
|
|
67
|
-
this.user_id = user_id;
|
|
68
|
-
this.role_id = role_id || null;
|
|
69
|
-
this.message = message;
|
|
70
|
-
this.status = status || null;
|
|
71
|
-
this.is_internal = is_internal || false;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { ITHelpDeskRequests } from './ITHelpDeskModel';
|
|
4
|
+
import { User } from './user';
|
|
5
|
+
|
|
6
|
+
/** Same set as hotel / logistics / event-support chat */
|
|
7
|
+
export enum ITHelpDeskMessageType {
|
|
8
|
+
TEXT = 'text',
|
|
9
|
+
IMAGE = 'image',
|
|
10
|
+
VIDEO = 'video',
|
|
11
|
+
FILE = 'file',
|
|
12
|
+
LINK = 'link',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@Entity({ name: 'it_request_chat' })
|
|
16
|
+
export class ITRequestChat extends BaseModel {
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'integer', nullable: false })
|
|
19
|
+
request_id: number;
|
|
20
|
+
|
|
21
|
+
@ManyToOne(() => ITHelpDeskRequests)
|
|
22
|
+
@JoinColumn({ name: 'request_id' })
|
|
23
|
+
request: ITHelpDeskRequests;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'integer', nullable: true })
|
|
26
|
+
service_id: number | null;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
sub_service_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'integer', nullable: false })
|
|
32
|
+
user_id: number;
|
|
33
|
+
|
|
34
|
+
@ManyToOne(() => User)
|
|
35
|
+
@JoinColumn({ name: 'user_id' })
|
|
36
|
+
user: User;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'integer', nullable: true })
|
|
39
|
+
role_id: number | null;
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'text', nullable: false })
|
|
42
|
+
message: string;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'varchar', length: 20, nullable: false, default: ITHelpDeskMessageType.TEXT })
|
|
45
|
+
message_type: string;
|
|
46
|
+
|
|
47
|
+
@Column({ type: 'text', nullable: true })
|
|
48
|
+
status: string | null;
|
|
49
|
+
|
|
50
|
+
@Column({ type: 'boolean', default: false })
|
|
51
|
+
is_internal: boolean;
|
|
52
|
+
|
|
53
|
+
constructor(
|
|
54
|
+
request_id: number,
|
|
55
|
+
user_id: number,
|
|
56
|
+
message: string,
|
|
57
|
+
is_internal?: boolean,
|
|
58
|
+
service_id?: number | null,
|
|
59
|
+
sub_service_id?: number | null,
|
|
60
|
+
role_id?: number | null,
|
|
61
|
+
status?: string | null
|
|
62
|
+
) {
|
|
63
|
+
super();
|
|
64
|
+
this.request_id = request_id;
|
|
65
|
+
this.service_id = service_id || null;
|
|
66
|
+
this.sub_service_id = sub_service_id || null;
|
|
67
|
+
this.user_id = user_id;
|
|
68
|
+
this.role_id = role_id || null;
|
|
69
|
+
this.message = message;
|
|
70
|
+
this.status = status || null;
|
|
71
|
+
this.is_internal = is_internal || false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -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
|
}
|