@platform-modules/civil-aviation-authority 2.3.150 → 2.3.155
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/data-source.js +10 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +20 -3
- 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/EventSupportApprovalModel.d.ts +23 -0
- package/dist/models/EventSupportApprovalModel.js +88 -0
- package/dist/models/EventSupportAttachmentModel.d.ts +12 -0
- package/dist/models/EventSupportAttachmentModel.js +56 -0
- package/dist/models/EventSupportChatModel.d.ts +18 -0
- package/dist/models/EventSupportChatModel.js +65 -0
- package/dist/models/EventSupportRequestModel.d.ts +27 -0
- package/dist/models/EventSupportRequestModel.js +89 -0
- package/dist/models/EventSupportWorkflowModel.d.ts +18 -0
- package/dist/models/EventSupportWorkflowModel.js +66 -0
- package/dist/models/FolderModel.d.ts +16 -0
- package/dist/models/FolderModel.js +85 -0
- package/dist/models/LegalComplaintRequestModel.d.ts +101 -6
- package/dist/models/LegalComplaintRequestModel.js +257 -5
- package/dist/models/PermissionModel.d.ts +18 -0
- package/dist/models/PermissionModel.js +68 -0
- package/dist/models/UUIDBaseModel.d.ts +14 -0
- package/dist/models/UUIDBaseModel.js +66 -0
- package/package.json +1 -1
- package/src/data-source.ts +10 -0
- package/src/index.ts +11 -0
- 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/EventSupportApprovalModel.ts +59 -0
- package/src/models/EventSupportAttachmentModel.ts +32 -0
- package/src/models/EventSupportChatModel.ts +42 -0
- package/src/models/EventSupportRequestModel.ts +60 -0
- package/src/models/EventSupportWorkflowModel.ts +41 -0
- package/src/models/HousingContractCancelChatModel.ts +56 -56
- package/src/models/HousingContractRenewalChatModel.ts +59 -59
- package/src/models/ITRequestChatModel.ts +62 -62
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/src/models/LegalComplaintRequestModel.ts +322 -8
- 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/TrainingRoomBookingRequestModel.ts +142 -142
- package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum EventSupportRequestStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
ASSIGNED = "Assigned",
|
|
7
|
+
IN_PROGRESS = "In Progress",
|
|
8
|
+
APPROVED = "Approved",
|
|
9
|
+
REJECTED = "Rejected",
|
|
10
|
+
CANCELLED = "Cancelled",
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@Entity({ name: "event_support_requests" })
|
|
14
|
+
export class EventSupportRequests extends BaseModel {
|
|
15
|
+
@Column({ type: "integer", nullable: true })
|
|
16
|
+
req_user_department_id: number | null;
|
|
17
|
+
|
|
18
|
+
@Column({ type: "integer", nullable: true })
|
|
19
|
+
req_user_section_id: number | null;
|
|
20
|
+
|
|
21
|
+
@Column({ type: "integer", nullable: true })
|
|
22
|
+
service_id: number | null;
|
|
23
|
+
|
|
24
|
+
@Column({ type: "integer", nullable: true })
|
|
25
|
+
sub_service_id: number | null;
|
|
26
|
+
|
|
27
|
+
@Column({ type: "integer", nullable: false })
|
|
28
|
+
user_id: number;
|
|
29
|
+
|
|
30
|
+
@Column({ type: "enum", enum: EventSupportRequestStatus, default: EventSupportRequestStatus.PENDING, nullable: false })
|
|
31
|
+
status: EventSupportRequestStatus;
|
|
32
|
+
|
|
33
|
+
@Column({ type: "varchar", nullable: true })
|
|
34
|
+
workflow_execution_id: string | null;
|
|
35
|
+
|
|
36
|
+
@Column({ type: "varchar", length: 500, nullable: false })
|
|
37
|
+
event_title: string;
|
|
38
|
+
|
|
39
|
+
/** Department associated with the event / support request (distinct from requester dept) */
|
|
40
|
+
@Column({ type: "integer", nullable: true })
|
|
41
|
+
event_department_id: number | null;
|
|
42
|
+
|
|
43
|
+
@Column({ type: "varchar", length: 500, nullable: true })
|
|
44
|
+
request_for: string | null;
|
|
45
|
+
|
|
46
|
+
@Column({ type: "date", nullable: false })
|
|
47
|
+
date_of_event: string;
|
|
48
|
+
|
|
49
|
+
@Column({ type: "varchar", length: 500, nullable: true })
|
|
50
|
+
location_of_event: string | null;
|
|
51
|
+
|
|
52
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
53
|
+
type_of_event: string | null;
|
|
54
|
+
|
|
55
|
+
@Column({ type: "varchar", length: 64, nullable: true })
|
|
56
|
+
phone_number: string | null;
|
|
57
|
+
|
|
58
|
+
@Column({ type: "text", nullable: false })
|
|
59
|
+
reason_for_request: string;
|
|
60
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum EventSupportWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending",
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@Entity({ name: "event_support_workflows" })
|
|
11
|
+
export class EventSupportWorkFlow 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: EventSupportWorkFlowStatus, default: EventSupportWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
25
|
+
status: EventSupportWorkFlowStatus;
|
|
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
|
+
@Column({ type: "integer", nullable: true })
|
|
40
|
+
step_order: number | null;
|
|
41
|
+
}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
export enum HousingContractCancelMessageType {
|
|
5
|
-
text = 'text',
|
|
6
|
-
image = 'image',
|
|
7
|
-
video = 'video',
|
|
8
|
-
file = 'file',
|
|
9
|
-
link = 'link'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export enum HousingContractCancelChatStatus {
|
|
13
|
-
Pending = 'Pending',
|
|
14
|
-
Received = 'Received',
|
|
15
|
-
Approved = 'Approved',
|
|
16
|
-
Rejected = 'Rejected',
|
|
17
|
-
InProgress = 'In Progress',
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@Entity({ name: 'housing_contract_cancel_chat' })
|
|
21
|
-
export class HousingContractCancelChat extends BaseModel {
|
|
22
|
-
|
|
23
|
-
@Column({ type: 'int', nullable: false })
|
|
24
|
-
request_id: number;
|
|
25
|
-
|
|
26
|
-
@Column({ type: 'int', nullable: false })
|
|
27
|
-
service_id: number;
|
|
28
|
-
|
|
29
|
-
@Column({ type: 'int', nullable: false })
|
|
30
|
-
sub_service_id: number;
|
|
31
|
-
|
|
32
|
-
@Column({ type: 'int', nullable: false })
|
|
33
|
-
user_id: number;
|
|
34
|
-
|
|
35
|
-
@Column({ type: 'text', nullable: false })
|
|
36
|
-
message: string;
|
|
37
|
-
|
|
38
|
-
@Column({ type: 'int', nullable: true })
|
|
39
|
-
approver_role_id: number | null;
|
|
40
|
-
|
|
41
|
-
@Column({ type: 'varchar', length: 255, nullable: false, default: 'Pending' })
|
|
42
|
-
status: string;
|
|
43
|
-
|
|
44
|
-
@Column({ type: 'varchar', length: 20, nullable: false })
|
|
45
|
-
message_type: string;
|
|
46
|
-
|
|
47
|
-
@Column({ type: 'boolean', nullable: false, default: false })
|
|
48
|
-
is_internal: boolean;
|
|
49
|
-
|
|
50
|
-
@Column({ type: 'int', nullable: false })
|
|
51
|
-
created_by: number;
|
|
52
|
-
|
|
53
|
-
constructor() {
|
|
54
|
-
super();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum HousingContractCancelMessageType {
|
|
5
|
+
text = 'text',
|
|
6
|
+
image = 'image',
|
|
7
|
+
video = 'video',
|
|
8
|
+
file = 'file',
|
|
9
|
+
link = 'link'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum HousingContractCancelChatStatus {
|
|
13
|
+
Pending = 'Pending',
|
|
14
|
+
Received = 'Received',
|
|
15
|
+
Approved = 'Approved',
|
|
16
|
+
Rejected = 'Rejected',
|
|
17
|
+
InProgress = 'In Progress',
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@Entity({ name: 'housing_contract_cancel_chat' })
|
|
21
|
+
export class HousingContractCancelChat extends BaseModel {
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'int', nullable: false })
|
|
24
|
+
request_id: number;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'int', nullable: false })
|
|
27
|
+
service_id: number;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'int', nullable: false })
|
|
30
|
+
sub_service_id: number;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'int', nullable: false })
|
|
33
|
+
user_id: number;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'text', nullable: false })
|
|
36
|
+
message: string;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'int', nullable: true })
|
|
39
|
+
approver_role_id: number | null;
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'varchar', length: 255, nullable: false, default: 'Pending' })
|
|
42
|
+
status: string;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'varchar', length: 20, nullable: false })
|
|
45
|
+
message_type: string;
|
|
46
|
+
|
|
47
|
+
@Column({ type: 'boolean', nullable: false, default: false })
|
|
48
|
+
is_internal: boolean;
|
|
49
|
+
|
|
50
|
+
@Column({ type: 'int', nullable: false })
|
|
51
|
+
created_by: number;
|
|
52
|
+
|
|
53
|
+
constructor() {
|
|
54
|
+
super();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -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,62 +1,62 @@
|
|
|
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_chat' })
|
|
7
|
-
export class ITRequestChat 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
|
-
@Column({ type: 'integer', nullable: false })
|
|
23
|
-
user_id: number;
|
|
24
|
-
|
|
25
|
-
@ManyToOne(() => User)
|
|
26
|
-
@JoinColumn({ name: 'user_id' })
|
|
27
|
-
user: User;
|
|
28
|
-
|
|
29
|
-
@Column({ type: 'integer', nullable: true })
|
|
30
|
-
role_id: number | null;
|
|
31
|
-
|
|
32
|
-
@Column({ type: 'text', nullable: false })
|
|
33
|
-
message: string;
|
|
34
|
-
|
|
35
|
-
@Column({ type: 'text', nullable: true })
|
|
36
|
-
status: string | null;
|
|
37
|
-
|
|
38
|
-
@Column({ type: 'boolean', default: false })
|
|
39
|
-
is_internal: boolean;
|
|
40
|
-
|
|
41
|
-
constructor(
|
|
42
|
-
request_id: number,
|
|
43
|
-
user_id: number,
|
|
44
|
-
message: string,
|
|
45
|
-
is_internal?: boolean,
|
|
46
|
-
service_id?: number | null,
|
|
47
|
-
sub_service_id?: number | null,
|
|
48
|
-
role_id?: number | null,
|
|
49
|
-
status?: string | null
|
|
50
|
-
) {
|
|
51
|
-
super();
|
|
52
|
-
this.request_id = request_id;
|
|
53
|
-
this.service_id = service_id || null;
|
|
54
|
-
this.sub_service_id = sub_service_id || null;
|
|
55
|
-
this.user_id = user_id;
|
|
56
|
-
this.role_id = role_id || null;
|
|
57
|
-
this.message = message;
|
|
58
|
-
this.status = status || null;
|
|
59
|
-
this.is_internal = is_internal || false;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
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_chat' })
|
|
7
|
+
export class ITRequestChat 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
|
+
@Column({ type: 'integer', nullable: false })
|
|
23
|
+
user_id: number;
|
|
24
|
+
|
|
25
|
+
@ManyToOne(() => User)
|
|
26
|
+
@JoinColumn({ name: 'user_id' })
|
|
27
|
+
user: User;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'integer', nullable: true })
|
|
30
|
+
role_id: number | null;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'text', nullable: false })
|
|
33
|
+
message: string;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'text', nullable: true })
|
|
36
|
+
status: string | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'boolean', default: false })
|
|
39
|
+
is_internal: boolean;
|
|
40
|
+
|
|
41
|
+
constructor(
|
|
42
|
+
request_id: number,
|
|
43
|
+
user_id: number,
|
|
44
|
+
message: string,
|
|
45
|
+
is_internal?: boolean,
|
|
46
|
+
service_id?: number | null,
|
|
47
|
+
sub_service_id?: number | null,
|
|
48
|
+
role_id?: number | null,
|
|
49
|
+
status?: string | null
|
|
50
|
+
) {
|
|
51
|
+
super();
|
|
52
|
+
this.request_id = request_id;
|
|
53
|
+
this.service_id = service_id || null;
|
|
54
|
+
this.sub_service_id = sub_service_id || null;
|
|
55
|
+
this.user_id = user_id;
|
|
56
|
+
this.role_id = role_id || null;
|
|
57
|
+
this.message = message;
|
|
58
|
+
this.status = status || null;
|
|
59
|
+
this.is_internal = is_internal || false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
@@ -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
|
}
|