@platform-modules/civil-aviation-authority 2.3.88 → 2.3.90

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.
Files changed (50) hide show
  1. package/.env +17 -9
  2. package/dist/data-source.js +13 -1
  3. package/dist/models/DepartmentDocumentOwnerModel.d.ts +10 -0
  4. package/dist/models/DepartmentDocumentOwnerModel.js +44 -0
  5. package/dist/models/DocumentAuditLogModel.d.ts +13 -0
  6. package/dist/models/DocumentAuditLogModel.js +60 -0
  7. package/dist/models/DocumentFolderModel.d.ts +14 -0
  8. package/dist/models/DocumentFolderModel.js +60 -0
  9. package/dist/models/DocumentMetadataModel.d.ts +45 -0
  10. package/dist/models/DocumentMetadataModel.js +171 -0
  11. package/dist/models/DocumentModel.d.ts +25 -0
  12. package/dist/models/DocumentModel.js +96 -0
  13. package/dist/models/DocumentPermissionModel.d.ts +11 -0
  14. package/dist/models/DocumentPermissionModel.js +52 -0
  15. package/dist/models/DocumentTypeModel.d.ts +8 -0
  16. package/dist/models/{ITServicesTypesSalalahModel.js → DocumentTypeModel.js} +19 -16
  17. package/dist/models/DocumentationDepartmentsModel.d.ts +13 -0
  18. package/dist/models/DocumentationDepartmentsModel.js +53 -0
  19. package/dist/models/FolderModel.d.ts +16 -0
  20. package/dist/models/FolderModel.js +85 -0
  21. package/dist/models/PermissionModel.d.ts +18 -0
  22. package/dist/models/PermissionModel.js +68 -0
  23. package/dist/models/UUIDBaseModel.d.ts +14 -0
  24. package/dist/models/UUIDBaseModel.js +66 -0
  25. package/package.json +1 -1
  26. package/src/data-source.ts +13 -1
  27. package/src/index.ts +6 -6
  28. package/src/models/DepartmentDocumentOwnerModel.ts +25 -0
  29. package/src/models/DepartmentsModel.ts +25 -25
  30. package/src/models/DocumentAuditLogModel.ts +38 -0
  31. package/src/models/DocumentFolderModel.ts +37 -0
  32. package/src/models/DocumentModel.ts +65 -0
  33. package/src/models/DocumentPermissionModel.ts +32 -0
  34. package/src/models/DocumentTypeModel.ts +19 -0
  35. package/src/models/HrServiceRequestModel.ts +193 -193
  36. package/src/models/ITRequestChatModel.ts +62 -62
  37. package/src/models/ItApprovalsModel.ts +84 -84
  38. package/src/models/ItWorkflowModel.ts +55 -55
  39. package/src/models/MissionTravelPassportExpiryNotificationConfigModel.ts +36 -36
  40. package/src/models/PerformanceCyclePeriodModel.ts +23 -23
  41. package/src/models/PerformanceGoalMasterModel.ts +27 -27
  42. package/src/models/ServicesNotificationConfigModel.ts +55 -55
  43. package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
  44. package/dist/models/ITApprovalSettings.d.ts +0 -7
  45. package/dist/models/ITApprovalSettings.js +0 -40
  46. package/dist/models/ITServicesTypesMuscatModel.d.ts +0 -6
  47. package/dist/models/ITServicesTypesMuscatModel.js +0 -34
  48. package/dist/models/ITServicesTypesSalalahModel.d.ts +0 -6
  49. package/dist/models/Workflows.d.ts +0 -9
  50. package/dist/models/Workflows.js +0 -31
@@ -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,56 +1,56 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- export enum workFlowStatus {
5
- COMPLETED = "Completed",
6
- NOT_YET_STARTED = "Not Yet Started",
7
- PENDING = "Pending"
8
- }
9
-
10
- //This model is used to store the store the leave apporval matrix(HOD, Manager, HR, Director) based on leave type along with the levels
11
- @Entity({ name: 'it_work_flows' })
12
- export class ItWorkFlow extends BaseModel {
13
- @Column({ type: 'int', nullable: false })
14
- request_id: number;
15
-
16
- @Column({ type: 'int', nullable: true })
17
- service_id: number | null;
18
-
19
- @Column({ type: 'int', nullable: true })
20
- sub_service_id: number | null;
21
-
22
- @Column({ type: 'int', nullable: true })
23
- order: number | null;
24
-
25
- @Column({ type: 'varchar', length: 255, nullable: false })
26
- content: string;
27
-
28
- @Column({ type: 'enum', enum: workFlowStatus, default: workFlowStatus.NOT_YET_STARTED, nullable: false })
29
- status: workFlowStatus;
30
-
31
- @Column({ type: 'integer', nullable: true })
32
- user_id: number | null;
33
-
34
- @Column({ type: 'integer', nullable: true })
35
- 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
- constructor(request_id: number, content: string, status: workFlowStatus, order?: number, service_id?: number | null, sub_service_id?: number | null, user_id?: number | null, role_id?: number | null, department_id?: number | null, section_id?: number | null) {
44
- super();
45
- this.request_id = request_id;
46
- this.content = content;
47
- this.status = status;
48
- this.order = order || null;
49
- this.service_id = service_id ?? null;
50
- this.sub_service_id = sub_service_id ?? null;
51
- this.user_id = user_id || null;
52
- this.role_id = role_id || null;
53
- this.department_id = department_id || null;
54
- this.section_id = section_id || null;
55
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum workFlowStatus {
5
+ COMPLETED = "Completed",
6
+ NOT_YET_STARTED = "Not Yet Started",
7
+ PENDING = "Pending"
8
+ }
9
+
10
+ //This model is used to store the store the leave apporval matrix(HOD, Manager, HR, Director) based on leave type along with the levels
11
+ @Entity({ name: 'it_work_flows' })
12
+ export class ItWorkFlow extends BaseModel {
13
+ @Column({ type: 'int', nullable: false })
14
+ request_id: number;
15
+
16
+ @Column({ type: 'int', nullable: true })
17
+ service_id: number | null;
18
+
19
+ @Column({ type: 'int', nullable: true })
20
+ sub_service_id: number | null;
21
+
22
+ @Column({ type: 'int', nullable: true })
23
+ order: number | null;
24
+
25
+ @Column({ type: 'varchar', length: 255, nullable: false })
26
+ content: string;
27
+
28
+ @Column({ type: 'enum', enum: workFlowStatus, default: workFlowStatus.NOT_YET_STARTED, nullable: false })
29
+ status: workFlowStatus;
30
+
31
+ @Column({ type: 'integer', nullable: true })
32
+ user_id: number | null;
33
+
34
+ @Column({ type: 'integer', nullable: true })
35
+ 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
+ constructor(request_id: number, content: string, status: workFlowStatus, order?: number, service_id?: number | null, sub_service_id?: number | null, user_id?: number | null, role_id?: number | null, department_id?: number | null, section_id?: number | null) {
44
+ super();
45
+ this.request_id = request_id;
46
+ this.content = content;
47
+ this.status = status;
48
+ this.order = order || null;
49
+ this.service_id = service_id ?? null;
50
+ this.sub_service_id = sub_service_id ?? null;
51
+ this.user_id = user_id || null;
52
+ this.role_id = role_id || null;
53
+ this.department_id = department_id || null;
54
+ this.section_id = section_id || null;
55
+ }
56
56
  }
@@ -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,23 +1,23 @@
1
- import { Column, Entity, Index } from "typeorm";
2
- import { BaseModel } from "./BaseModel";
3
-
4
- @Entity({ name: "performance_cycle_periods" })
5
- @Index("uq_performance_cycle_period", ["cycle_period", "cycle_year"], { unique: true })
6
- export class PerformanceCyclePeriod extends BaseModel {
7
- @Column({ type: "varchar", length: 50, nullable: false })
8
- cycle_period: string;
9
-
10
- @Column({ type: "integer", nullable: false })
11
- cycle_year: number;
12
-
13
- @Column({ type: "boolean", default: false })
14
- is_active: boolean;
15
-
16
- constructor(cycle_period?: string, cycle_year?: number) {
17
- super();
18
- this.cycle_period = cycle_period || "";
19
- this.cycle_year = cycle_year || new Date().getFullYear();
20
- this.is_active = false;
21
- }
22
- }
23
-
1
+ import { Column, Entity, Index } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ @Entity({ name: "performance_cycle_periods" })
5
+ @Index("uq_performance_cycle_period", ["cycle_period", "cycle_year"], { unique: true })
6
+ export class PerformanceCyclePeriod extends BaseModel {
7
+ @Column({ type: "varchar", length: 50, nullable: false })
8
+ cycle_period: string;
9
+
10
+ @Column({ type: "integer", nullable: false })
11
+ cycle_year: number;
12
+
13
+ @Column({ type: "boolean", default: false })
14
+ is_active: boolean;
15
+
16
+ constructor(cycle_period?: string, cycle_year?: number) {
17
+ super();
18
+ this.cycle_period = cycle_period || "";
19
+ this.cycle_year = cycle_year || new Date().getFullYear();
20
+ this.is_active = false;
21
+ }
22
+ }
23
+
@@ -1,27 +1,27 @@
1
- import { Column, Entity, Index } from "typeorm";
2
- import { BaseModel } from "./BaseModel";
3
-
4
- @Entity({ name: "performance_management_goals" })
5
- export class PerformanceGoalMaster extends BaseModel {
6
- @Column({ type: "varchar", length: 255, nullable: false })
7
- goal_title: string;
8
-
9
- @Column({ type: "text", nullable: true })
10
- goal_description: string | null;
11
-
12
- @Column({ type: "integer", nullable: false })
13
- @Index("idx_performance_goal_cycle_period_id")
14
- cycle_period_id: number;
15
-
16
- @Column({ type: "boolean", default: true })
17
- is_active: boolean;
18
-
19
- constructor(goal_title?: string, goal_description?: string | null, cycle_period_id?: number) {
20
- super();
21
- this.goal_title = goal_title || "";
22
- this.goal_description = goal_description || null;
23
- this.cycle_period_id = cycle_period_id || 0;
24
- this.is_active = true;
25
- }
26
- }
27
-
1
+ import { Column, Entity, Index } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ @Entity({ name: "performance_management_goals" })
5
+ export class PerformanceGoalMaster extends BaseModel {
6
+ @Column({ type: "varchar", length: 255, nullable: false })
7
+ goal_title: string;
8
+
9
+ @Column({ type: "text", nullable: true })
10
+ goal_description: string | null;
11
+
12
+ @Column({ type: "integer", nullable: false })
13
+ @Index("idx_performance_goal_cycle_period_id")
14
+ cycle_period_id: number;
15
+
16
+ @Column({ type: "boolean", default: true })
17
+ is_active: boolean;
18
+
19
+ constructor(goal_title?: string, goal_description?: string | null, cycle_period_id?: number) {
20
+ super();
21
+ this.goal_title = goal_title || "";
22
+ this.goal_description = goal_description || null;
23
+ this.cycle_period_id = cycle_period_id || 0;
24
+ this.is_active = true;
25
+ }
26
+ }
27
+
@@ -1,55 +1,55 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from "./BaseModel";
3
-
4
- export enum ServicesNotificationTriggerType {
5
- FINAL_APPROVAL = "final_approval",
6
- EVERY_APPROVAL = "every_approval"
7
- }
8
-
9
- @Entity({ name: "services_notification_configs" })
10
- export class ServicesNotificationConfigs extends BaseModel {
11
- @Column({ type: "integer", nullable: false })
12
- service_id: number;
13
-
14
- @Column({ type: "integer", nullable: false })
15
- sub_service_id: number;
16
-
17
- @Column({ type: "integer", nullable: false })
18
- department_id: number;
19
-
20
- @Column({ type: "integer", nullable: true })
21
- section_id: number | null;
22
-
23
- @Column({ type: "integer", nullable: true })
24
- role_id: number | null;
25
-
26
- @Column({
27
- type: "enum",
28
- enum: ServicesNotificationTriggerType,
29
- nullable: false,
30
- default: ServicesNotificationTriggerType.FINAL_APPROVAL
31
- })
32
- trigger: ServicesNotificationTriggerType;
33
-
34
- @Column({ type: "boolean", nullable: false, default: true })
35
- is_active: boolean;
36
-
37
- constructor(
38
- service_id: number,
39
- sub_service_id: number,
40
- department_id: number,
41
- section_id: number | null = null,
42
- role_id: number | null = null,
43
- trigger: ServicesNotificationTriggerType = ServicesNotificationTriggerType.FINAL_APPROVAL,
44
- is_active: boolean = true
45
- ) {
46
- super();
47
- this.service_id = service_id;
48
- this.sub_service_id = sub_service_id;
49
- this.department_id = department_id;
50
- this.section_id = section_id;
51
- this.role_id = role_id;
52
- this.trigger = trigger;
53
- this.is_active = is_active;
54
- }
55
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum ServicesNotificationTriggerType {
5
+ FINAL_APPROVAL = "final_approval",
6
+ EVERY_APPROVAL = "every_approval"
7
+ }
8
+
9
+ @Entity({ name: "services_notification_configs" })
10
+ export class ServicesNotificationConfigs extends BaseModel {
11
+ @Column({ type: "integer", nullable: false })
12
+ service_id: number;
13
+
14
+ @Column({ type: "integer", nullable: false })
15
+ sub_service_id: number;
16
+
17
+ @Column({ type: "integer", nullable: false })
18
+ department_id: number;
19
+
20
+ @Column({ type: "integer", nullable: true })
21
+ section_id: number | null;
22
+
23
+ @Column({ type: "integer", nullable: true })
24
+ role_id: number | null;
25
+
26
+ @Column({
27
+ type: "enum",
28
+ enum: ServicesNotificationTriggerType,
29
+ nullable: false,
30
+ default: ServicesNotificationTriggerType.FINAL_APPROVAL
31
+ })
32
+ trigger: ServicesNotificationTriggerType;
33
+
34
+ @Column({ type: "boolean", nullable: false, default: true })
35
+ is_active: boolean;
36
+
37
+ constructor(
38
+ service_id: number,
39
+ sub_service_id: number,
40
+ department_id: number,
41
+ section_id: number | null = null,
42
+ role_id: number | null = null,
43
+ trigger: ServicesNotificationTriggerType = ServicesNotificationTriggerType.FINAL_APPROVAL,
44
+ is_active: boolean = true
45
+ ) {
46
+ super();
47
+ this.service_id = service_id;
48
+ this.sub_service_id = sub_service_id;
49
+ this.department_id = department_id;
50
+ this.section_id = section_id;
51
+ this.role_id = role_id;
52
+ this.trigger = trigger;
53
+ this.is_active = is_active;
54
+ }
55
+ }
@@ -1,30 +1,30 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from "./BaseModel";
3
-
4
- export enum NotificationFrequency {
5
- YEARLY = "yearly",
6
- SIX_MONTHS_BEFORE = "6_months_before"
7
- }
8
-
9
- @Entity({ name: "training_room_notification_configs" })
10
- export class TrainingRoomNotificationConfig extends BaseModel {
11
- @Column({ type: "integer", nullable: false })
12
- department_id: number;
13
-
14
- @Column({ type: "integer", nullable: true })
15
- section_id: number | null;
16
-
17
- @Column({ type: "boolean", nullable: false, default: true })
18
- is_active: boolean;
19
-
20
- constructor(
21
- department_id: number,
22
- section_id: number | null = null,
23
- is_active: boolean = true
24
- ) {
25
- super();
26
- this.department_id = department_id;
27
- this.section_id = section_id;
28
- this.is_active = is_active;
29
- }
30
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum NotificationFrequency {
5
+ YEARLY = "yearly",
6
+ SIX_MONTHS_BEFORE = "6_months_before"
7
+ }
8
+
9
+ @Entity({ name: "training_room_notification_configs" })
10
+ export class TrainingRoomNotificationConfig extends BaseModel {
11
+ @Column({ type: "integer", nullable: false })
12
+ department_id: number;
13
+
14
+ @Column({ type: "integer", nullable: true })
15
+ section_id: number | null;
16
+
17
+ @Column({ type: "boolean", nullable: false, default: true })
18
+ is_active: boolean;
19
+
20
+ constructor(
21
+ department_id: number,
22
+ section_id: number | null = null,
23
+ is_active: boolean = true
24
+ ) {
25
+ super();
26
+ this.department_id = department_id;
27
+ this.section_id = section_id;
28
+ this.is_active = is_active;
29
+ }
30
+ }
@@ -1,7 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class ITApprovalSettings extends BaseModel {
3
- level: number;
4
- approval_role_id: number;
5
- workflow_id: number;
6
- constructor(level: number, approval_role_id: number, workflow_id: number);
7
- }