@platform-modules/civil-aviation-authority 2.3.333 → 2.3.335
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 +2 -0
- package/dist/helpers/cancellation-bilingual-persist.helper.d.ts +37 -0
- package/dist/helpers/cancellation-bilingual-persist.helper.js +77 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.js +2 -3
- package/dist/models/AnnualPlanSubmissionRestrictionModel.d.ts +9 -0
- package/dist/models/AnnualPlanSubmissionRestrictionModel.js +47 -0
- package/dist/models/AnnualTrainingPlanRequestModel.d.ts +12 -21
- package/dist/models/AnnualTrainingPlanRequestModel.js +60 -75
- package/dist/models/CyberSecurityRiskManagementRiskModel.d.ts +4 -0
- package/dist/models/CyberSecurityRiskManagementRiskModel.js +16 -0
- package/dist/models/SlaApprovalsViewModel.js +54 -54
- package/package.json +1 -1
- package/scripts/sync-sla-reports-sql.js +92 -92
- package/sql/README.md +21 -21
- package/sql/add_csrm_risk_tracking_fields.sql +6 -0
- package/sql/add_training_request_reference_number.sql +9 -9
- package/sql/add_training_room_booking_records_reference.sql +19 -19
- package/sql/annual_training_plan_bulk_upload.sql +140 -140
- package/sql/annual_training_plan_department_plans.sql +80 -80
- package/sql/create_annual_plan_submission_restriction.sql +27 -0
- package/sql/sla_reports_admin_procedures.sql +322 -322
- package/sql/sla_reports_approvals_workbook.sql +427 -427
- package/sql/sla_reports_procedures.sql +883 -883
- package/sql/vw_sla_approvals.sql +115 -115
- package/sql/vw_sla_my_requests.sql +58 -58
- package/src/data-source.ts +2 -0
- package/src/index.ts +521 -518
- package/src/models/AccessCardRequestModel.ts +135 -135
- package/src/models/AirportEntryPermitModel.ts +276 -276
- package/src/models/AnnualPlanSubmissionRestrictionModel.ts +27 -0
- package/src/models/AnnualTrainingPlanDepartmentPlanDecisionModel.ts +33 -33
- package/src/models/AnnualTrainingPlanDepartmentPlanModel.ts +31 -31
- package/src/models/AnnualTrainingPlanItemModel.ts +71 -71
- package/src/models/AnnualTrainingPlanRequestModel.ts +156 -156
- package/src/models/CyberSecurityRiskManagementRiskModel.ts +12 -0
- package/src/models/DocumentDriveModel.ts +28 -28
- package/src/models/DocumentFolderModel.ts +45 -45
- package/src/models/HotelApprovalModel.ts +83 -83
- package/src/models/HousingContractCancelApprovalModel.ts +64 -64
- package/src/models/HousingContractRenewalApprovalModel.ts +64 -64
- package/src/models/ITRequestAttachmentModel.ts +73 -73
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/LegalConsultationApprovalModel.ts +65 -65
- package/src/models/MissionTravelPassportExpiryNotificationConfigModel.ts +36 -36
- package/src/models/NotificationModel.ts +89 -89
- package/src/models/ResidentialUnitRentalApprovalModel.ts +143 -143
- package/src/models/ServiceExtensionAfter60ApprovalModel.ts +87 -87
- package/src/models/ServiceSlaApprovalModel.ts +64 -64
- package/src/models/ServicesNotificationConfigModel.ts +55 -55
- package/src/models/SlaApprovalsViewModel.ts +142 -142
- package/src/models/StudyLeaveRequestModel.ts +173 -173
- package/src/models/TrainingRequestModel.ts +169 -169
- package/src/models/TrainingRoomBookingRequestModel.ts +178 -178
- package/src/models/TrainingRoomBookingWorkflowModel.ts +81 -81
- package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
- package/src/models/role.ts +34 -34
- package/src/scripts.ts +20 -20
- package/src/sla/sla-table-sync.service.ts +90 -90
- package/dist/models/AnnualTrainingPlanDepartmentPlanDecisionModel.d.ts +0 -10
- package/dist/models/AnnualTrainingPlanDepartmentPlanDecisionModel.js +0 -51
- package/dist/models/AnnualTrainingPlanDepartmentPlanModel.d.ts +0 -13
- package/dist/models/AnnualTrainingPlanDepartmentPlanModel.js +0 -50
- package/dist/models/AnnualTrainingPlanItemModel.d.ts +0 -22
- package/dist/models/AnnualTrainingPlanItemModel.js +0 -101
- package/dist/models/DocumentMetadataModel.d.ts +0 -45
- package/dist/models/DocumentMetadataModel.js +0 -171
- package/dist/models/DocumentationDepartmentsModel.d.ts +0 -13
- package/dist/models/DocumentationDepartmentsModel.js +0 -53
- package/dist/models/FolderModel.d.ts +0 -16
- package/dist/models/FolderModel.js +0 -85
- package/dist/models/ImportExportMaterialModels.d.ts +0 -92
- package/dist/models/ImportExportMaterialModels.js +0 -307
- package/dist/models/PermissionModel.d.ts +0 -18
- package/dist/models/PermissionModel.js +0 -68
- package/dist/models/SecurityAccessApprovalModel.d.ts +0 -23
- package/dist/models/SecurityAccessApprovalModel.js +0 -82
- package/dist/models/SecurityAccessAttachmentModel.d.ts +0 -12
- package/dist/models/SecurityAccessAttachmentModel.js +0 -56
- package/dist/models/SecurityAccessChatModel.d.ts +0 -12
- package/dist/models/SecurityAccessChatModel.js +0 -56
- package/dist/models/SecurityAccessRequestModel.d.ts +0 -25
- package/dist/models/SecurityAccessRequestModel.js +0 -80
- package/dist/models/SecurityAccessWorkflowModel.d.ts +0 -24
- package/dist/models/SecurityAccessWorkflowModel.js +0 -84
- package/dist/models/ServiceExtensionAfterAge60Models.d.ts +0 -93
- package/dist/models/ServiceExtensionAfterAge60Models.js +0 -312
- package/dist/models/UUIDBaseModel.d.ts +0 -14
- package/dist/models/UUIDBaseModel.js +0 -66
- package/dist/models/WorkingHoursExtensionModels.d.ts +0 -88
- package/dist/models/WorkingHoursExtensionModels.js +0 -295
|
@@ -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
|
}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { Column, Entity } from 'typeorm';
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
export enum LegalConsultationApprovalStatus {
|
|
5
|
-
PENDING = 'Pending',
|
|
6
|
-
IN_PROGRESS = 'In Progress',
|
|
7
|
-
APPROVED = 'Approved',
|
|
8
|
-
REJECTED = 'Rejected',
|
|
9
|
-
/** Current step completed by assigning the next approver (user/dept/section/role). */
|
|
10
|
-
REASSIGNED = 'Reassigned',
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@Entity({ name: 'legal_consultation_approvals' })
|
|
14
|
-
export class LegalConsultationApproval extends BaseModel {
|
|
15
|
-
@Column({ type: 'int', nullable: false })
|
|
16
|
-
request_id: number;
|
|
17
|
-
|
|
18
|
-
@Column({ type: 'int', nullable: false })
|
|
19
|
-
service_id: number;
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'int', nullable: false })
|
|
22
|
-
sub_service_id: number;
|
|
23
|
-
|
|
24
|
-
@Column({ type: 'int', nullable: true })
|
|
25
|
-
approver_role_id: number;
|
|
26
|
-
|
|
27
|
-
@Column({ type: 'int', nullable: true })
|
|
28
|
-
approver_user_id: number;
|
|
29
|
-
|
|
30
|
-
@Column({ type: 'int', nullable: true })
|
|
31
|
-
delegate_user_id: number;
|
|
32
|
-
|
|
33
|
-
@Column({ type: 'int', nullable: true })
|
|
34
|
-
approved_by: number;
|
|
35
|
-
|
|
36
|
-
@Column({ type: 'int', nullable: true })
|
|
37
|
-
department_id: number;
|
|
38
|
-
|
|
39
|
-
@Column({ type: 'int', nullable: true })
|
|
40
|
-
section_id: number;
|
|
41
|
-
|
|
42
|
-
@Column({ type: 'int', nullable: false })
|
|
43
|
-
level: number;
|
|
44
|
-
|
|
45
|
-
@Column({
|
|
46
|
-
type: 'enum',
|
|
47
|
-
enum: LegalConsultationApprovalStatus,
|
|
48
|
-
default: LegalConsultationApprovalStatus.PENDING,
|
|
49
|
-
nullable: false,
|
|
50
|
-
})
|
|
51
|
-
approval_status: LegalConsultationApprovalStatus;
|
|
52
|
-
|
|
53
|
-
@Column({ type: 'text', nullable: true })
|
|
54
|
-
comment: string;
|
|
55
|
-
|
|
56
|
-
@Column({ type: 'boolean', default: true, nullable: false })
|
|
57
|
-
is_allowed: boolean;
|
|
58
|
-
|
|
59
|
-
@Column({ type: 'int', nullable: false })
|
|
60
|
-
created_by: number;
|
|
61
|
-
|
|
62
|
-
constructor() {
|
|
63
|
-
super();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum LegalConsultationApprovalStatus {
|
|
5
|
+
PENDING = 'Pending',
|
|
6
|
+
IN_PROGRESS = 'In Progress',
|
|
7
|
+
APPROVED = 'Approved',
|
|
8
|
+
REJECTED = 'Rejected',
|
|
9
|
+
/** Current step completed by assigning the next approver (user/dept/section/role). */
|
|
10
|
+
REASSIGNED = 'Reassigned',
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@Entity({ name: 'legal_consultation_approvals' })
|
|
14
|
+
export class LegalConsultationApproval extends BaseModel {
|
|
15
|
+
@Column({ type: 'int', nullable: false })
|
|
16
|
+
request_id: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'int', nullable: false })
|
|
19
|
+
service_id: number;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'int', nullable: false })
|
|
22
|
+
sub_service_id: number;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'int', nullable: true })
|
|
25
|
+
approver_role_id: number;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'int', nullable: true })
|
|
28
|
+
approver_user_id: number;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'int', nullable: true })
|
|
31
|
+
delegate_user_id: number;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'int', nullable: true })
|
|
34
|
+
approved_by: number;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'int', nullable: true })
|
|
37
|
+
department_id: number;
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'int', nullable: true })
|
|
40
|
+
section_id: number;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'int', nullable: false })
|
|
43
|
+
level: number;
|
|
44
|
+
|
|
45
|
+
@Column({
|
|
46
|
+
type: 'enum',
|
|
47
|
+
enum: LegalConsultationApprovalStatus,
|
|
48
|
+
default: LegalConsultationApprovalStatus.PENDING,
|
|
49
|
+
nullable: false,
|
|
50
|
+
})
|
|
51
|
+
approval_status: LegalConsultationApprovalStatus;
|
|
52
|
+
|
|
53
|
+
@Column({ type: 'text', nullable: true })
|
|
54
|
+
comment: string;
|
|
55
|
+
|
|
56
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
57
|
+
is_allowed: boolean;
|
|
58
|
+
|
|
59
|
+
@Column({ type: 'int', nullable: false })
|
|
60
|
+
created_by: number;
|
|
61
|
+
|
|
62
|
+
constructor() {
|
|
63
|
+
super();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from "./BaseModel";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
@Entity({ name: "mission_travel_passport_expiry_notification_configs" })
|
|
6
|
-
export class MissionTravelPassportExpiryNotificationConfig extends BaseModel {
|
|
7
|
-
@Column({ type: "integer", nullable: false })
|
|
8
|
-
department_id: number;
|
|
9
|
-
|
|
10
|
-
@Column({ type: "integer", nullable: true })
|
|
11
|
-
section_id: number | null;
|
|
12
|
-
|
|
13
|
-
@Column({ type: "varchar", length: 255, nullable: true })
|
|
14
|
-
frequency: string | null;
|
|
15
|
-
|
|
16
|
-
@Column({ type: "integer", nullable: true })
|
|
17
|
-
repeat_interval_days: number | null; // Repeating after every N days (default 10)
|
|
18
|
-
|
|
19
|
-
@Column({ type: "boolean", nullable: false, default: true })
|
|
20
|
-
is_active: boolean;
|
|
21
|
-
|
|
22
|
-
constructor(
|
|
23
|
-
department_id: number,
|
|
24
|
-
section_id: number | null = null,
|
|
25
|
-
frequency: string | null = null,
|
|
26
|
-
repeat_interval_days: number = 10,
|
|
27
|
-
is_active: boolean = true
|
|
28
|
-
) {
|
|
29
|
-
super();
|
|
30
|
-
this.department_id = department_id;
|
|
31
|
-
this.section_id = section_id;
|
|
32
|
-
this.frequency = frequency;
|
|
33
|
-
this.repeat_interval_days = repeat_interval_days;
|
|
34
|
-
this.is_active = is_active;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@Entity({ name: "mission_travel_passport_expiry_notification_configs" })
|
|
6
|
+
export class MissionTravelPassportExpiryNotificationConfig extends BaseModel {
|
|
7
|
+
@Column({ type: "integer", nullable: false })
|
|
8
|
+
department_id: number;
|
|
9
|
+
|
|
10
|
+
@Column({ type: "integer", nullable: true })
|
|
11
|
+
section_id: number | null;
|
|
12
|
+
|
|
13
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
14
|
+
frequency: string | null;
|
|
15
|
+
|
|
16
|
+
@Column({ type: "integer", nullable: true })
|
|
17
|
+
repeat_interval_days: number | null; // Repeating after every N days (default 10)
|
|
18
|
+
|
|
19
|
+
@Column({ type: "boolean", nullable: false, default: true })
|
|
20
|
+
is_active: boolean;
|
|
21
|
+
|
|
22
|
+
constructor(
|
|
23
|
+
department_id: number,
|
|
24
|
+
section_id: number | null = null,
|
|
25
|
+
frequency: string | null = null,
|
|
26
|
+
repeat_interval_days: number = 10,
|
|
27
|
+
is_active: boolean = true
|
|
28
|
+
) {
|
|
29
|
+
super();
|
|
30
|
+
this.department_id = department_id;
|
|
31
|
+
this.section_id = section_id;
|
|
32
|
+
this.frequency = frequency;
|
|
33
|
+
this.repeat_interval_days = repeat_interval_days;
|
|
34
|
+
this.is_active = is_active;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
|
|
2
|
-
import { Column, Entity } from "typeorm";
|
|
3
|
-
import { BaseModel } from './BaseModel';
|
|
4
|
-
|
|
5
|
-
export enum NotificationType {
|
|
6
|
-
REQUEST_RAISED = 'request raised',
|
|
7
|
-
REQUEST_APPROVE = 'request approve',
|
|
8
|
-
REQUEST_REJECT = 'request reject',
|
|
9
|
-
REQUEST_WITHDRAW = 'request withdraw',
|
|
10
|
-
REMINDER = 'reminder',
|
|
11
|
-
IMPORT = 'import',
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@Entity({ name: 'notification' })
|
|
15
|
-
export class Notification extends BaseModel {
|
|
16
|
-
|
|
17
|
-
@Column({
|
|
18
|
-
type: "enum",
|
|
19
|
-
enum: NotificationType,
|
|
20
|
-
nullable: false,
|
|
21
|
-
})
|
|
22
|
-
type: NotificationType;
|
|
23
|
-
|
|
24
|
-
@Column({ type: 'bigint', nullable: false })
|
|
25
|
-
user_id: number;
|
|
26
|
-
|
|
27
|
-
@Column({ type: 'bigint', nullable: true })
|
|
28
|
-
role_id: number;
|
|
29
|
-
|
|
30
|
-
@Column({ type: 'bigint', nullable: true })
|
|
31
|
-
department_id: number;
|
|
32
|
-
|
|
33
|
-
@Column({ type: 'bigint', nullable: true })
|
|
34
|
-
section_id: number;
|
|
35
|
-
|
|
36
|
-
@Column({ type: 'jsonb', nullable: true })
|
|
37
|
-
content: any;
|
|
38
|
-
|
|
39
|
-
@Column({ type: 'boolean', default: false })
|
|
40
|
-
is_read: boolean;
|
|
41
|
-
|
|
42
|
-
@Column({ type: 'bigint', nullable: true })
|
|
43
|
-
request_id: number;
|
|
44
|
-
|
|
45
|
-
@Column({ type: 'bigint', nullable: true })
|
|
46
|
-
service_id: number;
|
|
47
|
-
|
|
48
|
-
@Column({ type: 'bigint', nullable: true })
|
|
49
|
-
sub_service_id: number;
|
|
50
|
-
|
|
51
|
-
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
52
|
-
route_path: string;
|
|
53
|
-
|
|
54
|
-
/** Mirrors SLA reminder metadata also stored in `content` for cron-created rows (optional DB migration). */
|
|
55
|
-
@Column({ type: 'boolean', default: false })
|
|
56
|
-
is_sla: boolean;
|
|
57
|
-
|
|
58
|
-
/** Remaining SLA reminder taps allowed (starts at 3 for SLA cron notifications). Optional column — see `content.sla_count`. */
|
|
59
|
-
@Column({ type: 'integer', nullable: true })
|
|
60
|
-
sla_count: number | null;
|
|
61
|
-
|
|
62
|
-
constructor(
|
|
63
|
-
type: NotificationType,
|
|
64
|
-
user_id: number,
|
|
65
|
-
role_id: number,
|
|
66
|
-
department_id: number,
|
|
67
|
-
section_id: number,
|
|
68
|
-
content: any,
|
|
69
|
-
is_read: boolean,
|
|
70
|
-
request_id: number,
|
|
71
|
-
service_id: number,
|
|
72
|
-
sub_service_id: number,
|
|
73
|
-
route_path: string
|
|
74
|
-
) {
|
|
75
|
-
super();
|
|
76
|
-
this.type = type;
|
|
77
|
-
this.user_id = user_id;
|
|
78
|
-
this.role_id = role_id;
|
|
79
|
-
this.department_id = department_id;
|
|
80
|
-
this.section_id = section_id;
|
|
81
|
-
this.content = content;
|
|
82
|
-
this.is_read = is_read;
|
|
83
|
-
this.request_id = request_id;
|
|
84
|
-
this.service_id = service_id;
|
|
85
|
-
this.sub_service_id = sub_service_id;
|
|
86
|
-
this.route_path = route_path;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
1
|
+
|
|
2
|
+
import { Column, Entity } from "typeorm";
|
|
3
|
+
import { BaseModel } from './BaseModel';
|
|
4
|
+
|
|
5
|
+
export enum NotificationType {
|
|
6
|
+
REQUEST_RAISED = 'request raised',
|
|
7
|
+
REQUEST_APPROVE = 'request approve',
|
|
8
|
+
REQUEST_REJECT = 'request reject',
|
|
9
|
+
REQUEST_WITHDRAW = 'request withdraw',
|
|
10
|
+
REMINDER = 'reminder',
|
|
11
|
+
IMPORT = 'import',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@Entity({ name: 'notification' })
|
|
15
|
+
export class Notification extends BaseModel {
|
|
16
|
+
|
|
17
|
+
@Column({
|
|
18
|
+
type: "enum",
|
|
19
|
+
enum: NotificationType,
|
|
20
|
+
nullable: false,
|
|
21
|
+
})
|
|
22
|
+
type: NotificationType;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'bigint', nullable: false })
|
|
25
|
+
user_id: number;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'bigint', nullable: true })
|
|
28
|
+
role_id: number;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'bigint', nullable: true })
|
|
31
|
+
department_id: number;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'bigint', nullable: true })
|
|
34
|
+
section_id: number;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'jsonb', nullable: true })
|
|
37
|
+
content: any;
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'boolean', default: false })
|
|
40
|
+
is_read: boolean;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'bigint', nullable: true })
|
|
43
|
+
request_id: number;
|
|
44
|
+
|
|
45
|
+
@Column({ type: 'bigint', nullable: true })
|
|
46
|
+
service_id: number;
|
|
47
|
+
|
|
48
|
+
@Column({ type: 'bigint', nullable: true })
|
|
49
|
+
sub_service_id: number;
|
|
50
|
+
|
|
51
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
52
|
+
route_path: string;
|
|
53
|
+
|
|
54
|
+
/** Mirrors SLA reminder metadata also stored in `content` for cron-created rows (optional DB migration). */
|
|
55
|
+
@Column({ type: 'boolean', default: false })
|
|
56
|
+
is_sla: boolean;
|
|
57
|
+
|
|
58
|
+
/** Remaining SLA reminder taps allowed (starts at 3 for SLA cron notifications). Optional column — see `content.sla_count`. */
|
|
59
|
+
@Column({ type: 'integer', nullable: true })
|
|
60
|
+
sla_count: number | null;
|
|
61
|
+
|
|
62
|
+
constructor(
|
|
63
|
+
type: NotificationType,
|
|
64
|
+
user_id: number,
|
|
65
|
+
role_id: number,
|
|
66
|
+
department_id: number,
|
|
67
|
+
section_id: number,
|
|
68
|
+
content: any,
|
|
69
|
+
is_read: boolean,
|
|
70
|
+
request_id: number,
|
|
71
|
+
service_id: number,
|
|
72
|
+
sub_service_id: number,
|
|
73
|
+
route_path: string
|
|
74
|
+
) {
|
|
75
|
+
super();
|
|
76
|
+
this.type = type;
|
|
77
|
+
this.user_id = user_id;
|
|
78
|
+
this.role_id = role_id;
|
|
79
|
+
this.department_id = department_id;
|
|
80
|
+
this.section_id = section_id;
|
|
81
|
+
this.content = content;
|
|
82
|
+
this.is_read = is_read;
|
|
83
|
+
this.request_id = request_id;
|
|
84
|
+
this.service_id = service_id;
|
|
85
|
+
this.sub_service_id = sub_service_id;
|
|
86
|
+
this.route_path = route_path;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|