@platform-modules/foreign-ministry 1.1.53 → 1.1.55

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 (184) hide show
  1. package/dist/data-source.js +18 -34
  2. package/dist/index.d.ts +9 -24
  3. package/dist/index.js +9 -24
  4. package/dist/models/AttendanceModel.d.ts +1 -2
  5. package/dist/models/AttendanceModel.js +1 -2
  6. package/dist/models/DiplomaticApprovalsModel.d.ts +25 -0
  7. package/dist/models/DiplomaticApprovalsModel.js +95 -0
  8. package/dist/models/DiplomaticAttachmentsModel.d.ts +12 -0
  9. package/dist/models/{GeneralServiceAttachmentsModel.js → DiplomaticAttachmentsModel.js} +22 -18
  10. package/dist/models/DiplomaticChatsModel.d.ts +11 -0
  11. package/dist/models/{GeneralServiceChatsModel.js → DiplomaticChatsModel.js} +21 -17
  12. package/dist/models/DiplomaticClubCardApprovalModel.d.ts +16 -0
  13. package/dist/models/DiplomaticClubCardApprovalModel.js +58 -0
  14. package/dist/models/DiplomaticClubCardAttachmentModel.d.ts +9 -0
  15. package/dist/models/{HelpdeskCategoriesModel.js → DiplomaticClubCardAttachmentModel.js} +22 -27
  16. package/dist/models/DiplomaticClubCardChatModel.d.ts +7 -0
  17. package/dist/models/{JobsModel.js → DiplomaticClubCardChatModel.js} +16 -29
  18. package/dist/models/DiplomaticClubCardMemberModel.d.ts +13 -0
  19. package/dist/models/DiplomaticClubCardMemberModel.js +60 -0
  20. package/dist/models/DiplomaticClubCardRequestModel.d.ts +33 -0
  21. package/dist/models/DiplomaticClubCardRequestModel.js +98 -0
  22. package/dist/models/DiplomaticClubCardWorkFlowModel.d.ts +12 -0
  23. package/dist/models/DiplomaticClubCardWorkFlowModel.js +42 -0
  24. package/dist/models/DiplomaticRequestsModel.d.ts +43 -0
  25. package/dist/models/DiplomaticRequestsModel.js +142 -0
  26. package/dist/models/DiplomaticServiceDetailsModel.d.ts +20 -0
  27. package/dist/models/DiplomaticServiceDetailsModel.js +65 -0
  28. package/dist/models/DiplomaticSettingsModel.d.ts +11 -0
  29. package/dist/models/DiplomaticSettingsModel.js +59 -0
  30. package/dist/models/DiplomaticTitleModel.d.ts +12 -0
  31. package/dist/models/DiplomaticTitleModel.js +45 -0
  32. package/dist/models/DiplomaticWorkFlowModel.d.ts +21 -0
  33. package/dist/models/DiplomaticWorkFlowModel.js +78 -0
  34. package/dist/models/EarlyCheckoutApprovalModel.d.ts +0 -1
  35. package/dist/models/EarlyCheckoutApprovalModel.js +0 -4
  36. package/dist/models/EarlyCheckoutChatModel.d.ts +0 -4
  37. package/dist/models/EarlyCheckoutChatModel.js +2 -28
  38. package/dist/models/EarlyCheckoutWorkflowModel.d.ts +0 -4
  39. package/dist/models/EarlyCheckoutWorkflowModel.js +0 -16
  40. package/dist/models/FinancialApprovalsModel.d.ts +1 -2
  41. package/dist/models/FinancialApprovalsModel.js +2 -7
  42. package/dist/models/FinancialChatsModel.d.ts +1 -16
  43. package/dist/models/FinancialChatsModel.js +3 -33
  44. package/dist/models/FinancialRequestsModel.d.ts +1 -1
  45. package/dist/models/FinancialRequestsModel.js +3 -3
  46. package/dist/models/FinancialWorkFlowModel.d.ts +1 -3
  47. package/dist/models/FinancialWorkFlowModel.js +2 -11
  48. package/dist/models/LeaveApprovalsModel.d.ts +1 -4
  49. package/dist/models/LeaveApprovalsModel.js +0 -9
  50. package/dist/models/LeaveAttachmentsModel.d.ts +2 -6
  51. package/dist/models/LeaveAttachmentsModel.js +7 -27
  52. package/dist/models/LeaveChatModel.d.ts +1 -5
  53. package/dist/models/LeaveChatModel.js +2 -22
  54. package/dist/models/LeaveRequestModel.d.ts +1 -12
  55. package/dist/models/LeaveRequestModel.js +0 -35
  56. package/dist/models/LeaveWorkFlowModel.d.ts +1 -5
  57. package/dist/models/LeaveWorkFlowModel.js +2 -22
  58. package/dist/models/MounringLeaveRelationModel.d.ts +1 -2
  59. package/dist/models/MounringLeaveRelationModel.js +2 -7
  60. package/dist/models/PassportRequestApprovalModel.d.ts +22 -0
  61. package/dist/models/PassportRequestApprovalModel.js +91 -0
  62. package/dist/models/PassportRequestAttachmentModel.d.ts +10 -0
  63. package/dist/models/{HelpdeskSubCategoriesModel.js → PassportRequestAttachmentModel.js} +29 -29
  64. package/dist/models/PassportRequestChatModel.d.ts +8 -0
  65. package/dist/models/PassportRequestChatModel.js +44 -0
  66. package/dist/models/PassportRequestDependentModel.d.ts +20 -0
  67. package/dist/models/PassportRequestDependentModel.js +85 -0
  68. package/dist/models/PassportRequestModel.d.ts +40 -0
  69. package/dist/models/PassportRequestModel.js +128 -0
  70. package/dist/models/PassportRequestWorkFlowModel.d.ts +15 -0
  71. package/dist/models/PassportRequestWorkFlowModel.js +60 -0
  72. package/dist/models/ReimbursementRequestsModel.d.ts +1 -2
  73. package/dist/models/ReimbursementRequestsModel.js +4 -9
  74. package/dist/models/StayAfterHoursApprovalModel.d.ts +0 -1
  75. package/dist/models/StayAfterHoursApprovalModel.js +0 -4
  76. package/dist/models/StayAfterHoursChatModel.d.ts +0 -4
  77. package/dist/models/StayAfterHoursChatModel.js +2 -28
  78. package/dist/models/StayAfterHoursWorkflowModel.d.ts +0 -4
  79. package/dist/models/StayAfterHoursWorkflowModel.js +0 -16
  80. package/dist/models/SubscriptionAmountModel.d.ts +35 -0
  81. package/dist/models/SubscriptionAmountModel.js +74 -0
  82. package/dist/models/WorkflowTask.d.ts +2 -5
  83. package/dist/models/WorkflowTask.js +4 -28
  84. package/dist/models/WorkflowTaskNames.d.ts +3 -12
  85. package/dist/models/WorkflowTaskNames.js +9 -28
  86. package/package.json +1 -1
  87. package/src/data-source.ts +30 -45
  88. package/src/index.ts +9 -24
  89. package/src/models/AttendanceModel.ts +1 -2
  90. package/src/models/DiplomaticApprovalsModel.ts +78 -0
  91. package/src/models/DiplomaticAttachmentsModel.ts +45 -0
  92. package/src/models/DiplomaticChatsModel.ts +41 -0
  93. package/src/models/DiplomaticRequestsModel.ts +121 -0
  94. package/src/models/DiplomaticServiceDetailsModel.ts +51 -0
  95. package/src/models/DiplomaticSettingsModel.ts +45 -0
  96. package/src/models/DiplomaticTitleModel.ts +27 -0
  97. package/src/models/DiplomaticWorkFlowModel.ts +62 -0
  98. package/src/models/EarlyCheckoutApprovalModel.ts +0 -3
  99. package/src/models/EarlyCheckoutChatModel.ts +1 -34
  100. package/src/models/EarlyCheckoutWorkflowModel.ts +0 -12
  101. package/src/models/FinancialApprovalsModel.ts +1 -6
  102. package/src/models/FinancialChatsModel.ts +1 -27
  103. package/src/models/FinancialRequestsModel.ts +2 -2
  104. package/src/models/FinancialWorkFlowModel.ts +1 -9
  105. package/src/models/LeaveApprovalsModel.ts +1 -8
  106. package/src/models/LeaveAttachmentsModel.ts +5 -21
  107. package/src/models/LeaveChatModel.ts +1 -17
  108. package/src/models/LeaveRequestModel.ts +1 -29
  109. package/src/models/LeaveWorkFlowModel.ts +1 -17
  110. package/src/models/MounringLeaveRelationModel.ts +1 -5
  111. package/src/models/ReimbursementRequestsModel.ts +6 -8
  112. package/src/models/StayAfterHoursApprovalModel.ts +0 -3
  113. package/src/models/StayAfterHoursChatModel.ts +1 -34
  114. package/src/models/StayAfterHoursWorkflowModel.ts +0 -12
  115. package/src/models/SubscriptionAmountModel.ts +55 -0
  116. package/src/models/WorkflowTask.ts +4 -31
  117. package/src/models/WorkflowTaskNames.ts +8 -27
  118. package/dist/models/CurrencyModel.d.ts +0 -10
  119. package/dist/models/CurrencyModel.js +0 -53
  120. package/dist/models/GeneralServiceApprovalsModel.d.ts +0 -26
  121. package/dist/models/GeneralServiceApprovalsModel.js +0 -109
  122. package/dist/models/GeneralServiceAttachmentsModel.d.ts +0 -10
  123. package/dist/models/GeneralServiceChatsModel.d.ts +0 -9
  124. package/dist/models/GeneralServiceRequestsModel.d.ts +0 -36
  125. package/dist/models/GeneralServiceRequestsModel.js +0 -137
  126. package/dist/models/GeneralServiceWorkFlowModel.d.ts +0 -21
  127. package/dist/models/GeneralServiceWorkFlowModel.js +0 -80
  128. package/dist/models/GroupModel.d.ts +0 -16
  129. package/dist/models/GroupModel.js +0 -44
  130. package/dist/models/GroupNamesModel.d.ts +0 -6
  131. package/dist/models/GroupNamesModel.js +0 -34
  132. package/dist/models/HelpdeskCategoriesModel.d.ts +0 -9
  133. package/dist/models/HelpdeskSubCategoriesModel.d.ts +0 -10
  134. package/dist/models/IssueTypesModel.d.ts +0 -10
  135. package/dist/models/IssueTypesModel.js +0 -54
  136. package/dist/models/JobsModel.d.ts +0 -17
  137. package/dist/models/RoutingGroupsModel.d.ts +0 -13
  138. package/dist/models/RoutingGroupsModel.js +0 -67
  139. package/dist/models/TelephoneDirectoryModel.d.ts +0 -21
  140. package/dist/models/TelephoneDirectoryModel.js +0 -108
  141. package/dist/models/TransferMissionApprovalModel.d.ts +0 -21
  142. package/dist/models/TransferMissionApprovalModel.js +0 -75
  143. package/dist/models/TransferMissionAttachmentModel.d.ts +0 -11
  144. package/dist/models/TransferMissionAttachmentModel.js +0 -52
  145. package/dist/models/TransferMissionChatModel.d.ts +0 -19
  146. package/dist/models/TransferMissionChatModel.js +0 -78
  147. package/dist/models/TransferMissionRequestModel.d.ts +0 -36
  148. package/dist/models/TransferMissionRequestModel.js +0 -132
  149. package/dist/models/TransferMissionWorkflowModel.d.ts +0 -17
  150. package/dist/models/TransferMissionWorkflowModel.js +0 -62
  151. package/dist/models/UpdateAttendanceApprovalModel.d.ts +0 -21
  152. package/dist/models/UpdateAttendanceApprovalModel.js +0 -75
  153. package/dist/models/UpdateAttendanceChatModel.d.ts +0 -16
  154. package/dist/models/UpdateAttendanceChatModel.js +0 -52
  155. package/dist/models/UpdateAttendanceRequestModel.d.ts +0 -28
  156. package/dist/models/UpdateAttendanceRequestModel.js +0 -86
  157. package/dist/models/UpdateAttendanceWorkflowModel.d.ts +0 -13
  158. package/dist/models/UpdateAttendanceWorkflowModel.js +0 -46
  159. package/dist/models/WorkScheduleModel.d.ts +0 -19
  160. package/dist/models/WorkScheduleModel.js +0 -60
  161. package/src/models/CurrencyModel.ts +0 -38
  162. package/src/models/GeneralServiceApprovalsModel.ts +0 -95
  163. package/src/models/GeneralServiceAttachmentsModel.ts +0 -43
  164. package/src/models/GeneralServiceChatsModel.ts +0 -39
  165. package/src/models/GeneralServiceRequestsModel.ts +0 -113
  166. package/src/models/GeneralServiceWorkFlowModel.ts +0 -78
  167. package/src/models/GroupModel.ts +0 -30
  168. package/src/models/GroupNamesModel.ts +0 -22
  169. package/src/models/HelpdeskCategoriesModel.ts +0 -35
  170. package/src/models/HelpdeskSubCategoriesModel.ts +0 -40
  171. package/src/models/IssueTypesModel.ts +0 -47
  172. package/src/models/JobsModel.ts +0 -37
  173. package/src/models/RoutingGroupsModel.ts +0 -64
  174. package/src/models/TelephoneDirectoryModel.ts +0 -84
  175. package/src/models/TransferMissionApprovalModel.ts +0 -49
  176. package/src/models/TransferMissionAttachmentModel.ts +0 -31
  177. package/src/models/TransferMissionChatModel.ts +0 -66
  178. package/src/models/TransferMissionRequestModel.ts +0 -94
  179. package/src/models/TransferMissionWorkflowModel.ts +0 -39
  180. package/src/models/UpdateAttendanceApprovalModel.ts +0 -50
  181. package/src/models/UpdateAttendanceChatModel.ts +0 -35
  182. package/src/models/UpdateAttendanceRequestModel.ts +0 -63
  183. package/src/models/UpdateAttendanceWorkflowModel.ts +0 -28
  184. package/src/models/WorkScheduleModel.ts +0 -47
@@ -9,27 +9,16 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.WorkflowTaskNames = exports.CategoryType = exports.TaskType = void 0;
12
+ exports.WorkflowTaskNames = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
- var TaskType;
16
- (function (TaskType) {
17
- TaskType["SIMPLE"] = "SIMPLE";
18
- TaskType["HUMAN"] = "HUMAN";
19
- })(TaskType || (exports.TaskType = TaskType = {}));
20
- var CategoryType;
21
- (function (CategoryType) {
22
- CategoryType["CREATE"] = "CREATE";
23
- CategoryType["APPROVAL"] = "APPROVAL";
24
- CategoryType["NOTIFICATION"] = "NOTIFICATION";
25
- })(CategoryType || (exports.CategoryType = CategoryType = {}));
26
15
  let WorkflowTaskNames = class WorkflowTaskNames extends BaseModel_1.BaseModel {
27
- constructor(name, description, task_type, category) {
16
+ constructor(name, task_id, description, task_type) {
28
17
  super();
29
18
  this.name = name;
19
+ this.task_id = task_id;
30
20
  this.description = description;
31
21
  this.task_type = task_type;
32
- this.category = category;
33
22
  }
34
23
  };
35
24
  exports.WorkflowTaskNames = WorkflowTaskNames;
@@ -37,27 +26,19 @@ __decorate([
37
26
  (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
38
27
  __metadata("design:type", String)
39
28
  ], WorkflowTaskNames.prototype, "name", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
31
+ __metadata("design:type", Number)
32
+ ], WorkflowTaskNames.prototype, "task_id", void 0);
40
33
  __decorate([
41
34
  (0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
42
35
  __metadata("design:type", String)
43
36
  ], WorkflowTaskNames.prototype, "description", void 0);
44
37
  __decorate([
45
- (0, typeorm_1.Column)({
46
- type: 'enum',
47
- enum: TaskType,
48
- nullable: true
49
- }),
38
+ (0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
50
39
  __metadata("design:type", String)
51
40
  ], WorkflowTaskNames.prototype, "task_type", void 0);
52
- __decorate([
53
- (0, typeorm_1.Column)({
54
- type: 'enum',
55
- enum: CategoryType,
56
- nullable: true
57
- }),
58
- __metadata("design:type", String)
59
- ], WorkflowTaskNames.prototype, "category", void 0);
60
41
  exports.WorkflowTaskNames = WorkflowTaskNames = __decorate([
61
42
  (0, typeorm_1.Entity)({ name: 'workflow_task_names' }),
62
- __metadata("design:paramtypes", [String, String, String, String])
43
+ __metadata("design:paramtypes", [String, Number, String, String])
63
44
  ], WorkflowTaskNames);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.1.53",
3
+ "version": "1.1.55",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -80,6 +80,15 @@ import { StayAfterHoursApprovalDetails } from './models/StayAfterHoursApprovalMo
80
80
  import { StayAfterHoursRequestAttachment } from './models/StayAfterHoursAttachmentModel';
81
81
  import { StayAfterHoursRequestChat } from './models/StayAfterHoursChatModel';
82
82
  import { StayAfterHoursWorkFlow } from './models/StayAfterHoursWorkflowModel';
83
+ import { DiplomaticRequests } from './models/DiplomaticRequestsModel';
84
+ import { DiplomaticServiceDetails } from './models/DiplomaticServiceDetailsModel';
85
+ import { DiplomaticChats } from './models/DiplomaticChatsModel';
86
+ import { DiplomaticApprovals } from './models/DiplomaticApprovalsModel';
87
+ import { DiplomaticWorkFlow } from './models/DiplomaticWorkFlowModel';
88
+ import { DiplomaticAttachments } from './models/DiplomaticAttachmentsModel';
89
+ import { DiplomaticSettings } from './models/DiplomaticSettingsModel';
90
+ import { DiplomaticTitles } from './models/DiplomaticTitleModel';
91
+ import { SubscriptionAmounts } from './models/SubscriptionAmountModel';
83
92
 
84
93
 
85
94
  import { WorkflowTask } from './models/WorkflowTask';
@@ -88,24 +97,8 @@ import { WorkflowDefinitions } from './models/WorkflowDefinitions';
88
97
  import { WorkflowHierarchy } from './models/WorkflowHierarchy';
89
98
  import { ImportantLinks } from './models/importantLinksModel';
90
99
  import { DelegateSettings } from './models/DelegateSettingsModel';
91
- import { UpdateAttendanceRequests } from './models/UpdateAttendanceRequestModel';
92
- import { UpdateAttendanceApprovalDetails } from './models/UpdateAttendanceApprovalModel';
93
- import { UpdateAttendanceRequestChat } from './models/UpdateAttendanceChatModel';
94
- import { UpdateAttendanceWorkFlow } from './models/UpdateAttendanceWorkflowModel';
95
100
 
96
- import { HelpdeskCategories } from './models/HelpdeskCategoriesModel';
97
- import { HelpdeskSubCategories } from './models/HelpdeskSubCategoriesModel';
98
- import { Currency } from './models/CurrencyModel';
99
- import { TransferMissionRequests } from './models/TransferMissionRequestModel';
100
- import { TransferMissionApprovalDetails } from './models/TransferMissionApprovalModel';
101
- import { TransferMissionRequestAttachment } from './models/TransferMissionAttachmentModel';
102
- import { TransferMissionRequestChat } from './models/TransferMissionChatModel';
103
- import { TransferMissionWorkFlow } from './models/TransferMissionWorkflowModel';
104
- import { GroupNames } from './models/GroupNamesModel';
105
- import { Group } from './models/GroupModel';
106
- import { WorkSchedule } from './models/WorkScheduleModel';
107
- import { Jobs } from './models/JobsModel';
108
- import { TelephoneDirectory } from './models/TelephoneDirectoryModel'
101
+
109
102
  export const AppDataSource = new DataSource({
110
103
  type: 'postgres',
111
104
  host: process.env.DB_HOST || 'localhost',
@@ -184,33 +177,25 @@ export const AppDataSource = new DataSource({
184
177
  ImportantLinks,
185
178
  DelegateSettings,
186
179
  AllowanceTypes,
187
- BankNames,
188
- Currency,
189
- HelpdeskCategories,
190
- HelpdeskSubCategories,
191
- EarlyCheckoutRequests,
192
- EarlyCheckoutApprovalDetails,
193
- EarlyCheckoutRequestAttachment,
194
- EarlyCheckoutRequestChat,
195
- EarlyCheckoutWorkFlow,
196
- StayAfterHoursRequests,
197
- StayAfterHoursApprovalDetails,
198
- StayAfterHoursRequestAttachment,
199
- StayAfterHoursRequestChat,
200
- StayAfterHoursWorkFlow,
201
- UpdateAttendanceRequests,
202
- UpdateAttendanceApprovalDetails,
203
- UpdateAttendanceRequestChat,
204
- UpdateAttendanceWorkFlow,
205
- TransferMissionRequests,
206
- TransferMissionApprovalDetails,
207
- TransferMissionRequestAttachment,
208
- TransferMissionRequestChat,
209
- TransferMissionWorkFlow,
210
- GroupNames,
211
- Group,
212
- WorkSchedule,
213
- Jobs,
214
- TelephoneDirectory
180
+ BankNames
181
+ ,EarlyCheckoutRequests
182
+ ,EarlyCheckoutApprovalDetails
183
+ ,EarlyCheckoutRequestAttachment
184
+ ,EarlyCheckoutRequestChat
185
+ ,EarlyCheckoutWorkFlow
186
+ ,StayAfterHoursRequests
187
+ ,StayAfterHoursApprovalDetails
188
+ ,StayAfterHoursRequestAttachment
189
+ ,StayAfterHoursRequestChat
190
+ ,StayAfterHoursWorkFlow
191
+ ,DiplomaticRequests
192
+ ,DiplomaticServiceDetails
193
+ ,DiplomaticChats
194
+ ,DiplomaticApprovals
195
+ ,DiplomaticWorkFlow
196
+ ,DiplomaticAttachments
197
+ ,DiplomaticSettings
198
+ ,DiplomaticTitles
199
+ ,SubscriptionAmounts
215
200
  ],
216
201
  });
package/src/index.ts CHANGED
@@ -77,27 +77,12 @@ export * from './models/StayAfterHoursApprovalModel';
77
77
  export * from './models/StayAfterHoursAttachmentModel';
78
78
  export * from './models/StayAfterHoursChatModel';
79
79
  export * from './models/StayAfterHoursWorkflowModel';
80
- export * from './models/UpdateAttendanceRequestModel';
81
- export * from './models/UpdateAttendanceApprovalModel';
82
- export * from './models/UpdateAttendanceChatModel';
83
- export * from './models/UpdateAttendanceWorkflowModel';
84
- export * from './models/GeneralServiceRequestsModel';
85
- export * from './models/GeneralServiceApprovalsModel';
86
- export * from './models/GeneralServiceWorkFlowModel';
87
- export * from './models/GeneralServiceChatsModel';
88
- export * from './models/GeneralServiceAttachmentsModel';
89
- export * from './models/HelpdeskCategoriesModel';
90
- export * from './models/HelpdeskSubCategoriesModel';
91
- export * from './models/IssueTypesModel';
92
- export * from './models/RoutingGroupsModel';
93
- export * from './models/CurrencyModel';
94
- export * from './models/TransferMissionRequestModel';
95
- export * from './models/TransferMissionApprovalModel';
96
- export * from './models/TransferMissionAttachmentModel';
97
- export * from './models/TransferMissionChatModel';
98
- export * from './models/TransferMissionWorkflowModel';
99
- export * from './models/GroupNamesModel';
100
- export * from './models/GroupModel';
101
- export * from './models/WorkScheduleModel';
102
- export * from './models/JobsModel';
103
- export * from './models/TelephoneDirectoryModel'
80
+ export * from './models/DiplomaticRequestsModel';
81
+ export * from './models/DiplomaticServiceDetailsModel';
82
+ export * from './models/DiplomaticChatsModel';
83
+ export * from './models/DiplomaticApprovalsModel';
84
+ export * from './models/DiplomaticWorkFlowModel';
85
+ export * from './models/DiplomaticAttachmentsModel';
86
+ export * from './models/DiplomaticSettingsModel';
87
+ export * from './models/DiplomaticTitleModel';
88
+ export * from './models/SubscriptionAmountModel';
@@ -7,7 +7,6 @@ export enum AttendanceStatus {
7
7
  ABSENT = 'ABSENT',
8
8
  LEAVE = 'LEAVE',
9
9
  HALF_DAY = 'HALF_DAY',
10
- REGULARISED = 'REGULARISED',
11
10
  }
12
11
 
13
12
  @Entity({ name: 'attendance_details' })
@@ -20,7 +19,7 @@ export class AttendanceDetails extends BaseModel {
20
19
  @Column({ type: 'int', nullable: true })
21
20
  shift_id: number;
22
21
 
23
- @Column({ type: 'date', nullable: true })
22
+ @Column({ type: 'date', nullable: true , unique: true})
24
23
  attendance_date: string;
25
24
 
26
25
  @Column({ type: 'time', nullable: true })
@@ -0,0 +1,78 @@
1
+ import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+ import { DiplomaticRequests } from './DiplomaticRequestsModel';
4
+
5
+ export enum DiplomaticApprovalStatus {
6
+ PENDING = "Pending",
7
+ APPROVED = "Approved",
8
+ REJECTED = "Rejected",
9
+ SKIPPED = "Skipped",
10
+ IN_PROGRESS = "In Progress"
11
+ }
12
+
13
+ @Entity({ name: 'diplomatic_approvals' })
14
+ export class DiplomaticApprovals extends BaseModel {
15
+ @Column({ type: 'int' })
16
+ diplomatic_request_id: number;
17
+
18
+ @Column({ type: 'int' })
19
+ level: number;
20
+
21
+ @Column({ type: 'int', nullable: true })
22
+ approver_user_id: number | null;
23
+
24
+ @Column({ type: 'int' })
25
+ approver_role_id: number;
26
+
27
+ @Column({ type: 'text', nullable: true })
28
+ comment: string | null;
29
+
30
+ @Column({ type: 'enum', enum: DiplomaticApprovalStatus, default: DiplomaticApprovalStatus.PENDING })
31
+ approval_status: DiplomaticApprovalStatus;
32
+
33
+ @Column({ type: 'timestamp', nullable: true })
34
+ action_date: Date;
35
+
36
+ @Column({ type: 'int', nullable: true })
37
+ department_id: number | null;
38
+
39
+ @Column({ type: 'int', nullable: true })
40
+ section_id: number | null;
41
+
42
+ @Column({ type: 'int', nullable: true })
43
+ approved_by: number | null;
44
+
45
+ @Column({ type: 'int', nullable: true })
46
+ service_id: number | null;
47
+
48
+ @Column({ type: 'int', nullable: true })
49
+ sub_service_id: number | null;
50
+
51
+ @ManyToOne(() => DiplomaticRequests, dr => dr.approvals)
52
+ @JoinColumn({ name: 'diplomatic_request_id' })
53
+ diplomaticRequest?: DiplomaticRequests;
54
+
55
+ constructor(
56
+ diplomatic_request_id: number,
57
+ level: number,
58
+ approver_role_id: number,
59
+ approval_status: DiplomaticApprovalStatus,
60
+ department_id: number | null,
61
+ section_id: number | null,
62
+ approved_by: number | null,
63
+ service_id: number | null,
64
+ sub_service_id: number | null
65
+ ) {
66
+ super();
67
+ this.diplomatic_request_id = diplomatic_request_id;
68
+ this.level = level;
69
+ this.approver_role_id = approver_role_id;
70
+ this.approval_status = approval_status;
71
+ this.department_id = department_id;
72
+ this.section_id = section_id;
73
+ this.approved_by = approved_by;
74
+ this.service_id = service_id;
75
+ this.sub_service_id = sub_service_id;
76
+ }
77
+ }
78
+
@@ -0,0 +1,45 @@
1
+ import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+ import { DiplomaticRequests } from './DiplomaticRequestsModel';
4
+
5
+ @Entity({ name: 'diplomatic_attachments' })
6
+ export class DiplomaticAttachments extends BaseModel {
7
+ @Column({ type: 'int' })
8
+ diplomatic_request_id: number;
9
+
10
+ @Column({ type: 'varchar', length: 500 })
11
+ file_url: string;
12
+
13
+ @Column({ type: 'varchar', length: 255 })
14
+ file_name: string;
15
+
16
+ @Column({ type: 'varchar', length: 50, nullable: true })
17
+ file_type: string; // PDF, JPG, PNG, etc.
18
+
19
+ @Column({ type: 'int', nullable: true })
20
+ service_id: number | null;
21
+
22
+ @Column({ type: 'int', nullable: true })
23
+ sub_service_id: number | null;
24
+
25
+ @ManyToOne(() => DiplomaticRequests, dr => dr.attachments)
26
+ @JoinColumn({ name: 'diplomatic_request_id' })
27
+ diplomaticRequest?: DiplomaticRequests;
28
+
29
+ constructor(
30
+ diplomatic_request_id: number,
31
+ file_url: string,
32
+ file_name: string,
33
+ service_id: number | null,
34
+ sub_service_id: number | null
35
+ ) {
36
+ super();
37
+ this.diplomatic_request_id = diplomatic_request_id;
38
+ this.file_url = file_url;
39
+ this.file_name = file_name;
40
+ this.file_type = 'PDF';
41
+ this.service_id = service_id;
42
+ this.sub_service_id = sub_service_id;
43
+ }
44
+ }
45
+
@@ -0,0 +1,41 @@
1
+ import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+ import { DiplomaticRequests } from './DiplomaticRequestsModel';
4
+
5
+ @Entity({ name: 'diplomatic_chats' })
6
+ export class DiplomaticChats extends BaseModel {
7
+ @Column({ type: 'int' })
8
+ diplomatic_request_id: number;
9
+
10
+ @Column({ type: 'text' })
11
+ content: string;
12
+
13
+ @Column({ type: 'int' })
14
+ sender_user_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
+ @ManyToOne(() => DiplomaticRequests, dr => dr.chats)
23
+ @JoinColumn({ name: 'diplomatic_request_id' })
24
+ diplomaticRequest?: DiplomaticRequests;
25
+
26
+ constructor(
27
+ diplomatic_request_id: number,
28
+ content: string,
29
+ sender_user_id: number,
30
+ service_id: number | null,
31
+ sub_service_id: number | null
32
+ ) {
33
+ super();
34
+ this.diplomatic_request_id = diplomatic_request_id;
35
+ this.content = content;
36
+ this.sender_user_id = sender_user_id;
37
+ this.service_id = service_id;
38
+ this.sub_service_id = sub_service_id;
39
+ }
40
+ }
41
+
@@ -0,0 +1,121 @@
1
+ import { Column, Entity, OneToOne, OneToMany, ManyToOne, JoinColumn } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ // Import types only (not for runtime)
5
+ import type { DiplomaticServiceDetails } from './DiplomaticServiceDetailsModel';
6
+ import type { DiplomaticChats } from './DiplomaticChatsModel';
7
+ import type { DiplomaticApprovals } from './DiplomaticApprovalsModel';
8
+ import type { DiplomaticWorkFlow } from './DiplomaticWorkFlowModel';
9
+ import type { DiplomaticAttachments } from './DiplomaticAttachmentsModel';
10
+
11
+ export enum DiplomaticRequestStatus {
12
+ DRAFT = "Draft",
13
+ SUBMITTED = "Submitted",
14
+ PENDING = "Pending",
15
+ IN_PROGRESS = "In Progress",
16
+ APPROVED = "Approved",
17
+ REJECTED = "Rejected",
18
+ COMPLETED = "Completed",
19
+ CANCELLED = "Cancelled"
20
+ }
21
+
22
+ @Entity({ name: 'diplomatic_requests' })
23
+ export class DiplomaticRequests extends BaseModel {
24
+ @Column({ type: 'int' })
25
+ user_id: number;
26
+
27
+ @Column({ type: 'varchar', length: 100 })
28
+ employee_id: string;
29
+
30
+ @Column({ type: 'varchar', length: 255 })
31
+ employee_name: string;
32
+
33
+ @Column({ type: 'varchar', length: 100, nullable: true })
34
+ grade: string | null;
35
+
36
+ @Column({ type: 'int', nullable: true })
37
+ designation_id: number | null;
38
+
39
+ @Column({ type: 'int', nullable: true })
40
+ department_id: number | null;
41
+
42
+ @Column({ type: 'varchar', length: 255 })
43
+ email_address: string;
44
+
45
+ @Column({ type: 'varchar', length: 20 })
46
+ contact_number: string;
47
+
48
+ @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
49
+ request_date: Date;
50
+
51
+ @Column({ type: 'enum', enum: DiplomaticRequestStatus, default: DiplomaticRequestStatus.PENDING })
52
+ request_status: DiplomaticRequestStatus;
53
+
54
+ @Column({ type: 'timestamp', nullable: true })
55
+ request_close_date: Date | null;
56
+
57
+ @Column({ type: 'text', nullable: true })
58
+ remarks: string | null;
59
+
60
+ @Column({ type: 'int', nullable: true })
61
+ current_approval_level: number | null;
62
+
63
+ @Column({ type: 'int', nullable: true })
64
+ current_approver_id: number | null;
65
+
66
+ @Column({ type: 'int', nullable: true })
67
+ service_id: number | null;
68
+
69
+ @Column({ type: 'int', nullable: true })
70
+ sub_service_id: number | null;
71
+
72
+ @Column({ type: 'int', nullable: true })
73
+ section_id: number | null;
74
+
75
+ @Column({ type: 'int', nullable: true })
76
+ reporting_manager: number | null;
77
+
78
+ @Column({ type: 'varchar', length: 255, nullable: true })
79
+ workflow_execution_id: string | null;
80
+
81
+ @OneToOne('DiplomaticServiceDetails', 'diplomaticRequest', { nullable: true })
82
+ serviceDetails?: DiplomaticServiceDetails;
83
+
84
+ @OneToMany('DiplomaticChats', 'diplomaticRequest')
85
+ chats?: DiplomaticChats[];
86
+
87
+ @OneToMany('DiplomaticApprovals', 'diplomaticRequest')
88
+ approvals?: DiplomaticApprovals[];
89
+
90
+ @OneToMany('DiplomaticWorkFlow', 'diplomaticRequest')
91
+ workflows?: DiplomaticWorkFlow[];
92
+
93
+ @OneToMany('DiplomaticAttachments', 'diplomaticRequest')
94
+ attachments?: DiplomaticAttachments[];
95
+
96
+ constructor(
97
+ user_id: number,
98
+ employee_id: string,
99
+ employee_name: string,
100
+ email_address: string,
101
+ contact_number: string,
102
+ service_id: number | null,
103
+ sub_service_id: number | null,
104
+ section_id: number | null,
105
+ reporting_manager: number | null
106
+ ) {
107
+ super();
108
+ this.user_id = user_id;
109
+ this.employee_id = employee_id;
110
+ this.employee_name = employee_name;
111
+ this.email_address = email_address;
112
+ this.contact_number = contact_number;
113
+ this.request_date = new Date();
114
+ this.request_status = DiplomaticRequestStatus.PENDING;
115
+ this.service_id = service_id;
116
+ this.sub_service_id = sub_service_id;
117
+ this.section_id = section_id;
118
+ this.reporting_manager = reporting_manager;
119
+ }
120
+ }
121
+
@@ -0,0 +1,51 @@
1
+ import { Column, Entity, OneToOne, JoinColumn } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+ import { DiplomaticRequests } from './DiplomaticRequestsModel';
4
+
5
+ export enum DiplomaticServiceType {
6
+ TRANSFER_TO_LONG_TERM_MISSION = "Transfer to Long Term Mission",
7
+ MISSION_TRAVEL = "Mission Travel",
8
+ DIPLOMATIC_PASSPORT = "Diplomatic Passport",
9
+ PARCEL_SERVICES = "Parcel Services",
10
+ DIPLOMATIC_CLUB_CARD = "Diplomatic Club Card",
11
+ VACANCY_REGISTRATION = "Vacancy Registration",
12
+ VACANCY_CANDIDATE = "Vacancy Candidate"
13
+ }
14
+
15
+ @Entity({ name: 'diplomatic_service_details' })
16
+ export class DiplomaticServiceDetails extends BaseModel {
17
+ @Column({ type: 'int', unique: true })
18
+ diplomatic_request_id: number;
19
+
20
+ @Column({ type: 'enum', enum: DiplomaticServiceType })
21
+ service_type: DiplomaticServiceType;
22
+
23
+ @Column({ type: 'int', nullable: true })
24
+ service_id: number | null;
25
+
26
+ @Column({ type: 'int', nullable: true })
27
+ sub_service_id: number | null;
28
+
29
+ @Column({ type: 'jsonb', nullable: true })
30
+ service_data: any; // Stores all service-specific data as JSON
31
+
32
+ @OneToOne(() => DiplomaticRequests, dr => dr.serviceDetails)
33
+ @JoinColumn({ name: 'diplomatic_request_id' })
34
+ diplomaticRequest?: DiplomaticRequests;
35
+
36
+ constructor(
37
+ diplomatic_request_id: number,
38
+ service_type: DiplomaticServiceType,
39
+ service_data: any,
40
+ service_id: number | null,
41
+ sub_service_id: number | null
42
+ ) {
43
+ super();
44
+ this.diplomatic_request_id = diplomatic_request_id;
45
+ this.service_type = service_type;
46
+ this.service_data = service_data;
47
+ this.service_id = service_id;
48
+ this.sub_service_id = sub_service_id;
49
+ }
50
+ }
51
+
@@ -0,0 +1,45 @@
1
+ import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'diplomatic_settings' })
5
+ export class DiplomaticSettings extends BaseModel {
6
+ @Column({ type: 'int' })
7
+ service_id: number;
8
+
9
+ @Column({ type: 'int' })
10
+ approval_level: number;
11
+
12
+ @Column({ type: 'int' })
13
+ approver_role_id: number;
14
+
15
+ @Column({ type: 'boolean', default: true })
16
+ is_active: boolean;
17
+
18
+ @Column({ type: 'int', nullable: true })
19
+ sub_service_id: number;
20
+
21
+ @Column({ type: 'int', nullable: true })
22
+ department_id: number;
23
+
24
+ @Column({ type: 'int', nullable: true })
25
+ section_id: number;
26
+
27
+ constructor(
28
+ service_id: number,
29
+ approval_level: number,
30
+ approver_role_id: number,
31
+ sub_service_id: number,
32
+ department_id: number,
33
+ section_id: number
34
+ ) {
35
+ super();
36
+ this.service_id = service_id;
37
+ this.approval_level = approval_level;
38
+ this.approver_role_id = approver_role_id;
39
+ this.is_active = true;
40
+ this.sub_service_id = sub_service_id;
41
+ this.department_id = department_id;
42
+ this.section_id = section_id;
43
+ }
44
+ }
45
+
@@ -0,0 +1,27 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum TitleCategory {
5
+ EMPLOYEE = "Employee",
6
+ NON_EMPLOYEE = "Non Employee"
7
+ }
8
+
9
+ @Entity({ name: 'diplomatic_titles' })
10
+ export class DiplomaticTitles extends BaseModel {
11
+
12
+ @Column({ type: 'varchar', length: 100, nullable: false })
13
+ title_name: string; // Agent or Equivalent, Ambassador, etc.
14
+
15
+ @Column({ type: 'varchar', length: 100, nullable: true })
16
+ title_name_arabic: string | null;
17
+
18
+ @Column({ type: 'enum', enum: TitleCategory, nullable: false })
19
+ category: TitleCategory; // Employee or Non Employee
20
+
21
+ @Column({ type: 'boolean', default: true, nullable: false })
22
+ is_active: boolean;
23
+
24
+ @Column({ type: 'int', nullable: true })
25
+ display_order: number | null;
26
+ }
27
+