@platform-modules/foreign-ministry 1.1.80 → 1.1.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data-source.js +33 -15
- package/dist/index.d.ts +25 -7
- package/dist/index.js +40 -7
- package/dist/models/DiplomaticTitlesMasterModel.d.ts +3 -7
- package/dist/models/DiplomaticTitlesMasterModel.js +9 -16
- package/dist/models/EarlyCheckoutBalanceModel.d.ts +7 -0
- package/dist/models/{DiplomaticClubCardChatModel.js → EarlyCheckoutBalanceModel.js} +21 -18
- package/dist/models/EarlyCheckoutConfigModel.d.ts +18 -0
- package/dist/models/EarlyCheckoutConfigModel.js +80 -0
- package/dist/models/EarlyCheckoutTransactionModel.d.ts +19 -0
- package/dist/models/EarlyCheckoutTransactionModel.js +66 -0
- package/dist/models/FinancialApprovalsModel.d.ts +1 -0
- package/dist/models/FinancialApprovalsModel.js +4 -0
- package/dist/models/FinancialGradeModel.d.ts +4 -3
- package/dist/models/FinancialGradeModel.js +12 -7
- package/dist/models/GeneralServiceApprovalsModel.d.ts +4 -1
- package/dist/models/GeneralServiceApprovalsModel.js +9 -0
- package/dist/models/LeaveApprovalsModel.d.ts +2 -1
- package/dist/models/LeaveApprovalsModel.js +7 -2
- package/dist/models/LeaveBalanceModel.d.ts +8 -0
- package/dist/models/{PassportRequestChatModel.js → LeaveBalanceModel.js} +23 -23
- package/dist/models/LeaveConfigGradesModel.d.ts +19 -0
- package/dist/models/LeaveConfigGradesModel.js +100 -0
- package/dist/models/LeaveConfigModel.d.ts +20 -0
- package/dist/models/LeaveConfigModel.js +90 -0
- package/dist/models/LeaveTransactionModel.d.ts +20 -0
- package/dist/models/LeaveTransactionModel.js +71 -0
- package/dist/models/LeaveTypesModel.d.ts +7 -1
- package/dist/models/LeaveTypesModel.js +20 -5
- package/dist/models/M&CMasterModel.d.ts +9 -0
- package/dist/models/M&CMasterModel.js +49 -0
- package/dist/models/ProfileUpdateRequestsModel.d.ts +106 -0
- package/dist/models/ProfileUpdateRequestsModel.js +409 -0
- package/dist/models/StationeryMaterialMasterModel.d.ts +11 -0
- package/dist/models/StationeryMaterialMasterModel.js +56 -0
- package/dist/models/StationeryRequestsModel.d.ts +27 -0
- package/dist/models/StationeryRequestsModel.js +93 -0
- package/dist/models/StayAfterHoursBalanceModel.d.ts +7 -0
- package/dist/models/StayAfterHoursBalanceModel.js +39 -0
- package/dist/models/StayAfterHoursTransactionModel.d.ts +19 -0
- package/dist/models/StayAfterHoursTransactionModel.js +66 -0
- package/dist/models/TelephoneDirectoryModel.d.ts +3 -2
- package/dist/models/TelephoneDirectoryModel.js +11 -6
- package/dist/models/TransferMissionApprovalModel.d.ts +1 -0
- package/dist/models/TransferMissionApprovalModel.js +4 -0
- package/dist/models/UpdateAttendanceApprovalModel.d.ts +1 -0
- package/dist/models/UpdateAttendanceApprovalModel.js +4 -0
- package/dist/models/UserEducationDetailsModel.d.ts +12 -0
- package/dist/models/UserEducationDetailsModel.js +44 -0
- package/dist/models/UserEmploymentDetailsModel.d.ts +50 -0
- package/dist/models/UserEmploymentDetailsModel.js +193 -0
- package/dist/models/UserPersonalDetailsModel.d.ts +48 -0
- package/dist/models/UserPersonalDetailsModel.js +185 -0
- package/dist/models/user.d.ts +2 -1
- package/dist/models/user.js +7 -2
- package/package.json +1 -1
- package/src/data-source.ts +37 -17
- package/src/index.ts +25 -7
- package/src/models/DiplomaticTitlesMasterModel.ts +9 -20
- package/src/models/EarlyCheckoutBalanceModel.ts +22 -0
- package/src/models/EarlyCheckoutConfigModel.ts +57 -0
- package/src/models/EarlyCheckoutTransactionModel.ts +53 -0
- package/src/models/FinancialApprovalsModel.ts +4 -0
- package/src/models/FinancialGradeModel.ts +13 -8
- package/src/models/GeneralServiceApprovalsModel.ts +10 -1
- package/src/models/LeaveApprovalsModel.ts +5 -1
- package/src/models/LeaveBalanceModel.ts +26 -0
- package/src/models/LeaveConfigGradesModel.Ts +72 -0
- package/src/models/LeaveConfigModel.ts +64 -0
- package/src/models/LeaveTransactionModel.ts +58 -0
- package/src/models/LeaveTypesModel.ts +27 -11
- package/src/models/M&CMasterModel.ts +37 -0
- package/src/models/ProfileUpdateRequestsModel.ts +317 -0
- package/src/models/StationeryMaterialMasterModel.ts +35 -0
- package/src/models/StationeryRequestsModel.ts +65 -0
- package/src/models/StayAfterHoursBalanceModel.ts +22 -0
- package/src/models/StayAfterHoursTransactionModel.ts +53 -0
- package/src/models/TelephoneDirectoryModel.ts +8 -4
- package/src/models/TransferMissionApprovalModel.ts +3 -0
- package/src/models/TransferMissionRequestModel.ts +1 -0
- package/src/models/UpdateAttendanceApprovalModel.ts +3 -0
- package/src/models/UserEducationDetailsModel.ts +26 -0
- package/src/models/UserEmploymentDetailsModel.ts +141 -0
- package/src/models/UserPersonalDetailsModel.ts +137 -0
- package/src/models/user.ts +5 -0
- package/dist/models/DiplomaticApprovalsModel.d.ts +0 -24
- package/dist/models/DiplomaticApprovalsModel.js +0 -94
- package/dist/models/DiplomaticAttachmentsModel.d.ts +0 -11
- package/dist/models/DiplomaticAttachmentsModel.js +0 -53
- package/dist/models/DiplomaticChatsModel.d.ts +0 -20
- package/dist/models/DiplomaticChatsModel.js +0 -70
- package/dist/models/DiplomaticClubCardApprovalModel.d.ts +0 -16
- package/dist/models/DiplomaticClubCardApprovalModel.js +0 -58
- package/dist/models/DiplomaticClubCardAttachmentModel.d.ts +0 -9
- package/dist/models/DiplomaticClubCardAttachmentModel.js +0 -44
- package/dist/models/DiplomaticClubCardChatModel.d.ts +0 -7
- package/dist/models/DiplomaticClubCardMemberModel.d.ts +0 -13
- package/dist/models/DiplomaticClubCardMemberModel.js +0 -60
- package/dist/models/DiplomaticClubCardMembersModel.d.ts +0 -26
- package/dist/models/DiplomaticClubCardMembersModel.js +0 -85
- package/dist/models/DiplomaticClubCardRequestModel.d.ts +0 -33
- package/dist/models/DiplomaticClubCardRequestModel.js +0 -98
- package/dist/models/DiplomaticClubCardWorkFlowModel.d.ts +0 -12
- package/dist/models/DiplomaticClubCardWorkFlowModel.js +0 -42
- package/dist/models/DiplomaticClubSubscriptionMasterModel.d.ts +0 -12
- package/dist/models/DiplomaticClubSubscriptionMasterModel.js +0 -64
- package/dist/models/DiplomaticRequestsModel.d.ts +0 -54
- package/dist/models/DiplomaticRequestsModel.js +0 -186
- package/dist/models/DiplomaticServiceDetailsModel.d.ts +0 -20
- package/dist/models/DiplomaticServiceDetailsModel.js +0 -65
- package/dist/models/DiplomaticSettingsModel.d.ts +0 -11
- package/dist/models/DiplomaticSettingsModel.js +0 -59
- package/dist/models/DiplomaticTitleModel.d.ts +0 -12
- package/dist/models/DiplomaticTitleModel.js +0 -45
- package/dist/models/DiplomaticWorkFlowModel.d.ts +0 -18
- package/dist/models/DiplomaticWorkFlowModel.js +0 -69
- package/dist/models/PassportRequestApprovalModel.d.ts +0 -22
- package/dist/models/PassportRequestApprovalModel.js +0 -91
- package/dist/models/PassportRequestAttachmentModel.d.ts +0 -10
- package/dist/models/PassportRequestAttachmentModel.js +0 -54
- package/dist/models/PassportRequestChatModel.d.ts +0 -8
- package/dist/models/PassportRequestDependentModel.d.ts +0 -20
- package/dist/models/PassportRequestDependentModel.js +0 -85
- package/dist/models/PassportRequestModel.d.ts +0 -40
- package/dist/models/PassportRequestModel.js +0 -128
- package/dist/models/PassportRequestWorkFlowModel.d.ts +0 -15
- package/dist/models/PassportRequestWorkFlowModel.js +0 -60
- package/dist/models/SubscriptionAmountModel.d.ts +0 -67
- package/dist/models/SubscriptionAmountModel.js +0 -114
- package/src/models/DiplomaticApprovalsModel.ts +0 -77
- package/src/models/DiplomaticAttachmentsModel.ts +0 -37
- package/src/models/DiplomaticChatsModel.ts +0 -53
- package/src/models/DiplomaticClubCardMembersModel.ts +0 -71
- package/src/models/DiplomaticClubSubscriptionMasterModel.ts +0 -50
- package/src/models/DiplomaticRequestsModel.ts +0 -154
- package/src/models/DiplomaticWorkFlowModel.ts +0 -53
|
@@ -0,0 +1,185 @@
|
|
|
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.UserPersonalDetails = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
/**
|
|
16
|
+
* User Personal Details - only fields from business requirements
|
|
17
|
+
* Linked by user_id (not request_id)
|
|
18
|
+
* When profile update is approved, data from this table updates users table
|
|
19
|
+
*/
|
|
20
|
+
let UserPersonalDetails = class UserPersonalDetails extends BaseModel_1.BaseModel {
|
|
21
|
+
};
|
|
22
|
+
exports.UserPersonalDetails = UserPersonalDetails;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], UserPersonalDetails.prototype, "user_id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
|
+
], UserPersonalDetails.prototype, "title", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], UserPersonalDetails.prototype, "first_name", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], UserPersonalDetails.prototype, "second_name", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], UserPersonalDetails.prototype, "third_name", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], UserPersonalDetails.prototype, "fourth_name", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], UserPersonalDetails.prototype, "family_name_tribe", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], UserPersonalDetails.prototype, "previous_name", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
57
|
+
__metadata("design:type", Object)
|
|
58
|
+
], UserPersonalDetails.prototype, "religion", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], UserPersonalDetails.prototype, "sect", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], UserPersonalDetails.prototype, "date_of_birth", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
69
|
+
__metadata("design:type", Object)
|
|
70
|
+
], UserPersonalDetails.prototype, "place_of_birth", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], UserPersonalDetails.prototype, "nationality", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], UserPersonalDetails.prototype, "gender", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
81
|
+
__metadata("design:type", Object)
|
|
82
|
+
], UserPersonalDetails.prototype, "marital_status", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
85
|
+
__metadata("design:type", Object)
|
|
86
|
+
], UserPersonalDetails.prototype, "number_of_dependents", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
89
|
+
__metadata("design:type", Object)
|
|
90
|
+
], UserPersonalDetails.prototype, "passport_number", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
93
|
+
__metadata("design:type", Object)
|
|
94
|
+
], UserPersonalDetails.prototype, "passport_type", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
97
|
+
__metadata("design:type", Object)
|
|
98
|
+
], UserPersonalDetails.prototype, "issue_date", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
101
|
+
__metadata("design:type", Object)
|
|
102
|
+
], UserPersonalDetails.prototype, "place_of_issue", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
105
|
+
__metadata("design:type", Object)
|
|
106
|
+
], UserPersonalDetails.prototype, "expiry_date", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
109
|
+
__metadata("design:type", Object)
|
|
110
|
+
], UserPersonalDetails.prototype, "id_card_number", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
113
|
+
__metadata("design:type", Object)
|
|
114
|
+
], UserPersonalDetails.prototype, "id_card_place_of_issue", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
117
|
+
__metadata("design:type", Object)
|
|
118
|
+
], UserPersonalDetails.prototype, "id_card_expiry_date", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
121
|
+
__metadata("design:type", Object)
|
|
122
|
+
], UserPersonalDetails.prototype, "permanent_address", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
125
|
+
__metadata("design:type", Object)
|
|
126
|
+
], UserPersonalDetails.prototype, "governorate_wilaya", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
129
|
+
__metadata("design:type", Object)
|
|
130
|
+
], UserPersonalDetails.prototype, "po_box", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
133
|
+
__metadata("design:type", Object)
|
|
134
|
+
], UserPersonalDetails.prototype, "zip_code", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
137
|
+
__metadata("design:type", Object)
|
|
138
|
+
], UserPersonalDetails.prototype, "house_number", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
141
|
+
__metadata("design:type", Object)
|
|
142
|
+
], UserPersonalDetails.prototype, "railway_number", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
145
|
+
__metadata("design:type", Object)
|
|
146
|
+
], UserPersonalDetails.prototype, "governorate", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
149
|
+
__metadata("design:type", Object)
|
|
150
|
+
], UserPersonalDetails.prototype, "wilayat", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
153
|
+
__metadata("design:type", Object)
|
|
154
|
+
], UserPersonalDetails.prototype, "locality", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
157
|
+
__metadata("design:type", Object)
|
|
158
|
+
], UserPersonalDetails.prototype, "country", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
161
|
+
__metadata("design:type", Object)
|
|
162
|
+
], UserPersonalDetails.prototype, "phone_number", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
165
|
+
__metadata("design:type", Object)
|
|
166
|
+
], UserPersonalDetails.prototype, "fax_number", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
169
|
+
__metadata("design:type", Object)
|
|
170
|
+
], UserPersonalDetails.prototype, "email", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
173
|
+
__metadata("design:type", Object)
|
|
174
|
+
], UserPersonalDetails.prototype, "email_address_personal", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
177
|
+
__metadata("design:type", Object)
|
|
178
|
+
], UserPersonalDetails.prototype, "sheikh_name", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
181
|
+
__metadata("design:type", Object)
|
|
182
|
+
], UserPersonalDetails.prototype, "photo", void 0);
|
|
183
|
+
exports.UserPersonalDetails = UserPersonalDetails = __decorate([
|
|
184
|
+
(0, typeorm_1.Entity)({ name: 'user_personal_details' })
|
|
185
|
+
], UserPersonalDetails);
|
package/dist/models/user.d.ts
CHANGED
|
@@ -42,5 +42,6 @@ export declare class User extends BaseModel {
|
|
|
42
42
|
children2_name?: string;
|
|
43
43
|
language_preferences?: string;
|
|
44
44
|
category: "FM" | "Embassy";
|
|
45
|
-
|
|
45
|
+
mandc_number: number;
|
|
46
|
+
constructor(employee_id?: number, employee_name?: string, employee_arabic_name?: string, date_of_birth?: string, region_of_birth?: string, country_of_birth?: string, date_of_joining?: string, last_promotion_date?: string, gender?: string, marital_status?: string, nationality?: string, email?: string, blood_group?: string, national_id?: number, mobile?: string, office_number?: string, department?: number, section?: number, grade?: number, location?: string, country?: string, is_admin?: boolean, division?: number, reporting_to?: number, address?: string, residential_status?: string, religion?: string, designation?: number, avatar?: string, passport_number?: string, personal_email?: string, extension_number?: number, fax_number?: string, diplomatic_name?: string, civil_employee_id?: number, qualification?: string, father_name?: string, spouse_name?: string, children1_name?: string, children2_name?: string, language_preferences?: string, category?: "FM" | "Embassy", mandc_number?: number);
|
|
46
47
|
}
|
package/dist/models/user.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.User = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
let User = class User extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(employee_id, employee_name, employee_arabic_name, date_of_birth, region_of_birth, country_of_birth, date_of_joining, last_promotion_date, gender, marital_status, nationality, email, blood_group, national_id, mobile, office_number, department, section, grade, location, country, is_admin, division, reporting_to, address, residential_status, religion, designation, avatar, passport_number, personal_email, extension_number, fax_number, diplomatic_name, civil_employee_id, qualification, father_name, spouse_name, children1_name, children2_name, language_preferences, category) {
|
|
16
|
+
constructor(employee_id, employee_name, employee_arabic_name, date_of_birth, region_of_birth, country_of_birth, date_of_joining, last_promotion_date, gender, marital_status, nationality, email, blood_group, national_id, mobile, office_number, department, section, grade, location, country, is_admin, division, reporting_to, address, residential_status, religion, designation, avatar, passport_number, personal_email, extension_number, fax_number, diplomatic_name, civil_employee_id, qualification, father_name, spouse_name, children1_name, children2_name, language_preferences, category, mandc_number) {
|
|
17
17
|
super();
|
|
18
18
|
this.employee_id = employee_id;
|
|
19
19
|
this.employee_name = employee_name;
|
|
@@ -57,6 +57,7 @@ let User = class User extends BaseModel_1.BaseModel {
|
|
|
57
57
|
this.children2_name = children2_name;
|
|
58
58
|
this.language_preferences = language_preferences;
|
|
59
59
|
this.category = category || "FM";
|
|
60
|
+
this.mandc_number = mandc_number || 0;
|
|
60
61
|
}
|
|
61
62
|
};
|
|
62
63
|
exports.User = User;
|
|
@@ -228,7 +229,11 @@ __decorate([
|
|
|
228
229
|
(0, typeorm_1.Column)({ type: "enum", enum: ["FM", "Embassy"], nullable: false, default: "FM" }),
|
|
229
230
|
__metadata("design:type", String)
|
|
230
231
|
], User.prototype, "category", void 0);
|
|
232
|
+
__decorate([
|
|
233
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true, default: 0 }),
|
|
234
|
+
__metadata("design:type", Number)
|
|
235
|
+
], User.prototype, "mandc_number", void 0);
|
|
231
236
|
exports.User = User = __decorate([
|
|
232
237
|
(0, typeorm_1.Entity)({ name: 'users' }),
|
|
233
|
-
__metadata("design:paramtypes", [Number, String, String, String, String, String, String, String, String, String, String, String, String, Number, String, String, Number, Number, Number, String, String, Boolean, Number, Number, String, String, String, Number, String, String, String, Number, String, String, Number, String, String, String, String, String, String, String])
|
|
238
|
+
__metadata("design:paramtypes", [Number, String, String, String, String, String, String, String, String, String, String, String, String, Number, String, String, Number, Number, Number, String, String, Boolean, Number, Number, String, String, String, Number, String, String, String, Number, String, String, Number, String, String, String, String, String, String, String, Number])
|
|
234
239
|
], User);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -105,15 +105,26 @@ import { GroupNames } from './models/GroupNamesModel';
|
|
|
105
105
|
import { Group } from './models/GroupModel';
|
|
106
106
|
import { WorkSchedule } from './models/WorkScheduleModel';
|
|
107
107
|
import { Jobs } from './models/JobsModel';
|
|
108
|
-
import { TelephoneDirectory } from './models/TelephoneDirectoryModel'
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
108
|
+
import { TelephoneDirectory } from './models/TelephoneDirectoryModel'
|
|
109
|
+
import { MandCMaster } from './models/M&CMasterModel'
|
|
110
|
+
import { LeaveBalance } from './models/LeaveBalanceModel'
|
|
111
|
+
import { LeaveConfiguration } from './models/LeaveConfigModel'
|
|
112
|
+
import { LeaveConfigurationGrades } from './models/LeaveConfigGradesModel'
|
|
113
|
+
import { LeaveTransaction } from './models/LeaveTransactionModel'
|
|
114
|
+
import { EarlyCheckoutBalance } from './models/EarlyCheckoutBalanceModel'
|
|
115
|
+
import { EarlyCheckoutConfiguration } from './models/EarlyCheckoutConfigModel'
|
|
116
|
+
import { EarlyCheckoutTransaction } from './models/EarlyCheckoutTransactionModel'
|
|
117
|
+
import { StayAfterHoursBalance } from './models/StayAfterHoursBalanceModel'
|
|
118
|
+
import { StayAfterHoursTransaction } from './models/StayAfterHoursTransactionModel'
|
|
119
|
+
import {StationeryRequests} from './models/StationeryRequestsModel'
|
|
120
|
+
import {StationeryMaterialMaster} from './models/StationeryMaterialMasterModel'
|
|
121
|
+
import { ProfileUpdateRequests } from './models/ProfileUpdateRequestsModel'
|
|
122
|
+
import { UserPersonalDetails } from './models/UserPersonalDetailsModel'
|
|
123
|
+
import { UserEmploymentDetails } from './models/UserEmploymentDetailsModel'
|
|
124
|
+
import { UserEducationDetails } from './models/UserEducationDetailsModel'
|
|
125
|
+
import { DiplomaticTitlesMaster } from './models/DiplomaticTitlesMasterModel'
|
|
126
|
+
|
|
127
|
+
|
|
117
128
|
export const AppDataSource = new DataSource({
|
|
118
129
|
type: 'postgres',
|
|
119
130
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -220,13 +231,22 @@ export const AppDataSource = new DataSource({
|
|
|
220
231
|
WorkSchedule,
|
|
221
232
|
Jobs,
|
|
222
233
|
TelephoneDirectory,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
234
|
+
MandCMaster,
|
|
235
|
+
LeaveBalance,
|
|
236
|
+
LeaveConfiguration,
|
|
237
|
+
LeaveConfigurationGrades,
|
|
238
|
+
LeaveTransaction,
|
|
239
|
+
EarlyCheckoutBalance,
|
|
240
|
+
EarlyCheckoutConfiguration,
|
|
241
|
+
EarlyCheckoutTransaction,
|
|
242
|
+
StayAfterHoursBalance,
|
|
243
|
+
StayAfterHoursTransaction,
|
|
244
|
+
StationeryRequests,
|
|
245
|
+
StationeryMaterialMaster,
|
|
246
|
+
ProfileUpdateRequests,
|
|
247
|
+
UserPersonalDetails,
|
|
248
|
+
UserEmploymentDetails,
|
|
249
|
+
UserEducationDetails,
|
|
250
|
+
DiplomaticTitlesMaster
|
|
231
251
|
],
|
|
232
252
|
});
|
package/src/index.ts
CHANGED
|
@@ -100,12 +100,30 @@ export * from './models/GroupNamesModel';
|
|
|
100
100
|
export * from './models/GroupModel';
|
|
101
101
|
export * from './models/WorkScheduleModel';
|
|
102
102
|
export * from './models/JobsModel';
|
|
103
|
+
export * from './models/M&CMasterModel';
|
|
104
|
+
export * from './models/LeaveBalanceModel';
|
|
105
|
+
export * from './models/LeaveConfigModel';
|
|
106
|
+
export { LeaveConfiguration, enumFrequency } from './models/LeaveConfigModel';
|
|
107
|
+
export * from './models/LeaveConfigGradesModel';
|
|
108
|
+
export { LeaveConfigurationGrades } from './models/LeaveConfigGradesModel';
|
|
109
|
+
export * from './models/LeaveTransactionModel';
|
|
110
|
+
export { LeaveTransaction, LeaveTransactionStatus } from './models/LeaveTransactionModel';
|
|
111
|
+
export * from './models/EarlyCheckoutBalanceModel';
|
|
112
|
+
export { EarlyCheckoutBalance } from './models/EarlyCheckoutBalanceModel';
|
|
113
|
+
export * from './models/EarlyCheckoutConfigModel';
|
|
114
|
+
export { EarlyCheckoutConfiguration, EarlyCheckoutFrequency } from './models/EarlyCheckoutConfigModel';
|
|
115
|
+
export * from './models/EarlyCheckoutTransactionModel';
|
|
116
|
+
export { EarlyCheckoutTransaction, EarlyCheckoutTransactionStatus } from './models/EarlyCheckoutTransactionModel';
|
|
117
|
+
export * from './models/StayAfterHoursBalanceModel';
|
|
118
|
+
export { StayAfterHoursBalance } from './models/StayAfterHoursBalanceModel';
|
|
119
|
+
export * from './models/StayAfterHoursTransactionModel';
|
|
120
|
+
export { StayAfterHoursTransaction, StayAfterHoursTransactionStatus } from './models/StayAfterHoursTransactionModel';
|
|
103
121
|
export * from './models/TelephoneDirectoryModel';
|
|
104
|
-
export * from './models/
|
|
105
|
-
export * from './models/
|
|
106
|
-
export * from './models/
|
|
107
|
-
export * from './models/
|
|
108
|
-
export * from './models/
|
|
109
|
-
export * from './models/
|
|
122
|
+
export * from './models/StationeryRequestsModel';
|
|
123
|
+
export * from './models/StationeryMaterialMasterModel';
|
|
124
|
+
export * from './models/ProfileUpdateRequestsModel';
|
|
125
|
+
export * from './models/UserPersonalDetailsModel';
|
|
126
|
+
export * from './models/UserEmploymentDetailsModel';
|
|
127
|
+
export * from './models/UserEducationDetailsModel';
|
|
128
|
+
export { ProfileUpdateRequestStatus } from './models/ProfileUpdateRequestsModel';
|
|
110
129
|
export * from './models/DiplomaticTitlesMasterModel';
|
|
111
|
-
export * from './models/DiplomaticClubSubscriptionMasterModel';
|
|
@@ -1,37 +1,26 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
-
export enum TitleCategory {
|
|
5
|
-
EMPLOYEE = "Employee",
|
|
6
|
-
NON_EMPLOYEE = "Non Employee"
|
|
7
|
-
}
|
|
8
|
-
|
|
9
4
|
@Entity({ name: 'diplomatic_titles_master' })
|
|
10
5
|
export class DiplomaticTitlesMaster extends BaseModel {
|
|
11
|
-
@Column({ type: 'varchar', length: 255 })
|
|
12
|
-
|
|
6
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
7
|
+
title: string; // Diplomatic title name
|
|
13
8
|
|
|
14
|
-
@Column({ type: '
|
|
15
|
-
|
|
9
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
10
|
+
title_in_arabic: string | null; // Arabic translation
|
|
16
11
|
|
|
17
12
|
@Column({ type: 'text', nullable: true })
|
|
18
|
-
description: string | null;
|
|
13
|
+
description: string | null; // Description of the title
|
|
19
14
|
|
|
20
15
|
@Column({ type: 'boolean', default: true })
|
|
21
|
-
is_active: boolean;
|
|
16
|
+
is_active: boolean; // Whether the title is active
|
|
22
17
|
|
|
23
18
|
@Column({ type: 'int', default: 0 })
|
|
24
|
-
display_order: number;
|
|
19
|
+
display_order: number; // Order for display in dropdowns
|
|
25
20
|
|
|
26
|
-
constructor(
|
|
27
|
-
title_name: string,
|
|
28
|
-
category: TitleCategory,
|
|
29
|
-
description?: string | null
|
|
30
|
-
) {
|
|
21
|
+
constructor(title: string) {
|
|
31
22
|
super();
|
|
32
|
-
this.
|
|
33
|
-
this.category = category;
|
|
34
|
-
this.description = description || null;
|
|
23
|
+
this.title = title;
|
|
35
24
|
this.is_active = true;
|
|
36
25
|
this.display_order = 0;
|
|
37
26
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'early_checkout_balance' })
|
|
5
|
+
export class EarlyCheckoutBalance extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ nullable: true })
|
|
8
|
+
user_id: string;
|
|
9
|
+
|
|
10
|
+
@Column({ nullable: true })
|
|
11
|
+
balance: number;
|
|
12
|
+
|
|
13
|
+
@Column({ nullable: true })
|
|
14
|
+
total_balance: number;
|
|
15
|
+
|
|
16
|
+
constructor(user_id: string, balance: number, total_balance: number) {
|
|
17
|
+
super();
|
|
18
|
+
this.user_id = user_id;
|
|
19
|
+
this.balance = balance;
|
|
20
|
+
this.total_balance = total_balance;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum EarlyCheckoutFrequency {
|
|
5
|
+
Monthly = 'Monthly',
|
|
6
|
+
Yearly = 'Yearly',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//This model is used to store the Early Checkout Configuration on the Admin Side
|
|
10
|
+
@Entity({ name: 'early_checkout_configuration' })
|
|
11
|
+
export class EarlyCheckoutConfiguration extends BaseModel {
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'varchar', nullable: true })
|
|
14
|
+
category: string;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'int', nullable: true })
|
|
17
|
+
MandC_id: number;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'varchar', nullable: true })
|
|
20
|
+
frequency: EarlyCheckoutFrequency;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', nullable: true })
|
|
23
|
+
region: string;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'varchar', nullable: true })
|
|
26
|
+
country: string;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'varchar', nullable: true })
|
|
29
|
+
location: string;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'varchar', nullable: true })
|
|
32
|
+
no_of_hours: string;
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'date', nullable: true })
|
|
36
|
+
from_date: Date;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'date', nullable: true })
|
|
39
|
+
to_date: Date;
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'varchar', nullable: true })
|
|
42
|
+
reason: string;
|
|
43
|
+
|
|
44
|
+
constructor(category: string, MandC_id: number, frequency: EarlyCheckoutFrequency, region: string, country: string, location: string, no_of_hours: string, from_date: Date, to_date: Date, reason: string) {
|
|
45
|
+
super();
|
|
46
|
+
this.category = category;
|
|
47
|
+
this.MandC_id = MandC_id;
|
|
48
|
+
this.no_of_hours = no_of_hours;
|
|
49
|
+
this.frequency = frequency;
|
|
50
|
+
this.region = region;
|
|
51
|
+
this.country = country;
|
|
52
|
+
this.location = location;
|
|
53
|
+
this.from_date = from_date;
|
|
54
|
+
this.to_date = to_date;
|
|
55
|
+
this.reason = reason;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum EarlyCheckoutTransactionStatus {
|
|
5
|
+
GRANTED = 'GRANTED',
|
|
6
|
+
TAKEN = 'TAKEN',
|
|
7
|
+
ADJUSTMENT = 'ADJUSTMENT',
|
|
8
|
+
CARRY_FORWARD = 'CARRY_FORWARD',
|
|
9
|
+
ENCASHMENT = 'ENCASHMENT',
|
|
10
|
+
AVAILED = 'AVAILED',
|
|
11
|
+
ELAPSED = 'ELAPSED'
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//This model is used to store early checkout transactions for users
|
|
15
|
+
@Entity({ name: 'early_checkout_transactions' })
|
|
16
|
+
export class EarlyCheckoutTransaction extends BaseModel {
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'int', nullable: false })
|
|
19
|
+
user_id: number;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'varchar', nullable: true })
|
|
22
|
+
hours_count: string;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'date', nullable: true })
|
|
25
|
+
from_date: Date;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'date', nullable: true })
|
|
28
|
+
to_date: Date;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'int', nullable: true })
|
|
31
|
+
year: number;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'varchar', nullable: false })
|
|
34
|
+
status: EarlyCheckoutTransactionStatus;
|
|
35
|
+
|
|
36
|
+
constructor(
|
|
37
|
+
user_id: number,
|
|
38
|
+
hours_count: string,
|
|
39
|
+
from_date: Date,
|
|
40
|
+
to_date: Date,
|
|
41
|
+
year: number,
|
|
42
|
+
status: EarlyCheckoutTransactionStatus
|
|
43
|
+
) {
|
|
44
|
+
super();
|
|
45
|
+
this.user_id = user_id;
|
|
46
|
+
this.hours_count = hours_count;
|
|
47
|
+
this.from_date = from_date;
|
|
48
|
+
this.to_date = to_date;
|
|
49
|
+
this.year = year;
|
|
50
|
+
this.status = status;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -45,6 +45,10 @@ export class FinancialApprovals extends BaseModel {
|
|
|
45
45
|
@Column({ type: 'int', nullable: true })
|
|
46
46
|
delegate_user_id: number | null;
|
|
47
47
|
|
|
48
|
+
// is_allowed flag: true if logged-in user is the request creator, false otherwise (for chat permissions)
|
|
49
|
+
@Column({ type: 'boolean', default: true, nullable: true })
|
|
50
|
+
is_allowed: boolean | null;
|
|
51
|
+
|
|
48
52
|
@ManyToOne(() => FinancialRequests, fr => fr.approvals)
|
|
49
53
|
@JoinColumn({ name: 'financial_request_id' })
|
|
50
54
|
financialRequest?: FinancialRequests;
|
|
@@ -4,23 +4,28 @@ import { BaseModel } from './BaseModel';
|
|
|
4
4
|
@Entity({ name: 'financial_grade' })
|
|
5
5
|
export class FinancialGrade extends BaseModel {
|
|
6
6
|
|
|
7
|
-
@Column({ nullable: false })
|
|
7
|
+
@Column({ type: 'varchar', nullable: false })
|
|
8
8
|
diplomatic_title: string;
|
|
9
9
|
|
|
10
|
-
@Column({ nullable:
|
|
11
|
-
|
|
10
|
+
@Column({ type: 'varchar', nullable: true })
|
|
11
|
+
arabic_title: string;
|
|
12
12
|
|
|
13
|
-
@Column({ type: "
|
|
14
|
-
|
|
13
|
+
@Column({ type: "integer", nullable: true })
|
|
14
|
+
financial_grade: number;
|
|
15
|
+
|
|
16
|
+
@Column({ type: "integer", nullable: true })
|
|
17
|
+
leave_count: number;
|
|
15
18
|
|
|
16
19
|
constructor(
|
|
17
20
|
diplomatic_title: string,
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
arabic_title: string,
|
|
22
|
+
financial_grade: number,
|
|
23
|
+
leave_count: number
|
|
20
24
|
) {
|
|
21
25
|
super();
|
|
22
26
|
this.diplomatic_title = diplomatic_title;
|
|
27
|
+
this.arabic_title = arabic_title;
|
|
23
28
|
this.financial_grade = financial_grade;
|
|
24
|
-
this.
|
|
29
|
+
this.leave_count = leave_count;
|
|
25
30
|
}
|
|
26
31
|
}
|
|
@@ -6,7 +6,8 @@ export enum GeneralServiceApprovalStatus {
|
|
|
6
6
|
APPROVED = "Approved",
|
|
7
7
|
REJECTED = "Rejected",
|
|
8
8
|
SKIPPED = "Skipped",
|
|
9
|
-
IN_PROGRESS = "In Progress"
|
|
9
|
+
IN_PROGRESS = "In Progress",
|
|
10
|
+
ASSIGNED = "Assigned"
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
@Entity({ name: 'general_service_approvals' })
|
|
@@ -60,6 +61,14 @@ export class GeneralServiceApprovals extends BaseModel {
|
|
|
60
61
|
@Column({ type: 'int', nullable: true })
|
|
61
62
|
delegate_user_id: number | null; // Group who transferred from
|
|
62
63
|
|
|
64
|
+
// Stationery-specific: Action type to indicate what action is needed (for FE button handling)
|
|
65
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
66
|
+
action_type: string | null; // Values: 'approve' (L1), 'store' (Stores Office), 'finance' (Finance), 'finance_purchase', 'complete'
|
|
67
|
+
|
|
68
|
+
// is_allowed flag: true if logged-in user is the request creator, false otherwise (for chat permissions)
|
|
69
|
+
@Column({ type: 'boolean', nullable: true })
|
|
70
|
+
is_allowed: boolean | null;
|
|
71
|
+
|
|
63
72
|
// @Column({ type: 'timestamp', nullable: true })
|
|
64
73
|
// sla_start_time: Date | null; // SLA tracking start time for this assignment
|
|
65
74
|
|
|
@@ -42,7 +42,10 @@ export class LeaveApprovalDetails extends BaseModel {
|
|
|
42
42
|
@Column({ type: 'enum', enum: ApprovalStatus,default: ApprovalStatus.PENDING, nullable: false })
|
|
43
43
|
approval_status: ApprovalStatus;
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
46
|
+
is_allowed: boolean;
|
|
47
|
+
|
|
48
|
+
constructor(leave_request_id: number, approver_user_id: number, approver_role_id: number, comment: string, approval_status: ApprovalStatus, level: number, department_id: number, section_id: number, is_allowed: boolean) {
|
|
46
49
|
super();
|
|
47
50
|
this.leave_request_id = leave_request_id;
|
|
48
51
|
this.approver_user_id = approver_user_id;
|
|
@@ -52,5 +55,6 @@ export class LeaveApprovalDetails extends BaseModel {
|
|
|
52
55
|
this.comment = comment;
|
|
53
56
|
this.approval_status = approval_status;
|
|
54
57
|
this.level = level;
|
|
58
|
+
this.is_allowed = is_allowed;
|
|
55
59
|
}
|
|
56
60
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'leave_balance' })
|
|
5
|
+
export class LeaveBalance extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ nullable: true })
|
|
8
|
+
user_id: string;
|
|
9
|
+
|
|
10
|
+
@Column({ nullable: true })
|
|
11
|
+
leave_type_id: string;
|
|
12
|
+
|
|
13
|
+
@Column({ nullable: true })
|
|
14
|
+
balance: number;
|
|
15
|
+
|
|
16
|
+
@Column({ nullable: true })
|
|
17
|
+
total_balance: number;
|
|
18
|
+
|
|
19
|
+
constructor(user_id: string, leave_type_id: string, balance: number, total_balance: number) {
|
|
20
|
+
super();
|
|
21
|
+
this.user_id = user_id;
|
|
22
|
+
this.leave_type_id = leave_type_id;
|
|
23
|
+
this.balance = balance;
|
|
24
|
+
this.total_balance = total_balance;
|
|
25
|
+
}
|
|
26
|
+
}
|