@platform-modules/civil-aviation-authority 2.3.249 → 2.3.250

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 (112) hide show
  1. package/.env +7 -22
  2. package/dist/index.d.ts +8 -0
  3. package/dist/index.js +9 -0
  4. package/dist/models/EmployeeSecurityDriveMasterModel.d.ts +13 -0
  5. package/dist/models/EmployeeSecurityDriveMasterModel.js +52 -0
  6. package/dist/models/EmployeeSecurityDriveModel.d.ts +8 -0
  7. package/dist/models/EmployeeSecurityDriveModel.js +37 -0
  8. package/dist/models/EmployeeSecurityFileAccessModel.d.ts +18 -0
  9. package/dist/models/EmployeeSecurityFileAccessModel.js +68 -0
  10. package/dist/models/EmployeeSecurityFileAuditLogModel.d.ts +9 -0
  11. package/dist/models/EmployeeSecurityFileAuditLogModel.js +44 -0
  12. package/dist/models/EmployeeSecurityFileModel.d.ts +18 -0
  13. package/dist/models/EmployeeSecurityFileModel.js +80 -0
  14. package/dist/models/EmployeeSecurityFileTypeModel.d.ts +6 -0
  15. package/dist/models/EmployeeSecurityFileTypeModel.js +32 -0
  16. package/dist/models/EmployeeSecurityFileVersionModel.d.ts +10 -0
  17. package/dist/models/EmployeeSecurityFileVersionModel.js +48 -0
  18. package/dist/models/EmployeeSecurityFolderModel.d.ts +11 -0
  19. package/dist/models/{SecurityAccessChatModel.js → EmployeeSecurityFolderModel.js} +23 -27
  20. package/dist/models/ITApprovalSettings.d.ts +7 -0
  21. package/dist/models/ITApprovalSettings.js +40 -0
  22. package/dist/models/ITServicesTypesMuscatModel.d.ts +6 -0
  23. package/dist/models/ITServicesTypesMuscatModel.js +34 -0
  24. package/dist/models/ITServicesTypesSalalahModel.d.ts +6 -0
  25. package/dist/models/ITServicesTypesSalalahModel.js +34 -0
  26. package/dist/models/Workflows.d.ts +9 -0
  27. package/dist/models/Workflows.js +31 -0
  28. package/package.json +2 -2
  29. package/src/index.ts +10 -0
  30. package/src/models/AccessCardRequestModel.ts +135 -135
  31. package/src/models/AccommodationApprovalModel.ts +8 -8
  32. package/src/models/AccommodationRequestModel.ts +8 -8
  33. package/src/models/AirportEntryPermitModel.ts +276 -276
  34. package/src/models/AnnualIncrementRequestEmployeeModel.ts +65 -65
  35. package/src/models/AnnualIncrementRequestModel.ts +25 -25
  36. package/src/models/AnnualTrainingPlanRequestModel.ts +153 -153
  37. package/src/models/AppealAgainstAdministrativeDecisionRequestModel.ts +23 -23
  38. package/src/models/CAAServices.ts +33 -33
  39. package/src/models/CAASubServices.ts +33 -33
  40. package/src/models/CAIRatingMasterModel.ts +39 -39
  41. package/src/models/CSRMBusinessImpactRatingMasterModel.ts +25 -25
  42. package/src/models/CSRMLikelihoodMasterModel.ts +25 -25
  43. package/src/models/CashAllowanceLeaveRequestModel.ts +11 -11
  44. package/src/models/DepartmentsModel.ts +25 -25
  45. package/src/models/DocumentDriveModel.ts +28 -28
  46. package/src/models/DocumentFolderModel.ts +45 -45
  47. package/src/models/EmployeeSecurityDriveMasterModel.ts +31 -0
  48. package/src/models/EmployeeSecurityDriveModel.ts +18 -0
  49. package/src/models/EmployeeSecurityFileAccessModel.ts +42 -0
  50. package/src/models/EmployeeSecurityFileAuditLogModel.ts +23 -0
  51. package/src/models/EmployeeSecurityFileModel.ts +50 -0
  52. package/src/models/EmployeeSecurityFileTypeModel.ts +14 -0
  53. package/src/models/EmployeeSecurityFileVersionModel.ts +26 -0
  54. package/src/models/EmployeeSecurityFolderModel.ts +29 -0
  55. package/src/models/HotelApprovalModel.ts +83 -83
  56. package/src/models/HousingContractCancelApprovalModel.ts +64 -64
  57. package/src/models/HousingContractCancelChatModel.ts +56 -56
  58. package/src/models/HousingContractRenewalApprovalModel.ts +64 -64
  59. package/src/models/HousingContractRenewalChatModel.ts +59 -59
  60. package/src/models/HrServiceRequestModel.ts +193 -193
  61. package/src/models/ITRequestAttachmentModel.ts +73 -73
  62. package/src/models/ITRequestChatModel.ts +74 -74
  63. package/src/models/ItApprovalsModel.ts +84 -84
  64. package/src/models/ItWorkflowModel.ts +55 -55
  65. package/src/models/LegalConsultationApprovalModel.ts +65 -65
  66. package/src/models/MissionTravelPassportExpiryNotificationConfigModel.ts +36 -36
  67. package/src/models/NotificationModel.ts +89 -89
  68. package/src/models/PerformanceCyclePeriodModel.ts +26 -26
  69. package/src/models/PerformanceGoalMasterModel.ts +27 -27
  70. package/src/models/PerformanceManagementRequestGoalModel.ts +46 -46
  71. package/src/models/PerformanceManagementRequestModel.ts +14 -14
  72. package/src/models/PromotionRequestModel.ts +11 -11
  73. package/src/models/ResidentialUnitRentalApprovalModel.ts +143 -143
  74. package/src/models/ResidentialUnitRentalChatModel.ts +56 -56
  75. package/src/models/ResidentialUnitRentalRequestModel.ts +218 -218
  76. package/src/models/RespondToEnquiriesRequestModel.ts +31 -31
  77. package/src/models/ServiceExtensionAfter60ApprovalModel.ts +87 -87
  78. package/src/models/ServicesNotificationConfigModel.ts +55 -55
  79. package/src/models/SkillsEnhancementRequestModel.ts +17 -17
  80. package/src/models/SlaRequestModel.ts +65 -65
  81. package/src/models/StudyLeaveRequestModel.ts +144 -144
  82. package/src/models/TrainingRequestModel.ts +164 -164
  83. package/src/models/TrainingRoomBookingRequestModel.ts +142 -142
  84. package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
  85. package/src/models/UserSkillModel.ts +56 -56
  86. package/src/models/role.ts +34 -34
  87. package/src/models/user.ts +233 -233
  88. package/dist/models/DocumentMetadataModel.d.ts +0 -45
  89. package/dist/models/DocumentMetadataModel.js +0 -171
  90. package/dist/models/DocumentationDepartmentsModel.d.ts +0 -13
  91. package/dist/models/DocumentationDepartmentsModel.js +0 -53
  92. package/dist/models/FolderModel.d.ts +0 -16
  93. package/dist/models/FolderModel.js +0 -85
  94. package/dist/models/ImportExportMaterialModels.d.ts +0 -92
  95. package/dist/models/ImportExportMaterialModels.js +0 -307
  96. package/dist/models/PermissionModel.d.ts +0 -18
  97. package/dist/models/PermissionModel.js +0 -68
  98. package/dist/models/SecurityAccessApprovalModel.d.ts +0 -23
  99. package/dist/models/SecurityAccessApprovalModel.js +0 -82
  100. package/dist/models/SecurityAccessAttachmentModel.d.ts +0 -12
  101. package/dist/models/SecurityAccessAttachmentModel.js +0 -56
  102. package/dist/models/SecurityAccessChatModel.d.ts +0 -12
  103. package/dist/models/SecurityAccessRequestModel.d.ts +0 -25
  104. package/dist/models/SecurityAccessRequestModel.js +0 -80
  105. package/dist/models/SecurityAccessWorkflowModel.d.ts +0 -24
  106. package/dist/models/SecurityAccessWorkflowModel.js +0 -84
  107. package/dist/models/ServiceExtensionAfterAge60Models.d.ts +0 -93
  108. package/dist/models/ServiceExtensionAfterAge60Models.js +0 -312
  109. package/dist/models/UUIDBaseModel.d.ts +0 -14
  110. package/dist/models/UUIDBaseModel.js +0 -66
  111. package/dist/models/WorkingHoursExtensionModels.d.ts +0 -88
  112. package/dist/models/WorkingHoursExtensionModels.js +0 -295
@@ -9,20 +9,20 @@ export class CAASubServices extends BaseModel {
9
9
  @Column({ type: 'varchar', length: 64, nullable: true, unique: true })
10
10
  code: string | null;
11
11
 
12
- @Column({ nullable: false })
13
- sub_service_name: string;
14
-
15
- @Column({ type: "text", nullable: true })
16
- arabic_name: string | null;
17
-
18
- @Column({ nullable: false })
19
- description: string;
20
-
21
- @Column({ type: "text", nullable: true })
22
- arabic_description: string | null;
23
-
24
- @Column({ nullable: true })
25
- service_id: number;
12
+ @Column({ nullable: false })
13
+ sub_service_name: string;
14
+
15
+ @Column({ type: "text", nullable: true })
16
+ arabic_name: string | null;
17
+
18
+ @Column({ nullable: false })
19
+ description: string;
20
+
21
+ @Column({ type: "text", nullable: true })
22
+ arabic_description: string | null;
23
+
24
+ @Column({ nullable: true })
25
+ service_id: number;
26
26
 
27
27
  @ManyToOne(() => CAAServices)
28
28
  @JoinColumn({ name: 'service_id' })
@@ -31,22 +31,22 @@ export class CAASubServices extends BaseModel {
31
31
  @Column({ nullable: true })
32
32
  logo_url: string;
33
33
 
34
- constructor(
35
- sub_service_name: string,
36
- description: string,
37
- arabic_name: string | null,
38
- arabic_description: string | null,
39
- service_id: number,
40
- logo_url: string,
41
- code: string | null = null
42
- ) {
43
- super();
44
- this.sub_service_name = sub_service_name
45
- this.arabic_name = arabic_name || null;
46
- this.description = description
47
- this.arabic_description = arabic_description || null;
48
- this.service_id = service_id
49
- this.logo_url = logo_url
50
- this.code = code
51
- }
52
- }
34
+ constructor(
35
+ sub_service_name: string,
36
+ description: string,
37
+ arabic_name: string | null,
38
+ arabic_description: string | null,
39
+ service_id: number,
40
+ logo_url: string,
41
+ code: string | null = null
42
+ ) {
43
+ super();
44
+ this.sub_service_name = sub_service_name
45
+ this.arabic_name = arabic_name || null;
46
+ this.description = description
47
+ this.arabic_description = arabic_description || null;
48
+ this.service_id = service_id
49
+ this.logo_url = logo_url
50
+ this.code = code
51
+ }
52
+ }
@@ -1,39 +1,39 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from "./BaseModel";
3
-
4
- @Entity({ name: "cai_rating_master" })
5
- export class CAIRatingMaster extends BaseModel {
6
- @Column({ type: "text", nullable: false })
7
- confidentiality: string;
8
-
9
- @Column({ type: "text", nullable: false })
10
- integrity: string;
11
-
12
- @Column({ type: "text", nullable: false })
13
- availability: string;
14
-
15
- @Column({ type: "varchar", length: 100, nullable: false })
16
- rating: string;
17
-
18
- @Column({ type: "varchar", length: 100, nullable: false })
19
- value: string;
20
-
21
- @Column({ type: "boolean", default: true })
22
- is_active: boolean;
23
-
24
- constructor(
25
- confidentiality: string,
26
- integrity: string,
27
- availability: string,
28
- rating: string,
29
- value: string
30
- ) {
31
- super();
32
- this.confidentiality = confidentiality;
33
- this.integrity = integrity;
34
- this.availability = availability;
35
- this.rating = rating;
36
- this.value = value;
37
- this.is_active = true;
38
- }
39
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ @Entity({ name: "cai_rating_master" })
5
+ export class CAIRatingMaster extends BaseModel {
6
+ @Column({ type: "text", nullable: false })
7
+ confidentiality: string;
8
+
9
+ @Column({ type: "text", nullable: false })
10
+ integrity: string;
11
+
12
+ @Column({ type: "text", nullable: false })
13
+ availability: string;
14
+
15
+ @Column({ type: "varchar", length: 100, nullable: false })
16
+ rating: string;
17
+
18
+ @Column({ type: "varchar", length: 100, nullable: false })
19
+ value: string;
20
+
21
+ @Column({ type: "boolean", default: true })
22
+ is_active: boolean;
23
+
24
+ constructor(
25
+ confidentiality: string,
26
+ integrity: string,
27
+ availability: string,
28
+ rating: string,
29
+ value: string
30
+ ) {
31
+ super();
32
+ this.confidentiality = confidentiality;
33
+ this.integrity = integrity;
34
+ this.availability = availability;
35
+ this.rating = rating;
36
+ this.value = value;
37
+ this.is_active = true;
38
+ }
39
+ }
@@ -1,25 +1,25 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from "./BaseModel";
3
-
4
- @Entity({ name: "csrm_business_impact_rating_master" })
5
- export class CSRMBusinessImpactRatingMaster extends BaseModel {
6
- @Column({ type: "text", nullable: false })
7
- guidelines: string;
8
-
9
- @Column({ type: "varchar", length: 100, nullable: false })
10
- rating: string;
11
-
12
- @Column({ type: "varchar", length: 100, nullable: false })
13
- value: string;
14
-
15
- @Column({ type: "boolean", default: true })
16
- is_active: boolean;
17
-
18
- constructor(guidelines: string, rating: string, value: string) {
19
- super();
20
- this.guidelines = guidelines;
21
- this.rating = rating;
22
- this.value = value;
23
- this.is_active = true;
24
- }
25
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ @Entity({ name: "csrm_business_impact_rating_master" })
5
+ export class CSRMBusinessImpactRatingMaster extends BaseModel {
6
+ @Column({ type: "text", nullable: false })
7
+ guidelines: string;
8
+
9
+ @Column({ type: "varchar", length: 100, nullable: false })
10
+ rating: string;
11
+
12
+ @Column({ type: "varchar", length: 100, nullable: false })
13
+ value: string;
14
+
15
+ @Column({ type: "boolean", default: true })
16
+ is_active: boolean;
17
+
18
+ constructor(guidelines: string, rating: string, value: string) {
19
+ super();
20
+ this.guidelines = guidelines;
21
+ this.rating = rating;
22
+ this.value = value;
23
+ this.is_active = true;
24
+ }
25
+ }
@@ -1,25 +1,25 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from "./BaseModel";
3
-
4
- @Entity({ name: "csrm_likelihood_master" })
5
- export class CSRMLikelihoodMaster extends BaseModel {
6
- @Column({ type: "text", nullable: false })
7
- guidelines: string;
8
-
9
- @Column({ type: "varchar", length: 100, nullable: false })
10
- rating: string;
11
-
12
- @Column({ type: "varchar", length: 100, nullable: false })
13
- value: string;
14
-
15
- @Column({ type: "boolean", default: true })
16
- is_active: boolean;
17
-
18
- constructor(guidelines: string, rating: string, value: string) {
19
- super();
20
- this.guidelines = guidelines;
21
- this.rating = rating;
22
- this.value = value;
23
- this.is_active = true;
24
- }
25
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ @Entity({ name: "csrm_likelihood_master" })
5
+ export class CSRMLikelihoodMaster extends BaseModel {
6
+ @Column({ type: "text", nullable: false })
7
+ guidelines: string;
8
+
9
+ @Column({ type: "varchar", length: 100, nullable: false })
10
+ rating: string;
11
+
12
+ @Column({ type: "varchar", length: 100, nullable: false })
13
+ value: string;
14
+
15
+ @Column({ type: "boolean", default: true })
16
+ is_active: boolean;
17
+
18
+ constructor(guidelines: string, rating: string, value: string) {
19
+ super();
20
+ this.guidelines = guidelines;
21
+ this.rating = rating;
22
+ this.value = value;
23
+ this.is_active = true;
24
+ }
25
+ }
@@ -45,12 +45,12 @@ export class CashAllowanceLeaveRequest extends BaseModel {
45
45
  @Column({ type: "timestamp", nullable: true })
46
46
  assigned_at: Date | null;
47
47
 
48
- @Column({ type: "varchar", length: 255, nullable: true })
49
- workflow_execution_id: string | null;
50
-
51
- @Column({ type: "varchar", length: 255, nullable: true })
52
- reference_number: string | null;
53
-
48
+ @Column({ type: "varchar", length: 255, nullable: true })
49
+ workflow_execution_id: string | null;
50
+
51
+ @Column({ type: "varchar", length: 255, nullable: true })
52
+ reference_number: string | null;
53
+
54
54
  // Cash Allowance for Leave specific fields
55
55
  @Column({ type: "varchar", length: 255, nullable: false })
56
56
  employee_name: string;
@@ -112,11 +112,11 @@ export class CashAllowanceLeaveRequest extends BaseModel {
112
112
  this.req_user_position_id = req_user_position_id || null;
113
113
  this.description = description || null;
114
114
  this.reviewer_user_id = reviewer_user_id || null;
115
- this.assigned_to_user_id = assigned_to_user_id || null;
116
- this.assigned_at = assigned_at || null;
117
- this.workflow_execution_id = workflow_execution_id || null;
118
- this.reference_number = null;
119
- this.employee_name = employee_name || "";
115
+ this.assigned_to_user_id = assigned_to_user_id || null;
116
+ this.assigned_at = assigned_at || null;
117
+ this.workflow_execution_id = workflow_execution_id || null;
118
+ this.reference_number = null;
119
+ this.employee_name = employee_name || "";
120
120
  this.employee_id = employee_id || "";
121
121
  this.job_title = job_title || "";
122
122
  this.salary_grade = salary_grade || "";
@@ -1,26 +1,26 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- @Entity({ name: 'departments' })
5
- export class Departments extends BaseModel {
6
-
7
- @Column({ type: 'varchar', length: 64, nullable: false})
8
- department_name: string;
9
-
10
- @Column({ type: 'varchar', length: 64, nullable: false})
11
- department_code: string;
12
-
13
- @Column({ nullable: false })
14
- department_description: string;
15
-
16
- constructor(
17
- department_name: string,
18
- department_code: string,
19
- department_description: string,
20
- ) {
21
- super();
22
- this.department_name = department_name
23
- this.department_code = department_code
24
- this.department_description = department_description
25
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'departments' })
5
+ export class Departments extends BaseModel {
6
+
7
+ @Column({ type: 'varchar', length: 64, nullable: false})
8
+ department_name: string;
9
+
10
+ @Column({ type: 'varchar', length: 64, nullable: false})
11
+ department_code: string;
12
+
13
+ @Column({ nullable: false })
14
+ department_description: string;
15
+
16
+ constructor(
17
+ department_name: string,
18
+ department_code: string,
19
+ department_description: string,
20
+ ) {
21
+ super();
22
+ this.department_name = department_name
23
+ this.department_code = department_code
24
+ this.department_description = department_description
25
+ }
26
26
  }
@@ -1,28 +1,28 @@
1
- import { Column, Entity, ManyToOne, JoinColumn, OneToMany } from "typeorm";
2
- import { BaseModel } from "./BaseModel";
3
- import { Departments } from "./DepartmentsModel";
4
- import { DocumentFolder } from "./DocumentFolderModel";
5
-
6
- @Entity({ name: "document_drives" })
7
- export class DocumentDrive extends BaseModel {
8
- @Column({ type: "integer", nullable: false })
9
- department_id: number;
10
-
11
- @Column({ type: "varchar", length: 255, nullable: false })
12
- name: string;
13
-
14
- @Column({ type: "text", nullable: true })
15
- description: string | null;
16
-
17
- @Column({ type: "boolean", nullable: false, default: true })
18
- is_active: boolean;
19
-
20
- @ManyToOne(() => Departments)
21
- @JoinColumn({ name: "department_id" })
22
- department?: Departments;
23
-
24
- @OneToMany(() => DocumentFolder, (folder) => folder.drive)
25
- folders?: DocumentFolder[];
26
-
27
-
28
- }
1
+ import { Column, Entity, ManyToOne, JoinColumn, OneToMany } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+ import { Departments } from "./DepartmentsModel";
4
+ import { DocumentFolder } from "./DocumentFolderModel";
5
+
6
+ @Entity({ name: "document_drives" })
7
+ export class DocumentDrive extends BaseModel {
8
+ @Column({ type: "integer", nullable: false })
9
+ department_id: number;
10
+
11
+ @Column({ type: "varchar", length: 255, nullable: false })
12
+ name: string;
13
+
14
+ @Column({ type: "text", nullable: true })
15
+ description: string | null;
16
+
17
+ @Column({ type: "boolean", nullable: false, default: true })
18
+ is_active: boolean;
19
+
20
+ @ManyToOne(() => Departments)
21
+ @JoinColumn({ name: "department_id" })
22
+ department?: Departments;
23
+
24
+ @OneToMany(() => DocumentFolder, (folder) => folder.drive)
25
+ folders?: DocumentFolder[];
26
+
27
+
28
+ }
@@ -1,45 +1,45 @@
1
- import { Column, Entity, ManyToOne, JoinColumn, OneToMany } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
- import { Departments } from './DepartmentsModel';
4
- import { Document } from './DocumentModel';
5
- import { DocumentDrive } from './DocumentDriveModel';
6
-
7
- @Entity({ name: 'document_folders' })
8
- export class DocumentFolder extends BaseModel {
9
-
10
- @Column({ type: 'varchar', length: 100, nullable: false })
11
- name: string;
12
-
13
- @Column({ type: 'integer', nullable: false })
14
- department_id: number;
15
-
16
- @Column({ type: 'integer', nullable: true })
17
- drive_id: number | null;
18
-
19
- @ManyToOne(() => DocumentDrive, (d) => d.folders, { nullable: true })
20
- @JoinColumn({ name: 'drive_id' })
21
- drive?: DocumentDrive;
22
-
23
- @Column({ type: 'integer', nullable: true })
24
- parent_folder_id?: number;
25
-
26
- @Column({ type: 'text', nullable: true })
27
- description?: string;
28
-
29
- @Column({ type: 'boolean', nullable: false, default: true })
30
- is_active: boolean;
31
-
32
- @ManyToOne(() => Departments)
33
- @JoinColumn({ name: 'department_id' })
34
- department?: Departments;
35
-
36
- @ManyToOne(() => DocumentFolder, { nullable: true })
37
- @JoinColumn({ name: 'parent_folder_id' })
38
- parentFolder?: DocumentFolder;
39
-
40
- @OneToMany(() => DocumentFolder, folder => folder.parentFolder)
41
- subFolders?: DocumentFolder[];
42
-
43
- @OneToMany(() => Document, document => document.folder)
44
- documents?: Document[];
45
- }
1
+ import { Column, Entity, ManyToOne, JoinColumn, OneToMany } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+ import { Departments } from './DepartmentsModel';
4
+ import { Document } from './DocumentModel';
5
+ import { DocumentDrive } from './DocumentDriveModel';
6
+
7
+ @Entity({ name: 'document_folders' })
8
+ export class DocumentFolder extends BaseModel {
9
+
10
+ @Column({ type: 'varchar', length: 100, nullable: false })
11
+ name: string;
12
+
13
+ @Column({ type: 'integer', nullable: false })
14
+ department_id: number;
15
+
16
+ @Column({ type: 'integer', nullable: true })
17
+ drive_id: number | null;
18
+
19
+ @ManyToOne(() => DocumentDrive, (d) => d.folders, { nullable: true })
20
+ @JoinColumn({ name: 'drive_id' })
21
+ drive?: DocumentDrive;
22
+
23
+ @Column({ type: 'integer', nullable: true })
24
+ parent_folder_id?: number;
25
+
26
+ @Column({ type: 'text', nullable: true })
27
+ description?: string;
28
+
29
+ @Column({ type: 'boolean', nullable: false, default: true })
30
+ is_active: boolean;
31
+
32
+ @ManyToOne(() => Departments)
33
+ @JoinColumn({ name: 'department_id' })
34
+ department?: Departments;
35
+
36
+ @ManyToOne(() => DocumentFolder, { nullable: true })
37
+ @JoinColumn({ name: 'parent_folder_id' })
38
+ parentFolder?: DocumentFolder;
39
+
40
+ @OneToMany(() => DocumentFolder, folder => folder.parentFolder)
41
+ subFolders?: DocumentFolder[];
42
+
43
+ @OneToMany(() => Document, document => document.folder)
44
+ documents?: Document[];
45
+ }
@@ -0,0 +1,31 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ /**
5
+ * Admin-configured drives for Employee Security Files.
6
+ * Security department staff select from active drives to create folders and upload files.
7
+ */
8
+ @Entity({ name: "employee_security_drive_master" })
9
+ export class EmployeeSecurityDriveMaster extends BaseModel {
10
+ @Column({ type: "integer", nullable: false })
11
+ department_id: number;
12
+
13
+ @Column({ type: "varchar", length: 255, nullable: false })
14
+ name: string;
15
+
16
+ @Column({ type: "text", nullable: true })
17
+ description: string | null;
18
+
19
+ @Column({ type: "boolean", default: true })
20
+ is_active: boolean;
21
+
22
+ @Column({ type: "int", default: 0 })
23
+ display_order: number;
24
+
25
+ constructor(name?: string) {
26
+ super();
27
+ if (name) this.name = name;
28
+ this.is_active = true;
29
+ this.display_order = 0;
30
+ }
31
+ }
@@ -0,0 +1,18 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ /** @deprecated Use EmployeeSecurityDriveMaster. Legacy table employee_security_drives. */
5
+ @Entity({ name: "employee_security_drives" })
6
+ export class EmployeeSecurityDrive extends BaseModel {
7
+ @Column({ type: "integer", nullable: false })
8
+ department_id: number;
9
+
10
+ @Column({ type: "varchar", length: 255, nullable: false })
11
+ name: string;
12
+
13
+ @Column({ type: "text", nullable: true })
14
+ description: string | null;
15
+
16
+ @Column({ type: "boolean", nullable: false, default: true })
17
+ is_active: boolean;
18
+ }
@@ -0,0 +1,42 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ /**
5
+ * User-level access for employee security drives, folders, and files.
6
+ * Security staff assign access; assigned users can read/download assigned items.
7
+ */
8
+ @Entity({ name: "employee_security_file_access" })
9
+ export class EmployeeSecurityFileAccess extends BaseModel {
10
+ @Column({ type: "integer", nullable: false })
11
+ user_id: number;
12
+
13
+ @Column({ type: "integer", nullable: true })
14
+ drive_id: number | null;
15
+
16
+ @Column({ type: "integer", nullable: true })
17
+ folder_id: number | null;
18
+
19
+ @Column({ type: "integer", nullable: true })
20
+ file_id: number | null;
21
+
22
+ @Column({ type: "integer", nullable: true })
23
+ service_id: number | null;
24
+
25
+ @Column({ type: "integer", nullable: true })
26
+ sub_service_id: number | null;
27
+
28
+ @Column({ type: "boolean", nullable: false, default: true })
29
+ can_read: boolean;
30
+
31
+ @Column({ type: "boolean", nullable: false, default: false })
32
+ can_write: boolean;
33
+
34
+ @Column({ type: "boolean", nullable: false, default: true })
35
+ can_download: boolean;
36
+
37
+ @Column({ type: "boolean", nullable: false, default: false })
38
+ can_share: boolean;
39
+
40
+ @Column({ type: "boolean", nullable: false, default: true })
41
+ is_active: boolean;
42
+ }
@@ -0,0 +1,23 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ @Entity({ name: "employee_security_file_audit_logs" })
5
+ export class EmployeeSecurityFileAuditLog extends BaseModel {
6
+ @Column({ type: "integer", nullable: false })
7
+ file_id: number;
8
+
9
+ @Column({ type: "integer", nullable: false })
10
+ user_id: number;
11
+
12
+ @Column({ type: "varchar", length: 50, nullable: false })
13
+ action_type: string;
14
+
15
+ @Column({ type: "jsonb", nullable: true })
16
+ action_details?: any;
17
+
18
+ @Column({ type: "varchar", length: 45, nullable: true })
19
+ ip_address?: string;
20
+
21
+ @Column({ type: "text", nullable: true })
22
+ user_agent?: string;
23
+ }
@@ -0,0 +1,50 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ @Entity({ name: "employee_security_files" })
5
+ export class EmployeeSecurityFile extends BaseModel {
6
+ @Column({ type: "varchar", length: 200, nullable: false })
7
+ title: string;
8
+
9
+ @Column({ type: "integer", nullable: false })
10
+ department_id: number;
11
+
12
+ @Column({ type: "integer", nullable: false })
13
+ file_type_id: number;
14
+
15
+ @Column({ type: "integer", nullable: true })
16
+ drive_id?: number;
17
+
18
+ @Column({ type: "integer", nullable: true })
19
+ folder_id?: number;
20
+
21
+ @Column({ type: "integer", nullable: false })
22
+ service_id: number;
23
+
24
+ @Column({ type: "integer", nullable: false })
25
+ sub_service_id: number;
26
+
27
+ @Column({ type: "varchar", length: 255, nullable: false })
28
+ mongodb_file_id: string;
29
+
30
+ @Column({ type: "varchar", length: 255, nullable: false })
31
+ file_name: string;
32
+
33
+ @Column({ type: "bigint", nullable: false })
34
+ file_size: number;
35
+
36
+ @Column({ type: "varchar", length: 100, nullable: true })
37
+ file_type?: string;
38
+
39
+ @Column({ type: "integer", nullable: false, default: 1 })
40
+ version: number;
41
+
42
+ @Column({ type: "text", nullable: true })
43
+ description?: string;
44
+
45
+ @Column({ type: "boolean", nullable: false, default: false })
46
+ is_sensitive: boolean;
47
+
48
+ @Column({ type: "boolean", nullable: false, default: true })
49
+ is_active: boolean;
50
+ }