@platform-modules/foreign-ministry 1.1.76 → 1.1.78

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 (135) hide show
  1. package/.env +23 -3
  2. package/dist/data-source.js +32 -16
  3. package/dist/index.d.ts +25 -8
  4. package/dist/index.js +40 -8
  5. package/dist/models/EarlyCheckoutBalanceModel.d.ts +7 -0
  6. package/dist/models/EarlyCheckoutBalanceModel.js +39 -0
  7. package/dist/models/EarlyCheckoutConfigModel.d.ts +18 -0
  8. package/dist/models/EarlyCheckoutConfigModel.js +80 -0
  9. package/dist/models/EarlyCheckoutTransactionModel.d.ts +19 -0
  10. package/dist/models/EarlyCheckoutTransactionModel.js +66 -0
  11. package/dist/models/FinancialApprovalsModel.d.ts +1 -0
  12. package/dist/models/FinancialApprovalsModel.js +4 -0
  13. package/dist/models/FinancialGradeModel.d.ts +4 -3
  14. package/dist/models/FinancialGradeModel.js +12 -7
  15. package/dist/models/GeneralServiceApprovalsModel.d.ts +4 -1
  16. package/dist/models/GeneralServiceApprovalsModel.js +9 -0
  17. package/dist/models/LeaveApprovalDetailsModel.d.ts +13 -0
  18. package/dist/models/LeaveApprovalDetailsModel.js +51 -0
  19. package/dist/models/LeaveApprovalMatrixModel.d.ts +7 -0
  20. package/dist/models/{DiplomaticClubCardChatModel.js → LeaveApprovalMatrixModel.js} +18 -14
  21. package/dist/models/LeaveApprovalsModel.d.ts +2 -1
  22. package/dist/models/LeaveApprovalsModel.js +7 -2
  23. package/dist/models/LeaveBalanceModel.d.ts +8 -0
  24. package/dist/models/{PassportRequestChatModel.js → LeaveBalanceModel.js} +23 -23
  25. package/dist/models/LeaveConfigGradesModel.d.ts +19 -0
  26. package/dist/models/LeaveConfigGradesModel.js +100 -0
  27. package/dist/models/LeaveConfigModel.d.ts +20 -0
  28. package/dist/models/LeaveConfigModel.js +90 -0
  29. package/dist/models/LeaveTransactionModel.d.ts +20 -0
  30. package/dist/models/LeaveTransactionModel.js +71 -0
  31. package/dist/models/LeaveTypesModel.d.ts +7 -1
  32. package/dist/models/LeaveTypesModel.js +20 -5
  33. package/dist/models/M&CMasterModel.d.ts +9 -0
  34. package/dist/models/M&CMasterModel.js +49 -0
  35. package/dist/models/ProfileUpdateRequestsModel.d.ts +106 -0
  36. package/dist/models/ProfileUpdateRequestsModel.js +409 -0
  37. package/dist/models/StationeryMaterialMasterModel.d.ts +11 -0
  38. package/dist/models/{DiplomaticTitlesMasterModel.js → StationeryMaterialMasterModel.js} +25 -23
  39. package/dist/models/StationeryRequestsModel.d.ts +27 -0
  40. package/dist/models/StationeryRequestsModel.js +93 -0
  41. package/dist/models/StayAfterHoursBalanceModel.d.ts +7 -0
  42. package/dist/models/StayAfterHoursBalanceModel.js +39 -0
  43. package/dist/models/StayAfterHoursTransactionModel.d.ts +19 -0
  44. package/dist/models/StayAfterHoursTransactionModel.js +66 -0
  45. package/dist/models/UpdateAttendanceApprovalModel.d.ts +1 -0
  46. package/dist/models/UpdateAttendanceApprovalModel.js +4 -0
  47. package/dist/models/UpdateAttendenceRequestModel.d.ts +28 -0
  48. package/dist/models/UpdateAttendenceRequestModel.js +86 -0
  49. package/dist/models/UserEducationDetailsModel.d.ts +12 -0
  50. package/dist/models/UserEducationDetailsModel.js +44 -0
  51. package/dist/models/UserEmploymentDetailsModel.d.ts +50 -0
  52. package/dist/models/UserEmploymentDetailsModel.js +193 -0
  53. package/dist/models/UserPersonalDetailsModel.d.ts +48 -0
  54. package/dist/models/UserPersonalDetailsModel.js +185 -0
  55. package/dist/models/user.d.ts +2 -1
  56. package/dist/models/user.js +7 -2
  57. package/package.json +1 -1
  58. package/src/data-source.ts +35 -17
  59. package/src/index.ts +25 -8
  60. package/src/models/EarlyCheckoutBalanceModel.ts +22 -0
  61. package/src/models/EarlyCheckoutConfigModel.ts +57 -0
  62. package/src/models/EarlyCheckoutTransactionModel.ts +53 -0
  63. package/src/models/FinancialApprovalsModel.ts +4 -0
  64. package/src/models/FinancialGradeModel.ts +13 -8
  65. package/src/models/GeneralServiceApprovalsModel.ts +10 -1
  66. package/src/models/LeaveApprovalsModel.ts +5 -1
  67. package/src/models/LeaveBalanceModel.ts +26 -0
  68. package/src/models/LeaveConfigGradesModel.Ts +72 -0
  69. package/src/models/LeaveConfigModel.ts +64 -0
  70. package/src/models/LeaveTransactionModel.ts +58 -0
  71. package/src/models/LeaveTypesModel.ts +27 -11
  72. package/src/models/M&CMasterModel.ts +37 -0
  73. package/src/models/ProfileUpdateRequestsModel.ts +317 -0
  74. package/src/models/StationeryMaterialMasterModel.ts +35 -0
  75. package/src/models/StationeryRequestsModel.ts +65 -0
  76. package/src/models/StayAfterHoursBalanceModel.ts +22 -0
  77. package/src/models/StayAfterHoursTransactionModel.ts +53 -0
  78. package/src/models/UpdateAttendanceApprovalModel.ts +3 -0
  79. package/src/models/UserEducationDetailsModel.ts +26 -0
  80. package/src/models/UserEmploymentDetailsModel.ts +141 -0
  81. package/src/models/UserPersonalDetailsModel.ts +137 -0
  82. package/src/models/user.ts +5 -0
  83. package/dist/models/DiplomaticApprovalsModel.d.ts +0 -24
  84. package/dist/models/DiplomaticApprovalsModel.js +0 -94
  85. package/dist/models/DiplomaticAttachmentsModel.d.ts +0 -11
  86. package/dist/models/DiplomaticAttachmentsModel.js +0 -53
  87. package/dist/models/DiplomaticChatsModel.d.ts +0 -20
  88. package/dist/models/DiplomaticChatsModel.js +0 -70
  89. package/dist/models/DiplomaticClubCardApprovalModel.d.ts +0 -16
  90. package/dist/models/DiplomaticClubCardApprovalModel.js +0 -58
  91. package/dist/models/DiplomaticClubCardAttachmentModel.d.ts +0 -9
  92. package/dist/models/DiplomaticClubCardAttachmentModel.js +0 -44
  93. package/dist/models/DiplomaticClubCardChatModel.d.ts +0 -7
  94. package/dist/models/DiplomaticClubCardMemberModel.d.ts +0 -13
  95. package/dist/models/DiplomaticClubCardMemberModel.js +0 -60
  96. package/dist/models/DiplomaticClubCardMembersModel.d.ts +0 -26
  97. package/dist/models/DiplomaticClubCardMembersModel.js +0 -85
  98. package/dist/models/DiplomaticClubCardRequestModel.d.ts +0 -33
  99. package/dist/models/DiplomaticClubCardRequestModel.js +0 -98
  100. package/dist/models/DiplomaticClubCardWorkFlowModel.d.ts +0 -12
  101. package/dist/models/DiplomaticClubCardWorkFlowModel.js +0 -42
  102. package/dist/models/DiplomaticClubSubscriptionMasterModel.d.ts +0 -12
  103. package/dist/models/DiplomaticClubSubscriptionMasterModel.js +0 -64
  104. package/dist/models/DiplomaticRequestsModel.d.ts +0 -53
  105. package/dist/models/DiplomaticRequestsModel.js +0 -182
  106. package/dist/models/DiplomaticServiceDetailsModel.d.ts +0 -20
  107. package/dist/models/DiplomaticServiceDetailsModel.js +0 -65
  108. package/dist/models/DiplomaticSettingsModel.d.ts +0 -11
  109. package/dist/models/DiplomaticSettingsModel.js +0 -59
  110. package/dist/models/DiplomaticTitleModel.d.ts +0 -12
  111. package/dist/models/DiplomaticTitleModel.js +0 -45
  112. package/dist/models/DiplomaticTitlesMasterModel.d.ts +0 -13
  113. package/dist/models/DiplomaticWorkFlowModel.d.ts +0 -18
  114. package/dist/models/DiplomaticWorkFlowModel.js +0 -69
  115. package/dist/models/PassportRequestApprovalModel.d.ts +0 -22
  116. package/dist/models/PassportRequestApprovalModel.js +0 -91
  117. package/dist/models/PassportRequestAttachmentModel.d.ts +0 -10
  118. package/dist/models/PassportRequestAttachmentModel.js +0 -54
  119. package/dist/models/PassportRequestChatModel.d.ts +0 -8
  120. package/dist/models/PassportRequestDependentModel.d.ts +0 -20
  121. package/dist/models/PassportRequestDependentModel.js +0 -85
  122. package/dist/models/PassportRequestModel.d.ts +0 -40
  123. package/dist/models/PassportRequestModel.js +0 -128
  124. package/dist/models/PassportRequestWorkFlowModel.d.ts +0 -15
  125. package/dist/models/PassportRequestWorkFlowModel.js +0 -60
  126. package/dist/models/SubscriptionAmountModel.d.ts +0 -67
  127. package/dist/models/SubscriptionAmountModel.js +0 -114
  128. package/src/models/DiplomaticApprovalsModel.ts +0 -77
  129. package/src/models/DiplomaticAttachmentsModel.ts +0 -37
  130. package/src/models/DiplomaticChatsModel.ts +0 -53
  131. package/src/models/DiplomaticClubCardMembersModel.ts +0 -71
  132. package/src/models/DiplomaticClubSubscriptionMasterModel.ts +0 -50
  133. package/src/models/DiplomaticRequestsModel.ts +0 -151
  134. package/src/models/DiplomaticTitlesMasterModel.ts +0 -39
  135. package/src/models/DiplomaticWorkFlowModel.ts +0 -53
@@ -0,0 +1,137 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ /**
5
+ * User Personal Details - only fields from business requirements
6
+ * Linked by user_id (not request_id)
7
+ * When profile update is approved, data from this table updates users table
8
+ */
9
+ @Entity({ name: 'user_personal_details' })
10
+ export class UserPersonalDetails extends BaseModel {
11
+ @Column({ type: 'int', nullable: false })
12
+ user_id: number; // Foreign key to users table
13
+
14
+ // Name fields
15
+ @Column({ type: 'varchar', length: 255, nullable: true })
16
+ title: string | null;
17
+
18
+ @Column({ type: 'varchar', length: 255, nullable: true })
19
+ first_name: string | null;
20
+
21
+ @Column({ type: 'varchar', length: 255, nullable: true })
22
+ second_name: string | null;
23
+
24
+ @Column({ type: 'varchar', length: 255, nullable: true })
25
+ third_name: string | null;
26
+
27
+ @Column({ type: 'varchar', length: 255, nullable: true })
28
+ fourth_name: string | null;
29
+
30
+ @Column({ type: 'varchar', length: 255, nullable: true })
31
+ family_name_tribe: string | null;
32
+
33
+ @Column({ type: 'varchar', length: 255, nullable: true })
34
+ previous_name: string | null;
35
+
36
+ // Personal Information
37
+ @Column({ type: 'varchar', length: 100, nullable: true })
38
+ religion: string | null;
39
+
40
+ @Column({ type: 'varchar', length: 100, nullable: true })
41
+ sect: string | null;
42
+
43
+ @Column({ type: 'date', nullable: true })
44
+ date_of_birth: Date | null;
45
+
46
+ @Column({ type: 'varchar', length: 255, nullable: true })
47
+ place_of_birth: string | null;
48
+
49
+ @Column({ type: 'varchar', length: 100, nullable: true })
50
+ nationality: string | null;
51
+
52
+ @Column({ type: 'varchar', length: 50, nullable: true })
53
+ gender: string | null;
54
+
55
+ @Column({ type: 'varchar', length: 50, nullable: true })
56
+ marital_status: string | null;
57
+
58
+ @Column({ type: 'int', nullable: true })
59
+ number_of_dependents: number | null;
60
+
61
+ // Passport Information
62
+ @Column({ type: 'varchar', length: 100, nullable: true })
63
+ passport_number: string | null;
64
+
65
+ @Column({ type: 'varchar', length: 50, nullable: true })
66
+ passport_type: string | null;
67
+
68
+ @Column({ type: 'date', nullable: true })
69
+ issue_date: Date | null; // Passport Issue Date
70
+
71
+ @Column({ type: 'varchar', length: 255, nullable: true })
72
+ place_of_issue: string | null; // Passport Place of Issue
73
+
74
+ @Column({ type: 'date', nullable: true })
75
+ expiry_date: Date | null; // Passport Expiry Date
76
+
77
+ // ID Card Information
78
+ @Column({ type: 'varchar', length: 100, nullable: true })
79
+ id_card_number: string | null;
80
+
81
+ @Column({ type: 'varchar', length: 255, nullable: true })
82
+ id_card_place_of_issue: string | null;
83
+
84
+ @Column({ type: 'date', nullable: true })
85
+ id_card_expiry_date: Date | null;
86
+
87
+ // Address Information
88
+ @Column({ type: 'text', nullable: true })
89
+ permanent_address: string | null;
90
+
91
+ @Column({ type: 'varchar', length: 255, nullable: true })
92
+ governorate_wilaya: string | null;
93
+
94
+ @Column({ type: 'varchar', length: 100, nullable: true })
95
+ po_box: string | null; // P.O. Box
96
+
97
+ @Column({ type: 'varchar', length: 50, nullable: true })
98
+ zip_code: string | null;
99
+
100
+ @Column({ type: 'varchar', length: 100, nullable: true })
101
+ house_number: string | null;
102
+
103
+ @Column({ type: 'varchar', length: 100, nullable: true })
104
+ railway_number: string | null;
105
+
106
+ @Column({ type: 'varchar', length: 255, nullable: true })
107
+ governorate: string | null;
108
+
109
+ @Column({ type: 'varchar', length: 255, nullable: true })
110
+ wilayat: string | null;
111
+
112
+ @Column({ type: 'varchar', length: 255, nullable: true })
113
+ locality: string | null;
114
+
115
+ @Column({ type: 'varchar', length: 100, nullable: true })
116
+ country: string | null;
117
+
118
+ // Contact Information
119
+ @Column({ type: 'varchar', length: 50, nullable: true })
120
+ phone_number: string | null;
121
+
122
+ @Column({ type: 'varchar', length: 50, nullable: true })
123
+ fax_number: string | null;
124
+
125
+ @Column({ type: 'varchar', length: 255, nullable: true })
126
+ email: string | null;
127
+
128
+ @Column({ type: 'varchar', length: 255, nullable: true })
129
+ email_address_personal: string | null; // Email Address (Personal)
130
+
131
+ // Additional Personal Information
132
+ @Column({ type: 'varchar', length: 255, nullable: true })
133
+ sheikh_name: string | null; // Sheikh's Name
134
+
135
+ @Column({ type: 'varchar', length: 500, nullable: true })
136
+ photo: string | null;
137
+ }
@@ -132,6 +132,9 @@ export class User extends BaseModel {
132
132
  @Column({ type: "enum", enum: ["FM", "Embassy"], nullable: false, default: "FM" })
133
133
  category: "FM" | "Embassy"; // Mandatory
134
134
 
135
+ @Column({ type: "int", nullable: true , default: 0})
136
+ mandc_number: number;
137
+
135
138
  constructor(
136
139
  employee_id?: number,
137
140
  employee_name?: string,
@@ -175,6 +178,7 @@ export class User extends BaseModel {
175
178
  children2_name?: string,
176
179
  language_preferences?: string,
177
180
  category?: "FM" | "Embassy",
181
+ mandc_number?: number,
178
182
  ) {
179
183
  super();
180
184
  this.employee_id = employee_id;
@@ -219,5 +223,6 @@ export class User extends BaseModel {
219
223
  this.children2_name = children2_name;
220
224
  this.language_preferences = language_preferences;
221
225
  this.category = category || "FM";
226
+ this.mandc_number = mandc_number || 0;
222
227
  }
223
228
  }
@@ -1,24 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- import { DiplomaticRequests } from "./DiplomaticRequestsModel";
3
- export declare enum DiplomaticApprovalStatus {
4
- PENDING = "Pending",
5
- APPROVED = "Approved",
6
- REJECTED = "Rejected",
7
- IN_PROGRESS = "In Progress"
8
- }
9
- export declare class DiplomaticApprovals extends BaseModel {
10
- diplomatic_request_id: number;
11
- level: number;
12
- approver_user_id: number | null;
13
- approver_role_id: number;
14
- comment: string | null;
15
- approval_status: DiplomaticApprovalStatus;
16
- action_date: Date;
17
- department_id: number | null;
18
- section_id: number | null;
19
- approved_by: number | null;
20
- delegate_user_id: number | null;
21
- is_allowed: boolean;
22
- diplomaticRequest?: DiplomaticRequests;
23
- constructor(diplomatic_request_id: number, level: number, approver_role_id: number, approval_status: DiplomaticApprovalStatus, department_id: number | null, section_id: number | null, approved_by: number | null, delegate_user_id: number | null, is_allowed?: boolean);
24
- }
@@ -1,94 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DiplomaticApprovals = exports.DiplomaticApprovalStatus = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- const DiplomaticRequestsModel_1 = require("./DiplomaticRequestsModel");
16
- var DiplomaticApprovalStatus;
17
- (function (DiplomaticApprovalStatus) {
18
- DiplomaticApprovalStatus["PENDING"] = "Pending";
19
- DiplomaticApprovalStatus["APPROVED"] = "Approved";
20
- DiplomaticApprovalStatus["REJECTED"] = "Rejected";
21
- DiplomaticApprovalStatus["IN_PROGRESS"] = "In Progress";
22
- })(DiplomaticApprovalStatus || (exports.DiplomaticApprovalStatus = DiplomaticApprovalStatus = {}));
23
- let DiplomaticApprovals = class DiplomaticApprovals extends BaseModel_1.BaseModel {
24
- constructor(diplomatic_request_id, level, approver_role_id, approval_status, department_id, section_id, approved_by, delegate_user_id, is_allowed = true) {
25
- super();
26
- this.diplomatic_request_id = diplomatic_request_id;
27
- this.level = level;
28
- this.approver_role_id = approver_role_id;
29
- this.approval_status = approval_status;
30
- this.department_id = department_id;
31
- this.section_id = section_id;
32
- this.approved_by = approved_by;
33
- this.delegate_user_id = delegate_user_id;
34
- this.is_allowed = is_allowed;
35
- }
36
- };
37
- exports.DiplomaticApprovals = DiplomaticApprovals;
38
- __decorate([
39
- (0, typeorm_1.Column)({ type: 'int' }),
40
- __metadata("design:type", Number)
41
- ], DiplomaticApprovals.prototype, "diplomatic_request_id", void 0);
42
- __decorate([
43
- (0, typeorm_1.Column)({ type: 'int' }),
44
- __metadata("design:type", Number)
45
- ], DiplomaticApprovals.prototype, "level", void 0);
46
- __decorate([
47
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
48
- __metadata("design:type", Object)
49
- ], DiplomaticApprovals.prototype, "approver_user_id", void 0);
50
- __decorate([
51
- (0, typeorm_1.Column)({ type: 'int' }),
52
- __metadata("design:type", Number)
53
- ], DiplomaticApprovals.prototype, "approver_role_id", void 0);
54
- __decorate([
55
- (0, typeorm_1.Column)({ type: 'text', nullable: true }),
56
- __metadata("design:type", Object)
57
- ], DiplomaticApprovals.prototype, "comment", void 0);
58
- __decorate([
59
- (0, typeorm_1.Column)({ type: 'enum', enum: DiplomaticApprovalStatus, default: DiplomaticApprovalStatus.PENDING }),
60
- __metadata("design:type", String)
61
- ], DiplomaticApprovals.prototype, "approval_status", void 0);
62
- __decorate([
63
- (0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
64
- __metadata("design:type", Date)
65
- ], DiplomaticApprovals.prototype, "action_date", void 0);
66
- __decorate([
67
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
68
- __metadata("design:type", Object)
69
- ], DiplomaticApprovals.prototype, "department_id", void 0);
70
- __decorate([
71
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
72
- __metadata("design:type", Object)
73
- ], DiplomaticApprovals.prototype, "section_id", void 0);
74
- __decorate([
75
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
76
- __metadata("design:type", Object)
77
- ], DiplomaticApprovals.prototype, "approved_by", void 0);
78
- __decorate([
79
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
80
- __metadata("design:type", Object)
81
- ], DiplomaticApprovals.prototype, "delegate_user_id", void 0);
82
- __decorate([
83
- (0, typeorm_1.Column)({ type: 'boolean', default: true, nullable: false }),
84
- __metadata("design:type", Boolean)
85
- ], DiplomaticApprovals.prototype, "is_allowed", void 0);
86
- __decorate([
87
- (0, typeorm_1.ManyToOne)(() => DiplomaticRequestsModel_1.DiplomaticRequests, dr => dr.approvals),
88
- (0, typeorm_1.JoinColumn)({ name: 'diplomatic_request_id' }),
89
- __metadata("design:type", DiplomaticRequestsModel_1.DiplomaticRequests)
90
- ], DiplomaticApprovals.prototype, "diplomaticRequest", void 0);
91
- exports.DiplomaticApprovals = DiplomaticApprovals = __decorate([
92
- (0, typeorm_1.Entity)({ name: 'diplomatic_approvals' }),
93
- __metadata("design:paramtypes", [Number, Number, Number, String, Object, Object, Object, Object, Boolean])
94
- ], DiplomaticApprovals);
@@ -1,11 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- import { DiplomaticRequests } from "./DiplomaticRequestsModel";
3
- export declare class DiplomaticAttachments extends BaseModel {
4
- diplomatic_request_id: number;
5
- file_url: string;
6
- file_name: string;
7
- file_type: string;
8
- file_size: number | null;
9
- diplomaticRequest?: DiplomaticRequests;
10
- constructor(diplomatic_request_id: number, file_url: string, file_name: string);
11
- }
@@ -1,53 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DiplomaticAttachments = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- const DiplomaticRequestsModel_1 = require("./DiplomaticRequestsModel");
16
- let DiplomaticAttachments = class DiplomaticAttachments extends BaseModel_1.BaseModel {
17
- constructor(diplomatic_request_id, file_url, file_name) {
18
- super();
19
- this.diplomatic_request_id = diplomatic_request_id;
20
- this.file_url = file_url;
21
- this.file_name = file_name;
22
- }
23
- };
24
- exports.DiplomaticAttachments = DiplomaticAttachments;
25
- __decorate([
26
- (0, typeorm_1.Column)({ type: 'int' }),
27
- __metadata("design:type", Number)
28
- ], DiplomaticAttachments.prototype, "diplomatic_request_id", void 0);
29
- __decorate([
30
- (0, typeorm_1.Column)({ type: 'varchar', length: 500 }),
31
- __metadata("design:type", String)
32
- ], DiplomaticAttachments.prototype, "file_url", void 0);
33
- __decorate([
34
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
35
- __metadata("design:type", String)
36
- ], DiplomaticAttachments.prototype, "file_name", void 0);
37
- __decorate([
38
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
39
- __metadata("design:type", String)
40
- ], DiplomaticAttachments.prototype, "file_type", void 0);
41
- __decorate([
42
- (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
43
- __metadata("design:type", Object)
44
- ], DiplomaticAttachments.prototype, "file_size", void 0);
45
- __decorate([
46
- (0, typeorm_1.ManyToOne)(() => DiplomaticRequestsModel_1.DiplomaticRequests, dr => dr.attachments),
47
- (0, typeorm_1.JoinColumn)({ name: 'diplomatic_request_id' }),
48
- __metadata("design:type", DiplomaticRequestsModel_1.DiplomaticRequests)
49
- ], DiplomaticAttachments.prototype, "diplomaticRequest", void 0);
50
- exports.DiplomaticAttachments = DiplomaticAttachments = __decorate([
51
- (0, typeorm_1.Entity)({ name: 'diplomatic_attachments' }),
52
- __metadata("design:paramtypes", [Number, String, String])
53
- ], DiplomaticAttachments);
@@ -1,20 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- import { DiplomaticRequests } from "./DiplomaticRequestsModel";
3
- export declare enum DiplomaticMessageType {
4
- TEXT = "text",
5
- IMAGE = "image",
6
- VIDEO = "video",
7
- FILE = "file",
8
- AUDIO = "audio"
9
- }
10
- export declare class DiplomaticChats extends BaseModel {
11
- diplomatic_request_id: number;
12
- content: string;
13
- sender_user_id: number;
14
- role_id: number | null;
15
- status: string | null;
16
- message_type: DiplomaticMessageType | null;
17
- sender_role_id: number | null;
18
- diplomaticRequest?: DiplomaticRequests;
19
- constructor(diplomatic_request_id: number, content: string, sender_user_id: number, sender_role_id: number);
20
- }
@@ -1,70 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DiplomaticChats = exports.DiplomaticMessageType = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- const DiplomaticRequestsModel_1 = require("./DiplomaticRequestsModel");
16
- var DiplomaticMessageType;
17
- (function (DiplomaticMessageType) {
18
- DiplomaticMessageType["TEXT"] = "text";
19
- DiplomaticMessageType["IMAGE"] = "image";
20
- DiplomaticMessageType["VIDEO"] = "video";
21
- DiplomaticMessageType["FILE"] = "file";
22
- DiplomaticMessageType["AUDIO"] = "audio";
23
- })(DiplomaticMessageType || (exports.DiplomaticMessageType = DiplomaticMessageType = {}));
24
- let DiplomaticChats = class DiplomaticChats extends BaseModel_1.BaseModel {
25
- constructor(diplomatic_request_id, content, sender_user_id, sender_role_id) {
26
- super();
27
- this.diplomatic_request_id = diplomatic_request_id;
28
- this.content = content;
29
- this.sender_user_id = sender_user_id;
30
- this.sender_role_id = sender_role_id;
31
- }
32
- };
33
- exports.DiplomaticChats = DiplomaticChats;
34
- __decorate([
35
- (0, typeorm_1.Column)({ type: 'int' }),
36
- __metadata("design:type", Number)
37
- ], DiplomaticChats.prototype, "diplomatic_request_id", void 0);
38
- __decorate([
39
- (0, typeorm_1.Column)({ type: 'text' }),
40
- __metadata("design:type", String)
41
- ], DiplomaticChats.prototype, "content", void 0);
42
- __decorate([
43
- (0, typeorm_1.Column)({ type: 'int' }),
44
- __metadata("design:type", Number)
45
- ], DiplomaticChats.prototype, "sender_user_id", void 0);
46
- __decorate([
47
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
48
- __metadata("design:type", Object)
49
- ], DiplomaticChats.prototype, "role_id", void 0);
50
- __decorate([
51
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
52
- __metadata("design:type", Object)
53
- ], DiplomaticChats.prototype, "status", void 0);
54
- __decorate([
55
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
56
- __metadata("design:type", Object)
57
- ], DiplomaticChats.prototype, "message_type", void 0);
58
- __decorate([
59
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
60
- __metadata("design:type", Object)
61
- ], DiplomaticChats.prototype, "sender_role_id", void 0);
62
- __decorate([
63
- (0, typeorm_1.ManyToOne)(() => DiplomaticRequestsModel_1.DiplomaticRequests, dr => dr.chats),
64
- (0, typeorm_1.JoinColumn)({ name: 'diplomatic_request_id' }),
65
- __metadata("design:type", DiplomaticRequestsModel_1.DiplomaticRequests)
66
- ], DiplomaticChats.prototype, "diplomaticRequest", void 0);
67
- exports.DiplomaticChats = DiplomaticChats = __decorate([
68
- (0, typeorm_1.Entity)({ name: 'diplomatic_chats' }),
69
- __metadata("design:paramtypes", [Number, String, Number, Number])
70
- ], DiplomaticChats);
@@ -1,16 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare enum DiplomaticClubCardApprovalStatus {
3
- PENDING = "Pending",
4
- APPROVED = "Approved",
5
- REJECTED = "Rejected"
6
- }
7
- export declare class DiplomaticClubCardApprovals extends BaseModel {
8
- request_id: number;
9
- approver_user_id: number;
10
- approver_role_id: number | null;
11
- step_order: number;
12
- status: DiplomaticClubCardApprovalStatus;
13
- comments: string | null;
14
- approved_at: Date | null;
15
- rejected_at: Date | null;
16
- }
@@ -1,58 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DiplomaticClubCardApprovals = exports.DiplomaticClubCardApprovalStatus = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- var DiplomaticClubCardApprovalStatus;
16
- (function (DiplomaticClubCardApprovalStatus) {
17
- DiplomaticClubCardApprovalStatus["PENDING"] = "Pending";
18
- DiplomaticClubCardApprovalStatus["APPROVED"] = "Approved";
19
- DiplomaticClubCardApprovalStatus["REJECTED"] = "Rejected";
20
- })(DiplomaticClubCardApprovalStatus || (exports.DiplomaticClubCardApprovalStatus = DiplomaticClubCardApprovalStatus = {}));
21
- let DiplomaticClubCardApprovals = class DiplomaticClubCardApprovals extends BaseModel_1.BaseModel {
22
- };
23
- exports.DiplomaticClubCardApprovals = DiplomaticClubCardApprovals;
24
- __decorate([
25
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
26
- __metadata("design:type", Number)
27
- ], DiplomaticClubCardApprovals.prototype, "request_id", void 0);
28
- __decorate([
29
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
30
- __metadata("design:type", Number)
31
- ], DiplomaticClubCardApprovals.prototype, "approver_user_id", void 0);
32
- __decorate([
33
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
34
- __metadata("design:type", Object)
35
- ], DiplomaticClubCardApprovals.prototype, "approver_role_id", void 0);
36
- __decorate([
37
- (0, typeorm_1.Column)({ type: 'int', nullable: false, default: 0 }),
38
- __metadata("design:type", Number)
39
- ], DiplomaticClubCardApprovals.prototype, "step_order", void 0);
40
- __decorate([
41
- (0, typeorm_1.Column)({ type: 'enum', enum: DiplomaticClubCardApprovalStatus, default: DiplomaticClubCardApprovalStatus.PENDING, nullable: false }),
42
- __metadata("design:type", String)
43
- ], DiplomaticClubCardApprovals.prototype, "status", void 0);
44
- __decorate([
45
- (0, typeorm_1.Column)({ type: 'text', nullable: true }),
46
- __metadata("design:type", Object)
47
- ], DiplomaticClubCardApprovals.prototype, "comments", void 0);
48
- __decorate([
49
- (0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
50
- __metadata("design:type", Object)
51
- ], DiplomaticClubCardApprovals.prototype, "approved_at", void 0);
52
- __decorate([
53
- (0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
54
- __metadata("design:type", Object)
55
- ], DiplomaticClubCardApprovals.prototype, "rejected_at", void 0);
56
- exports.DiplomaticClubCardApprovals = DiplomaticClubCardApprovals = __decorate([
57
- (0, typeorm_1.Entity)({ name: 'diplomatic_club_card_approvals' })
58
- ], DiplomaticClubCardApprovals);
@@ -1,9 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class DiplomaticClubCardAttachments extends BaseModel {
3
- request_id: number;
4
- member_id: number | null;
5
- file_name: string;
6
- file_path: string;
7
- file_type: string | null;
8
- attachment_type: string | null;
9
- }
@@ -1,44 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DiplomaticClubCardAttachments = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- let DiplomaticClubCardAttachments = class DiplomaticClubCardAttachments extends BaseModel_1.BaseModel {
16
- };
17
- exports.DiplomaticClubCardAttachments = DiplomaticClubCardAttachments;
18
- __decorate([
19
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
20
- __metadata("design:type", Number)
21
- ], DiplomaticClubCardAttachments.prototype, "request_id", void 0);
22
- __decorate([
23
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
24
- __metadata("design:type", Object)
25
- ], DiplomaticClubCardAttachments.prototype, "member_id", void 0);
26
- __decorate([
27
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
28
- __metadata("design:type", String)
29
- ], DiplomaticClubCardAttachments.prototype, "file_name", void 0);
30
- __decorate([
31
- (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
32
- __metadata("design:type", String)
33
- ], DiplomaticClubCardAttachments.prototype, "file_path", void 0);
34
- __decorate([
35
- (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
36
- __metadata("design:type", Object)
37
- ], DiplomaticClubCardAttachments.prototype, "file_type", void 0);
38
- __decorate([
39
- (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
40
- __metadata("design:type", Object)
41
- ], DiplomaticClubCardAttachments.prototype, "attachment_type", void 0);
42
- exports.DiplomaticClubCardAttachments = DiplomaticClubCardAttachments = __decorate([
43
- (0, typeorm_1.Entity)({ name: 'diplomatic_club_card_attachments' })
44
- ], DiplomaticClubCardAttachments);
@@ -1,7 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class DiplomaticClubCardChat extends BaseModel {
3
- request_id: number;
4
- user_id: number;
5
- message: string;
6
- message_type: string | null;
7
- }
@@ -1,13 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class DiplomaticClubCardMembers extends BaseModel {
3
- request_id: number;
4
- member_name: string;
5
- relation: string | null;
6
- membership_id: string | null;
7
- title: string | null;
8
- diplomatic_title_id: number | null;
9
- organization: string | null;
10
- expiry_date: Date | null;
11
- photo: string | null;
12
- subscription_amount: number | null;
13
- }
@@ -1,60 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DiplomaticClubCardMembers = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- let DiplomaticClubCardMembers = class DiplomaticClubCardMembers extends BaseModel_1.BaseModel {
16
- };
17
- exports.DiplomaticClubCardMembers = DiplomaticClubCardMembers;
18
- __decorate([
19
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
20
- __metadata("design:type", Number)
21
- ], DiplomaticClubCardMembers.prototype, "request_id", void 0);
22
- __decorate([
23
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
24
- __metadata("design:type", String)
25
- ], DiplomaticClubCardMembers.prototype, "member_name", void 0);
26
- __decorate([
27
- (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
28
- __metadata("design:type", Object)
29
- ], DiplomaticClubCardMembers.prototype, "relation", void 0);
30
- __decorate([
31
- (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
32
- __metadata("design:type", Object)
33
- ], DiplomaticClubCardMembers.prototype, "membership_id", void 0);
34
- __decorate([
35
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
36
- __metadata("design:type", Object)
37
- ], DiplomaticClubCardMembers.prototype, "title", void 0);
38
- __decorate([
39
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
40
- __metadata("design:type", Object)
41
- ], DiplomaticClubCardMembers.prototype, "diplomatic_title_id", void 0);
42
- __decorate([
43
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
44
- __metadata("design:type", Object)
45
- ], DiplomaticClubCardMembers.prototype, "organization", void 0);
46
- __decorate([
47
- (0, typeorm_1.Column)({ type: 'date', nullable: true }),
48
- __metadata("design:type", Object)
49
- ], DiplomaticClubCardMembers.prototype, "expiry_date", void 0);
50
- __decorate([
51
- (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
52
- __metadata("design:type", Object)
53
- ], DiplomaticClubCardMembers.prototype, "photo", void 0);
54
- __decorate([
55
- (0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: true }),
56
- __metadata("design:type", Object)
57
- ], DiplomaticClubCardMembers.prototype, "subscription_amount", void 0);
58
- exports.DiplomaticClubCardMembers = DiplomaticClubCardMembers = __decorate([
59
- (0, typeorm_1.Entity)({ name: 'diplomatic_club_card_members' })
60
- ], DiplomaticClubCardMembers);