@platform-modules/civil-aviation-authority 2.3.128 → 2.3.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data-source.js +4 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +18 -1
- package/dist/models/AssetApartmentTypeModel.d.ts +9 -0
- package/dist/models/AssetApartmentTypeModel.js +49 -0
- package/dist/models/AssetUnitLocationModel.d.ts +8 -0
- package/dist/models/AssetUnitLocationModel.js +44 -0
- package/dist/models/CyberSecurityAuditRequestModel.d.ts +39 -0
- package/dist/models/CyberSecurityAuditRequestModel.js +130 -0
- package/dist/models/RequestForVaptRequestModel.d.ts +40 -0
- package/dist/models/RequestForVaptRequestModel.js +143 -0
- package/package.json +1 -1
- package/src/data-source.ts +4 -0
- package/src/index.ts +314 -304
- package/src/models/AssetApartmentTypeModel.ts +29 -0
- package/src/models/AssetUnitLocationModel.ts +25 -0
- package/src/models/CyberSecurityAuditRequestModel.ts +116 -0
- package/src/models/HousingContractCancelChatModel.ts +56 -56
- package/src/models/HousingContractRenewalChatModel.ts +59 -59
- package/src/models/RequestForVaptRequestModel.ts +132 -0
- package/src/models/ResidentialUnitRentalChatModel.ts +56 -56
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
@Entity({ name: "asset_apartment_types" })
|
|
5
|
+
export class AssetApartmentType extends BaseModel {
|
|
6
|
+
@Column({ type: "varchar", length: 100, nullable: false })
|
|
7
|
+
apartment_type_name: string;
|
|
8
|
+
|
|
9
|
+
@Column({ type: "float", nullable: false, default: 0 })
|
|
10
|
+
cost_per_type: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: "text", nullable: true })
|
|
13
|
+
description: string | null;
|
|
14
|
+
|
|
15
|
+
@Column({ type: "boolean", default: true })
|
|
16
|
+
is_active: boolean;
|
|
17
|
+
|
|
18
|
+
@Column({ type: "int", default: 0 })
|
|
19
|
+
display_order: number;
|
|
20
|
+
|
|
21
|
+
constructor(apartmentTypeName: string) {
|
|
22
|
+
super();
|
|
23
|
+
this.apartment_type_name = apartmentTypeName;
|
|
24
|
+
this.cost_per_type = 0;
|
|
25
|
+
this.description = null;
|
|
26
|
+
this.is_active = true;
|
|
27
|
+
this.display_order = 0;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
@Entity({ name: "asset_unit_locations" })
|
|
5
|
+
export class AssetUnitLocation extends BaseModel {
|
|
6
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
7
|
+
location_name: string;
|
|
8
|
+
|
|
9
|
+
@Column({ type: "text", nullable: true })
|
|
10
|
+
description: string | null;
|
|
11
|
+
|
|
12
|
+
@Column({ type: "boolean", default: true })
|
|
13
|
+
is_active: boolean;
|
|
14
|
+
|
|
15
|
+
@Column({ type: "int", default: 0 })
|
|
16
|
+
display_order: number;
|
|
17
|
+
|
|
18
|
+
constructor(locationName: string) {
|
|
19
|
+
super();
|
|
20
|
+
this.location_name = locationName;
|
|
21
|
+
this.description = null;
|
|
22
|
+
this.is_active = true;
|
|
23
|
+
this.display_order = 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum CyberSecurityAuditRequestStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
ASSIGNED = "Assigned",
|
|
7
|
+
IN_PROGRESS = "In Progress",
|
|
8
|
+
COMPLETED = "Completed",
|
|
9
|
+
APPROVED = "Approved",
|
|
10
|
+
REJECTED = "Rejected"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum CyberSecurityAuditClassification {
|
|
14
|
+
NEW = "New",
|
|
15
|
+
REVIEW = "Review"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export enum CyberSecurityAuditApplicationType {
|
|
19
|
+
ISO27001 = "ISO27001",
|
|
20
|
+
ICOA_REGULATION = "ICOA Regulation",
|
|
21
|
+
NATIONAL_REGULATION_AND_CIRCULATION = "National Regulation and Circulation",
|
|
22
|
+
OTHERS = "Others"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@Entity({ name: "cyber_security_audit_requests" })
|
|
26
|
+
export class CyberSecurityAuditRequest extends BaseModel {
|
|
27
|
+
@Column({ type: "integer", nullable: true })
|
|
28
|
+
req_user_department_id: number | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: "integer", nullable: true })
|
|
31
|
+
req_user_section_id: number | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: "integer", nullable: true })
|
|
34
|
+
req_user_position_id: number | null;
|
|
35
|
+
|
|
36
|
+
@Column({ type: "integer", nullable: true })
|
|
37
|
+
service_id: number | null;
|
|
38
|
+
|
|
39
|
+
@Column({ type: "integer", nullable: true })
|
|
40
|
+
sub_service_id: number | null;
|
|
41
|
+
|
|
42
|
+
@Column({ type: "integer", nullable: false })
|
|
43
|
+
user_id: number;
|
|
44
|
+
|
|
45
|
+
@Column({ type: "text", nullable: true })
|
|
46
|
+
description: string | null;
|
|
47
|
+
|
|
48
|
+
@Column({ type: "enum", enum: CyberSecurityAuditRequestStatus, default: CyberSecurityAuditRequestStatus.PENDING, nullable: false })
|
|
49
|
+
status: CyberSecurityAuditRequestStatus;
|
|
50
|
+
|
|
51
|
+
@Column({ type: "integer", nullable: true })
|
|
52
|
+
reviewer_user_id: number | null;
|
|
53
|
+
|
|
54
|
+
@Column({ type: "integer", nullable: true })
|
|
55
|
+
assigned_to_user_id: number | null;
|
|
56
|
+
|
|
57
|
+
@Column({ type: "timestamp", nullable: true })
|
|
58
|
+
assigned_at: Date | null;
|
|
59
|
+
|
|
60
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
61
|
+
workflow_execution_id: string | null;
|
|
62
|
+
|
|
63
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
64
|
+
request_id: string | null;
|
|
65
|
+
|
|
66
|
+
@Column({ type: "enum", enum: CyberSecurityAuditClassification, nullable: false })
|
|
67
|
+
request_classification: CyberSecurityAuditClassification;
|
|
68
|
+
|
|
69
|
+
@Column({ type: "enum", enum: CyberSecurityAuditApplicationType, nullable: false })
|
|
70
|
+
application_to_be_audited: CyberSecurityAuditApplicationType;
|
|
71
|
+
|
|
72
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
73
|
+
application_to_be_audited_other: string | null;
|
|
74
|
+
|
|
75
|
+
@Column({ type: "date", nullable: false })
|
|
76
|
+
submission_date: Date;
|
|
77
|
+
|
|
78
|
+
constructor(
|
|
79
|
+
user_id: number,
|
|
80
|
+
request_classification: CyberSecurityAuditClassification,
|
|
81
|
+
application_to_be_audited: CyberSecurityAuditApplicationType,
|
|
82
|
+
submission_date: Date,
|
|
83
|
+
status: CyberSecurityAuditRequestStatus = CyberSecurityAuditRequestStatus.PENDING,
|
|
84
|
+
service_id?: number | null,
|
|
85
|
+
sub_service_id?: number | null,
|
|
86
|
+
req_user_department_id?: number | null,
|
|
87
|
+
req_user_section_id?: number | null,
|
|
88
|
+
req_user_position_id?: number | null,
|
|
89
|
+
description?: string | null,
|
|
90
|
+
reviewer_user_id?: number | null,
|
|
91
|
+
assigned_to_user_id?: number | null,
|
|
92
|
+
assigned_at?: Date | null,
|
|
93
|
+
workflow_execution_id?: string | null,
|
|
94
|
+
request_id?: string | null,
|
|
95
|
+
application_to_be_audited_other?: string | null
|
|
96
|
+
) {
|
|
97
|
+
super();
|
|
98
|
+
this.user_id = user_id;
|
|
99
|
+
this.request_classification = request_classification;
|
|
100
|
+
this.application_to_be_audited = application_to_be_audited;
|
|
101
|
+
this.submission_date = submission_date;
|
|
102
|
+
this.status = status;
|
|
103
|
+
this.service_id = service_id || null;
|
|
104
|
+
this.sub_service_id = sub_service_id || null;
|
|
105
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
106
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
107
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
108
|
+
this.description = description || null;
|
|
109
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
110
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
111
|
+
this.assigned_at = assigned_at || null;
|
|
112
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
113
|
+
this.request_id = request_id || null;
|
|
114
|
+
this.application_to_be_audited_other = application_to_be_audited_other || null;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
export enum RequestForVaptStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
ASSIGNED = "Assigned",
|
|
7
|
+
IN_PROGRESS = "In Progress",
|
|
8
|
+
COMPLETED = "Completed",
|
|
9
|
+
APPROVED = "Approved",
|
|
10
|
+
REJECTED = "Rejected"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum RequestForVaptType {
|
|
14
|
+
VAPT = "VAPT",
|
|
15
|
+
INFRASTRUCTURE_REVIEW = "Infrastructure Review"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export enum RequestForVaptClassification {
|
|
19
|
+
NEW = "New",
|
|
20
|
+
REVIEW = "Review"
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@Entity({ name: "request_for_vapt_requests" })
|
|
24
|
+
export class RequestForVaptRequest extends BaseModel {
|
|
25
|
+
@Column({ type: "integer", nullable: true })
|
|
26
|
+
req_user_department_id: number | null;
|
|
27
|
+
|
|
28
|
+
@Column({ type: "integer", nullable: true })
|
|
29
|
+
req_user_section_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: "integer", nullable: true })
|
|
32
|
+
req_user_position_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: "integer", nullable: true })
|
|
35
|
+
service_id: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: "integer", nullable: true })
|
|
38
|
+
sub_service_id: number | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: "integer", nullable: false })
|
|
41
|
+
user_id: number;
|
|
42
|
+
|
|
43
|
+
@Column({ type: "text", nullable: true })
|
|
44
|
+
remarks: string | null;
|
|
45
|
+
|
|
46
|
+
@Column({ type: "enum", enum: RequestForVaptStatus, default: RequestForVaptStatus.PENDING, nullable: false })
|
|
47
|
+
status: RequestForVaptStatus;
|
|
48
|
+
|
|
49
|
+
@Column({ type: "integer", nullable: true })
|
|
50
|
+
reviewer_user_id: number | null;
|
|
51
|
+
|
|
52
|
+
@Column({ type: "integer", nullable: true })
|
|
53
|
+
assigned_to_user_id: number | null;
|
|
54
|
+
|
|
55
|
+
@Column({ type: "timestamp", nullable: true })
|
|
56
|
+
assigned_at: Date | null;
|
|
57
|
+
|
|
58
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
59
|
+
workflow_execution_id: string | null;
|
|
60
|
+
|
|
61
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
62
|
+
request_id: string | null;
|
|
63
|
+
|
|
64
|
+
@Column({ type: "enum", enum: RequestForVaptType, nullable: false })
|
|
65
|
+
type_of_request: RequestForVaptType;
|
|
66
|
+
|
|
67
|
+
@Column({ type: "enum", enum: RequestForVaptClassification, nullable: false })
|
|
68
|
+
request_classification: RequestForVaptClassification;
|
|
69
|
+
|
|
70
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
71
|
+
application_name: string;
|
|
72
|
+
|
|
73
|
+
@Column({ type: "varchar", length: 500, nullable: true })
|
|
74
|
+
link: string | null;
|
|
75
|
+
|
|
76
|
+
@Column({ type: "varchar", length: 100, nullable: true })
|
|
77
|
+
ip_address: string | null;
|
|
78
|
+
|
|
79
|
+
@Column({ type: "varchar", length: 500, nullable: true })
|
|
80
|
+
application_url: string | null;
|
|
81
|
+
|
|
82
|
+
// Business rule: must be created at least two weeks before the planned/submission date
|
|
83
|
+
// We will enforce submission_date >= now + 14 days in service.
|
|
84
|
+
@Column({ type: "date", nullable: false })
|
|
85
|
+
submission_date: Date;
|
|
86
|
+
|
|
87
|
+
constructor(
|
|
88
|
+
user_id: number,
|
|
89
|
+
type_of_request: RequestForVaptType,
|
|
90
|
+
request_classification: RequestForVaptClassification,
|
|
91
|
+
application_name: string,
|
|
92
|
+
submission_date: Date,
|
|
93
|
+
status: RequestForVaptStatus = RequestForVaptStatus.PENDING,
|
|
94
|
+
service_id?: number | null,
|
|
95
|
+
sub_service_id?: number | null,
|
|
96
|
+
req_user_department_id?: number | null,
|
|
97
|
+
req_user_section_id?: number | null,
|
|
98
|
+
req_user_position_id?: number | null,
|
|
99
|
+
remarks?: string | null,
|
|
100
|
+
reviewer_user_id?: number | null,
|
|
101
|
+
assigned_to_user_id?: number | null,
|
|
102
|
+
assigned_at?: Date | null,
|
|
103
|
+
workflow_execution_id?: string | null,
|
|
104
|
+
request_id?: string | null,
|
|
105
|
+
link?: string | null,
|
|
106
|
+
ip_address?: string | null,
|
|
107
|
+
application_url?: string | null
|
|
108
|
+
) {
|
|
109
|
+
super();
|
|
110
|
+
this.user_id = user_id;
|
|
111
|
+
this.type_of_request = type_of_request;
|
|
112
|
+
this.request_classification = request_classification;
|
|
113
|
+
this.application_name = application_name;
|
|
114
|
+
this.submission_date = submission_date;
|
|
115
|
+
this.status = status;
|
|
116
|
+
this.service_id = service_id || null;
|
|
117
|
+
this.sub_service_id = sub_service_id || null;
|
|
118
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
119
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
120
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
121
|
+
this.remarks = remarks || null;
|
|
122
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
123
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
124
|
+
this.assigned_at = assigned_at || null;
|
|
125
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
126
|
+
this.request_id = request_id || null;
|
|
127
|
+
this.link = link || null;
|
|
128
|
+
this.ip_address = ip_address || null;
|
|
129
|
+
this.application_url = application_url || null;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
|
|
3
|
-
import { BaseModel } from "./BaseModel";
|
|
4
|
-
|
|
5
|
-
export enum ResidentialUnitRentalMessageType {
|
|
6
|
-
text = "text",
|
|
7
|
-
image = "image",
|
|
8
|
-
video = "video",
|
|
9
|
-
file = "file",
|
|
10
|
-
link = "link",
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export enum ResidentialUnitRentalChatStatus {
|
|
14
|
-
Pending = "Pending",
|
|
15
|
-
Received = "Received",
|
|
16
|
-
Approved = "Approved",
|
|
17
|
-
Rejected = "Rejected",
|
|
18
|
-
InProgress = "In Progress",
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@Entity({ name: "residential_unit_rental_chat" })
|
|
22
|
-
export class ResidentialUnitRentalChat extends BaseModel {
|
|
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
|
+
|
|
3
|
+
import { BaseModel } from "./BaseModel";
|
|
4
|
+
|
|
5
|
+
export enum ResidentialUnitRentalMessageType {
|
|
6
|
+
text = "text",
|
|
7
|
+
image = "image",
|
|
8
|
+
video = "video",
|
|
9
|
+
file = "file",
|
|
10
|
+
link = "link",
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum ResidentialUnitRentalChatStatus {
|
|
14
|
+
Pending = "Pending",
|
|
15
|
+
Received = "Received",
|
|
16
|
+
Approved = "Approved",
|
|
17
|
+
Rejected = "Rejected",
|
|
18
|
+
InProgress = "In Progress",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@Entity({ name: "residential_unit_rental_chat" })
|
|
22
|
+
export class ResidentialUnitRentalChat extends BaseModel {
|
|
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
|
+
}
|