@platform-modules/foreign-ministry 1.1.56 → 1.1.58
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 +34 -18
- package/dist/index.d.ts +24 -9
- package/dist/index.js +24 -9
- package/dist/models/AttendanceModel.d.ts +2 -1
- package/dist/models/AttendanceModel.js +2 -1
- package/dist/models/CurrencyModel.d.ts +10 -0
- package/dist/models/CurrencyModel.js +53 -0
- package/dist/models/EarlyCheckoutApprovalModel.d.ts +1 -0
- package/dist/models/EarlyCheckoutApprovalModel.js +4 -0
- package/dist/models/EarlyCheckoutChatModel.d.ts +4 -0
- package/dist/models/EarlyCheckoutChatModel.js +28 -2
- package/dist/models/EarlyCheckoutWorkflowModel.d.ts +4 -0
- package/dist/models/EarlyCheckoutWorkflowModel.js +16 -0
- package/dist/models/FinancialApprovalsModel.d.ts +2 -1
- package/dist/models/FinancialApprovalsModel.js +7 -2
- package/dist/models/FinancialChatsModel.d.ts +16 -1
- package/dist/models/FinancialChatsModel.js +33 -3
- package/dist/models/FinancialRequestsModel.d.ts +1 -1
- package/dist/models/FinancialRequestsModel.js +3 -3
- package/dist/models/FinancialWorkFlowModel.d.ts +3 -1
- package/dist/models/FinancialWorkFlowModel.js +11 -2
- package/dist/models/GeneralServiceApprovalsModel.d.ts +26 -0
- package/dist/models/GeneralServiceApprovalsModel.js +109 -0
- package/dist/models/GeneralServiceAttachmentsModel.d.ts +10 -0
- package/dist/models/{DiplomaticAttachmentsModel.js → GeneralServiceAttachmentsModel.js} +18 -22
- package/dist/models/GeneralServiceChatsModel.d.ts +9 -0
- package/dist/models/{DiplomaticChatsModel.js → GeneralServiceChatsModel.js} +17 -21
- package/dist/models/GeneralServiceRequestsModel.d.ts +36 -0
- package/dist/models/GeneralServiceRequestsModel.js +137 -0
- package/dist/models/GeneralServiceWorkFlowModel.d.ts +21 -0
- package/dist/models/GeneralServiceWorkFlowModel.js +80 -0
- package/dist/models/GroupModel.d.ts +16 -0
- package/dist/models/GroupModel.js +44 -0
- package/dist/models/GroupNamesModel.d.ts +6 -0
- package/dist/models/GroupNamesModel.js +34 -0
- package/dist/models/HelpdeskCategoriesModel.d.ts +9 -0
- package/dist/models/{DiplomaticClubCardAttachmentModel.js → HelpdeskCategoriesModel.js} +27 -22
- package/dist/models/HelpdeskSubCategoriesModel.d.ts +10 -0
- package/dist/models/{PassportRequestAttachmentModel.js → HelpdeskSubCategoriesModel.js} +29 -29
- package/dist/models/IssueTypesModel.d.ts +10 -0
- package/dist/models/IssueTypesModel.js +54 -0
- package/dist/models/JobsModel.d.ts +17 -0
- package/dist/models/{DiplomaticClubCardChatModel.js → JobsModel.js} +29 -16
- package/dist/models/LeaveApprovalsModel.d.ts +4 -1
- package/dist/models/LeaveApprovalsModel.js +9 -0
- package/dist/models/LeaveAttachmentsModel.d.ts +6 -2
- package/dist/models/LeaveAttachmentsModel.js +27 -7
- package/dist/models/LeaveChatModel.d.ts +5 -1
- package/dist/models/LeaveChatModel.js +22 -2
- package/dist/models/LeaveRequestModel.d.ts +12 -1
- package/dist/models/LeaveRequestModel.js +35 -0
- package/dist/models/LeaveWorkFlowModel.d.ts +5 -1
- package/dist/models/LeaveWorkFlowModel.js +22 -2
- package/dist/models/MounringLeaveRelationModel.d.ts +2 -1
- package/dist/models/MounringLeaveRelationModel.js +7 -2
- package/dist/models/ReimbursementRequestsModel.d.ts +2 -1
- package/dist/models/ReimbursementRequestsModel.js +9 -4
- package/dist/models/RoutingGroupsModel.d.ts +14 -0
- package/dist/models/RoutingGroupsModel.js +71 -0
- package/dist/models/StayAfterHoursApprovalModel.d.ts +1 -0
- package/dist/models/StayAfterHoursApprovalModel.js +4 -0
- package/dist/models/StayAfterHoursChatModel.d.ts +4 -0
- package/dist/models/StayAfterHoursChatModel.js +28 -2
- package/dist/models/StayAfterHoursWorkflowModel.d.ts +4 -0
- package/dist/models/StayAfterHoursWorkflowModel.js +16 -0
- package/dist/models/TelephoneDirectoryModel.d.ts +21 -0
- package/dist/models/TelephoneDirectoryModel.js +108 -0
- package/dist/models/TransferMissionApprovalModel.d.ts +21 -0
- package/dist/models/TransferMissionApprovalModel.js +75 -0
- package/dist/models/TransferMissionAttachmentModel.d.ts +11 -0
- package/dist/models/TransferMissionAttachmentModel.js +52 -0
- package/dist/models/TransferMissionChatModel.d.ts +19 -0
- package/dist/models/TransferMissionChatModel.js +78 -0
- package/dist/models/TransferMissionRequestModel.d.ts +36 -0
- package/dist/models/TransferMissionRequestModel.js +132 -0
- package/dist/models/TransferMissionWorkflowModel.d.ts +17 -0
- package/dist/models/TransferMissionWorkflowModel.js +62 -0
- package/dist/models/UpdateAttendanceApprovalModel.d.ts +21 -0
- package/dist/models/UpdateAttendanceApprovalModel.js +75 -0
- package/dist/models/UpdateAttendanceChatModel.d.ts +16 -0
- package/dist/models/UpdateAttendanceChatModel.js +52 -0
- package/dist/models/UpdateAttendanceRequestModel.d.ts +28 -0
- package/dist/models/UpdateAttendanceRequestModel.js +86 -0
- package/dist/models/UpdateAttendanceWorkflowModel.d.ts +13 -0
- package/dist/models/UpdateAttendanceWorkflowModel.js +46 -0
- package/dist/models/WorkScheduleModel.d.ts +19 -0
- package/dist/models/WorkScheduleModel.js +60 -0
- package/dist/models/WorkflowTask.d.ts +5 -2
- package/dist/models/WorkflowTask.js +28 -4
- package/dist/models/WorkflowTaskNames.d.ts +12 -3
- package/dist/models/WorkflowTaskNames.js +28 -9
- package/package.json +1 -1
- package/src/data-source.ts +45 -30
- package/src/index.ts +24 -9
- package/src/models/AttendanceModel.ts +2 -1
- package/src/models/CurrencyModel.ts +38 -0
- package/src/models/EarlyCheckoutApprovalModel.ts +3 -0
- package/src/models/EarlyCheckoutChatModel.ts +34 -1
- package/src/models/EarlyCheckoutWorkflowModel.ts +12 -0
- package/src/models/FinancialApprovalsModel.ts +6 -1
- package/src/models/FinancialChatsModel.ts +27 -1
- package/src/models/FinancialRequestsModel.ts +2 -2
- package/src/models/FinancialWorkFlowModel.ts +9 -1
- package/src/models/GeneralServiceApprovalsModel.ts +95 -0
- package/src/models/GeneralServiceAttachmentsModel.ts +43 -0
- package/src/models/GeneralServiceChatsModel.ts +39 -0
- package/src/models/GeneralServiceRequestsModel.ts +113 -0
- package/src/models/GeneralServiceWorkFlowModel.ts +78 -0
- package/src/models/GroupModel.ts +30 -0
- package/src/models/GroupNamesModel.ts +22 -0
- package/src/models/HelpdeskCategoriesModel.ts +35 -0
- package/src/models/HelpdeskSubCategoriesModel.ts +40 -0
- package/src/models/IssueTypesModel.ts +47 -0
- package/src/models/JobsModel.ts +37 -0
- package/src/models/LeaveApprovalsModel.ts +8 -1
- package/src/models/LeaveAttachmentsModel.ts +21 -5
- package/src/models/LeaveChatModel.ts +17 -1
- package/src/models/LeaveRequestModel.ts +29 -1
- package/src/models/LeaveWorkFlowModel.ts +17 -1
- package/src/models/MounringLeaveRelationModel.ts +5 -1
- package/src/models/ReimbursementRequestsModel.ts +8 -6
- package/src/models/RoutingGroupsModel.ts +67 -0
- package/src/models/StayAfterHoursApprovalModel.ts +3 -0
- package/src/models/StayAfterHoursChatModel.ts +34 -1
- package/src/models/StayAfterHoursWorkflowModel.ts +12 -0
- package/src/models/TelephoneDirectoryModel.ts +84 -0
- package/src/models/TransferMissionApprovalModel.ts +49 -0
- package/src/models/TransferMissionAttachmentModel.ts +31 -0
- package/src/models/TransferMissionChatModel.ts +66 -0
- package/src/models/TransferMissionRequestModel.ts +94 -0
- package/src/models/TransferMissionWorkflowModel.ts +39 -0
- package/src/models/UpdateAttendanceApprovalModel.ts +50 -0
- package/src/models/UpdateAttendanceChatModel.ts +35 -0
- package/src/models/UpdateAttendanceRequestModel.ts +63 -0
- package/src/models/UpdateAttendanceWorkflowModel.ts +28 -0
- package/src/models/WorkScheduleModel.ts +47 -0
- package/src/models/WorkflowTask.ts +31 -4
- package/src/models/WorkflowTaskNames.ts +27 -8
- package/dist/models/DiplomaticApprovalsModel.d.ts +0 -25
- package/dist/models/DiplomaticApprovalsModel.js +0 -95
- package/dist/models/DiplomaticAttachmentsModel.d.ts +0 -12
- package/dist/models/DiplomaticChatsModel.d.ts +0 -11
- 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/DiplomaticClubCardChatModel.d.ts +0 -7
- package/dist/models/DiplomaticClubCardMemberModel.d.ts +0 -13
- package/dist/models/DiplomaticClubCardMemberModel.js +0 -60
- 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/DiplomaticRequestsModel.d.ts +0 -43
- package/dist/models/DiplomaticRequestsModel.js +0 -142
- 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 -21
- package/dist/models/DiplomaticWorkFlowModel.js +0 -78
- 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/PassportRequestChatModel.d.ts +0 -8
- package/dist/models/PassportRequestChatModel.js +0 -44
- 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 -78
- package/src/models/DiplomaticAttachmentsModel.ts +0 -45
- package/src/models/DiplomaticChatsModel.ts +0 -41
- package/src/models/DiplomaticRequestsModel.ts +0 -121
- package/src/models/DiplomaticServiceDetailsModel.ts +0 -51
- package/src/models/DiplomaticSettingsModel.ts +0 -45
- package/src/models/DiplomaticTitleModel.ts +0 -27
- package/src/models/DiplomaticWorkFlowModel.ts +0 -62
- package/src/models/SubscriptionAmountModel.ts +0 -95
|
@@ -0,0 +1,46 @@
|
|
|
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.UpdateAttendanceWorkFlow = exports.UpdateAttendanceWorkFlowStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var UpdateAttendanceWorkFlowStatus;
|
|
16
|
+
(function (UpdateAttendanceWorkFlowStatus) {
|
|
17
|
+
UpdateAttendanceWorkFlowStatus["COMPLETED"] = "Completed";
|
|
18
|
+
UpdateAttendanceWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
19
|
+
UpdateAttendanceWorkFlowStatus["PENDING"] = "Pending";
|
|
20
|
+
})(UpdateAttendanceWorkFlowStatus || (exports.UpdateAttendanceWorkFlowStatus = UpdateAttendanceWorkFlowStatus = {}));
|
|
21
|
+
let UpdateAttendanceWorkFlow = class UpdateAttendanceWorkFlow extends BaseModel_1.BaseModel {
|
|
22
|
+
};
|
|
23
|
+
exports.UpdateAttendanceWorkFlow = UpdateAttendanceWorkFlow;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], UpdateAttendanceWorkFlow.prototype, "request_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], UpdateAttendanceWorkFlow.prototype, "service_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], UpdateAttendanceWorkFlow.prototype, "sub_service_id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], UpdateAttendanceWorkFlow.prototype, "content", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: UpdateAttendanceWorkFlowStatus, default: UpdateAttendanceWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], UpdateAttendanceWorkFlow.prototype, "status", void 0);
|
|
44
|
+
exports.UpdateAttendanceWorkFlow = UpdateAttendanceWorkFlow = __decorate([
|
|
45
|
+
(0, typeorm_1.Entity)({ name: 'update_attendance_workflows' })
|
|
46
|
+
], UpdateAttendanceWorkFlow);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author
|
|
3
|
+
* Amnet Digital
|
|
4
|
+
* @date
|
|
5
|
+
* 2024-12-20
|
|
6
|
+
* @Model
|
|
7
|
+
* WorkSchedule
|
|
8
|
+
* @usage
|
|
9
|
+
* Work Schedule Information will store
|
|
10
|
+
*/
|
|
11
|
+
import { BaseModel } from './BaseModel';
|
|
12
|
+
export declare class WorkSchedule extends BaseModel {
|
|
13
|
+
from_date: Date;
|
|
14
|
+
to_date: Date;
|
|
15
|
+
from_time: string;
|
|
16
|
+
to_time: string;
|
|
17
|
+
reason: string | null;
|
|
18
|
+
constructor(from_date: Date, to_date: Date, from_time: string, to_time: string, reason?: string);
|
|
19
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author
|
|
4
|
+
* Amnet Digital
|
|
5
|
+
* @date
|
|
6
|
+
* 2024-12-20
|
|
7
|
+
* @Model
|
|
8
|
+
* WorkSchedule
|
|
9
|
+
* @usage
|
|
10
|
+
* Work Schedule Information will store
|
|
11
|
+
*/
|
|
12
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
13
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15
|
+
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;
|
|
16
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17
|
+
};
|
|
18
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.WorkSchedule = void 0;
|
|
23
|
+
const typeorm_1 = require("typeorm");
|
|
24
|
+
const BaseModel_1 = require("./BaseModel");
|
|
25
|
+
let WorkSchedule = class WorkSchedule extends BaseModel_1.BaseModel {
|
|
26
|
+
constructor(from_date, to_date, from_time, to_time, reason) {
|
|
27
|
+
super();
|
|
28
|
+
this.from_date = from_date;
|
|
29
|
+
this.to_date = to_date;
|
|
30
|
+
this.from_time = from_time;
|
|
31
|
+
this.to_time = to_time;
|
|
32
|
+
this.reason = reason || null;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.WorkSchedule = WorkSchedule;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: false }),
|
|
38
|
+
__metadata("design:type", Date)
|
|
39
|
+
], WorkSchedule.prototype, "from_date", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: false }),
|
|
42
|
+
__metadata("design:type", Date)
|
|
43
|
+
], WorkSchedule.prototype, "to_date", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'time', nullable: false }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], WorkSchedule.prototype, "from_time", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'time', nullable: false }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], WorkSchedule.prototype, "to_time", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], WorkSchedule.prototype, "reason", void 0);
|
|
56
|
+
exports.WorkSchedule = WorkSchedule = __decorate([
|
|
57
|
+
(0, typeorm_1.Entity)({ name: 'work_schedules' }),
|
|
58
|
+
__metadata("design:paramtypes", [Date,
|
|
59
|
+
Date, String, String, String])
|
|
60
|
+
], WorkSchedule);
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { TaskType } from "./WorkflowTaskNames";
|
|
3
|
+
import { CategoryType } from "./WorkflowTaskNames";
|
|
2
4
|
export declare class WorkflowTask extends BaseModel {
|
|
3
5
|
task_id: number;
|
|
4
6
|
name: string;
|
|
5
|
-
task_type:
|
|
6
|
-
|
|
7
|
+
task_type: TaskType;
|
|
8
|
+
category: CategoryType;
|
|
9
|
+
constructor(name: string, task_id?: number, task_type?: TaskType, category?: CategoryType);
|
|
7
10
|
}
|
|
@@ -12,12 +12,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.WorkflowTask = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const WorkflowTaskNames_1 = require("./WorkflowTaskNames");
|
|
16
|
+
const WorkflowTaskNames_2 = require("./WorkflowTaskNames");
|
|
17
|
+
// export enum TaskNameType {
|
|
18
|
+
// SIMPLE = 'SIMPLE',
|
|
19
|
+
// HUMAN = 'HUMAN'
|
|
20
|
+
// }
|
|
21
|
+
// export enum CategoryNameType {
|
|
22
|
+
// CREATE = 'CREATE',
|
|
23
|
+
// APPROVAL = 'APPROVAL',
|
|
24
|
+
// NOTIFICATION = 'NOTIFICATION'
|
|
25
|
+
// }
|
|
15
26
|
let WorkflowTask = class WorkflowTask extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(name, task_id, task_type) {
|
|
27
|
+
constructor(name, task_id, task_type, category) {
|
|
17
28
|
super();
|
|
18
29
|
this.name = name;
|
|
19
30
|
this.task_id = task_id || 0;
|
|
20
|
-
this.task_type = task_type ||
|
|
31
|
+
this.task_type = task_type || WorkflowTaskNames_1.TaskType.SIMPLE;
|
|
32
|
+
this.category = category || WorkflowTaskNames_2.CategoryType.CREATE;
|
|
21
33
|
}
|
|
22
34
|
};
|
|
23
35
|
exports.WorkflowTask = WorkflowTask;
|
|
@@ -30,10 +42,22 @@ __decorate([
|
|
|
30
42
|
__metadata("design:type", String)
|
|
31
43
|
], WorkflowTask.prototype, "name", void 0);
|
|
32
44
|
__decorate([
|
|
33
|
-
(0, typeorm_1.Column)({
|
|
45
|
+
(0, typeorm_1.Column)({
|
|
46
|
+
type: 'enum',
|
|
47
|
+
enum: WorkflowTaskNames_1.TaskType,
|
|
48
|
+
nullable: true
|
|
49
|
+
}),
|
|
34
50
|
__metadata("design:type", String)
|
|
35
51
|
], WorkflowTask.prototype, "task_type", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({
|
|
54
|
+
type: 'enum',
|
|
55
|
+
enum: WorkflowTaskNames_2.CategoryType,
|
|
56
|
+
nullable: true
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], WorkflowTask.prototype, "category", void 0);
|
|
36
60
|
exports.WorkflowTask = WorkflowTask = __decorate([
|
|
37
61
|
(0, typeorm_1.Entity)({ name: 'workflow_tasks' }),
|
|
38
|
-
__metadata("design:paramtypes", [String, Number, String])
|
|
62
|
+
__metadata("design:paramtypes", [String, Number, String, String])
|
|
39
63
|
], WorkflowTask);
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum TaskType {
|
|
3
|
+
SIMPLE = "SIMPLE",
|
|
4
|
+
HUMAN = "HUMAN"
|
|
5
|
+
}
|
|
6
|
+
export declare enum CategoryType {
|
|
7
|
+
CREATE = "CREATE",
|
|
8
|
+
APPROVAL = "APPROVAL",
|
|
9
|
+
NOTIFICATION = "NOTIFICATION"
|
|
10
|
+
}
|
|
2
11
|
export declare class WorkflowTaskNames extends BaseModel {
|
|
3
12
|
name: string;
|
|
4
|
-
task_id: number;
|
|
5
13
|
description: string;
|
|
6
|
-
task_type:
|
|
7
|
-
|
|
14
|
+
task_type: TaskType;
|
|
15
|
+
category: CategoryType;
|
|
16
|
+
constructor(name: string, description: string, task_type: TaskType, category: CategoryType);
|
|
8
17
|
}
|
|
@@ -9,16 +9,27 @@ 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 = void 0;
|
|
12
|
+
exports.WorkflowTaskNames = exports.CategoryType = exports.TaskType = 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 = {}));
|
|
15
26
|
let WorkflowTaskNames = class WorkflowTaskNames extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(name,
|
|
27
|
+
constructor(name, description, task_type, category) {
|
|
17
28
|
super();
|
|
18
29
|
this.name = name;
|
|
19
|
-
this.task_id = task_id;
|
|
20
30
|
this.description = description;
|
|
21
31
|
this.task_type = task_type;
|
|
32
|
+
this.category = category;
|
|
22
33
|
}
|
|
23
34
|
};
|
|
24
35
|
exports.WorkflowTaskNames = WorkflowTaskNames;
|
|
@@ -26,19 +37,27 @@ __decorate([
|
|
|
26
37
|
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
|
|
27
38
|
__metadata("design:type", String)
|
|
28
39
|
], 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);
|
|
33
40
|
__decorate([
|
|
34
41
|
(0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
|
|
35
42
|
__metadata("design:type", String)
|
|
36
43
|
], WorkflowTaskNames.prototype, "description", void 0);
|
|
37
44
|
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({
|
|
45
|
+
(0, typeorm_1.Column)({
|
|
46
|
+
type: 'enum',
|
|
47
|
+
enum: TaskType,
|
|
48
|
+
nullable: true
|
|
49
|
+
}),
|
|
39
50
|
__metadata("design:type", String)
|
|
40
51
|
], 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);
|
|
41
60
|
exports.WorkflowTaskNames = WorkflowTaskNames = __decorate([
|
|
42
61
|
(0, typeorm_1.Entity)({ name: 'workflow_task_names' }),
|
|
43
|
-
__metadata("design:paramtypes", [String,
|
|
62
|
+
__metadata("design:paramtypes", [String, String, String, String])
|
|
44
63
|
], WorkflowTaskNames);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -80,15 +80,6 @@ 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';
|
|
92
83
|
|
|
93
84
|
|
|
94
85
|
import { WorkflowTask } from './models/WorkflowTask';
|
|
@@ -97,8 +88,24 @@ import { WorkflowDefinitions } from './models/WorkflowDefinitions';
|
|
|
97
88
|
import { WorkflowHierarchy } from './models/WorkflowHierarchy';
|
|
98
89
|
import { ImportantLinks } from './models/importantLinksModel';
|
|
99
90
|
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';
|
|
100
95
|
|
|
101
|
-
|
|
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'
|
|
102
109
|
export const AppDataSource = new DataSource({
|
|
103
110
|
type: 'postgres',
|
|
104
111
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -177,25 +184,33 @@ export const AppDataSource = new DataSource({
|
|
|
177
184
|
ImportantLinks,
|
|
178
185
|
DelegateSettings,
|
|
179
186
|
AllowanceTypes,
|
|
180
|
-
BankNames
|
|
181
|
-
,
|
|
182
|
-
,
|
|
183
|
-
,
|
|
184
|
-
,
|
|
185
|
-
,
|
|
186
|
-
,
|
|
187
|
-
,
|
|
188
|
-
,
|
|
189
|
-
,
|
|
190
|
-
,
|
|
191
|
-
,
|
|
192
|
-
,
|
|
193
|
-
,
|
|
194
|
-
,
|
|
195
|
-
,
|
|
196
|
-
,
|
|
197
|
-
,
|
|
198
|
-
,
|
|
199
|
-
,
|
|
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
|
|
200
215
|
],
|
|
201
216
|
});
|
package/src/index.ts
CHANGED
|
@@ -77,12 +77,27 @@ 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/
|
|
81
|
-
export * from './models/
|
|
82
|
-
export * from './models/
|
|
83
|
-
export * from './models/
|
|
84
|
-
export * from './models/
|
|
85
|
-
export * from './models/
|
|
86
|
-
export * from './models/
|
|
87
|
-
export * from './models/
|
|
88
|
-
export * from './models/
|
|
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'
|
|
@@ -7,6 +7,7 @@ export enum AttendanceStatus {
|
|
|
7
7
|
ABSENT = 'ABSENT',
|
|
8
8
|
LEAVE = 'LEAVE',
|
|
9
9
|
HALF_DAY = 'HALF_DAY',
|
|
10
|
+
REGULARISED = 'REGULARISED',
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
@Entity({ name: 'attendance_details' })
|
|
@@ -19,7 +20,7 @@ export class AttendanceDetails extends BaseModel {
|
|
|
19
20
|
@Column({ type: 'int', nullable: true })
|
|
20
21
|
shift_id: number;
|
|
21
22
|
|
|
22
|
-
@Column({ type: 'date', nullable: true
|
|
23
|
+
@Column({ type: 'date', nullable: true })
|
|
23
24
|
attendance_date: string;
|
|
24
25
|
|
|
25
26
|
@Column({ type: 'time', nullable: true })
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: "currencies" })
|
|
5
|
+
export class Currency extends BaseModel {
|
|
6
|
+
@PrimaryGeneratedColumn()
|
|
7
|
+
id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: "varchar", length: 10, nullable: false, unique: true })
|
|
10
|
+
code: string; // Currency code (e.g., "OMR", "USD")
|
|
11
|
+
|
|
12
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
13
|
+
name: string; // Currency name (e.g., "Omani Rial", "US Dollar")
|
|
14
|
+
|
|
15
|
+
@Column({ type: "varchar", length: 10, nullable: true })
|
|
16
|
+
symbol: string; // Currency symbol (e.g., "﷼", "$")
|
|
17
|
+
|
|
18
|
+
@Column({ type: "text", nullable: true })
|
|
19
|
+
countries: string; // JSON array of countries as string (e.g., '["Oman"]')
|
|
20
|
+
|
|
21
|
+
@Column({ type: "boolean", default: true })
|
|
22
|
+
is_active: boolean;
|
|
23
|
+
|
|
24
|
+
constructor(
|
|
25
|
+
code: string,
|
|
26
|
+
name: string,
|
|
27
|
+
symbol?: string,
|
|
28
|
+
countries?: string
|
|
29
|
+
) {
|
|
30
|
+
super();
|
|
31
|
+
this.code = code;
|
|
32
|
+
this.name = name;
|
|
33
|
+
this.symbol = symbol || '';
|
|
34
|
+
this.countries = countries || '[]';
|
|
35
|
+
this.is_active = true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
@@ -45,6 +45,9 @@ export class EarlyCheckoutApprovalDetails extends BaseModel {
|
|
|
45
45
|
|
|
46
46
|
@Column({ type: 'enum', enum: EarlyCheckoutApprovalStatus, default: EarlyCheckoutApprovalStatus.PENDING, nullable: false })
|
|
47
47
|
approval_status: EarlyCheckoutApprovalStatus;
|
|
48
|
+
|
|
49
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
50
|
+
is_allowed: boolean;
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { EarlyCheckoutApprovalStatus } from './EarlyCheckoutApprovalModel';
|
|
3
4
|
|
|
4
5
|
export enum EarlyCheckoutMessageType {
|
|
5
6
|
TEXT = "text",
|
|
@@ -24,11 +25,43 @@ export class EarlyCheckoutRequestChat extends BaseModel {
|
|
|
24
25
|
@Column({ type: 'integer', nullable: false })
|
|
25
26
|
user_id: number;
|
|
26
27
|
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
role_id: number;
|
|
30
|
+
|
|
27
31
|
@Column({ type: 'text', nullable: false })
|
|
28
32
|
message: string;
|
|
29
33
|
|
|
30
|
-
@Column({
|
|
34
|
+
@Column({
|
|
35
|
+
type: 'enum',
|
|
36
|
+
enum: EarlyCheckoutMessageType,
|
|
37
|
+
default: EarlyCheckoutMessageType.TEXT,
|
|
38
|
+
nullable: false
|
|
39
|
+
})
|
|
31
40
|
messageType: EarlyCheckoutMessageType;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'text', nullable: true })
|
|
43
|
+
status: string;
|
|
44
|
+
|
|
45
|
+
constructor(
|
|
46
|
+
request_id: number,
|
|
47
|
+
user_id: number,
|
|
48
|
+
role_id: number,
|
|
49
|
+
message: string,
|
|
50
|
+
service_id?: number,
|
|
51
|
+
sub_service_id?: number,
|
|
52
|
+
messageType?: EarlyCheckoutMessageType,
|
|
53
|
+
status?: EarlyCheckoutApprovalStatus
|
|
54
|
+
) {
|
|
55
|
+
super();
|
|
56
|
+
this.request_id = request_id;
|
|
57
|
+
this.service_id = service_id || null;
|
|
58
|
+
this.sub_service_id = sub_service_id || null;
|
|
59
|
+
this.user_id = user_id;
|
|
60
|
+
this.role_id = role_id;
|
|
61
|
+
this.message = message;
|
|
62
|
+
this.messageType = messageType || EarlyCheckoutMessageType.TEXT;
|
|
63
|
+
this.status = status || EarlyCheckoutApprovalStatus.PENDING;
|
|
64
|
+
}
|
|
32
65
|
}
|
|
33
66
|
|
|
34
67
|
|
|
@@ -23,6 +23,18 @@ export class EarlyCheckoutWorkFlow extends BaseModel {
|
|
|
23
23
|
|
|
24
24
|
@Column({ type: 'enum', enum: EarlyCheckoutWorkFlowStatus, default: EarlyCheckoutWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
25
25
|
status: EarlyCheckoutWorkFlowStatus;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'integer', nullable: true })
|
|
28
|
+
user_id: number | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'integer', nullable: true })
|
|
31
|
+
role_id: number | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'integer', nullable: true })
|
|
34
|
+
department_id: number | null;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'integer', nullable: true })
|
|
37
|
+
section_id: number | null;
|
|
26
38
|
}
|
|
27
39
|
|
|
28
40
|
|
|
@@ -42,6 +42,9 @@ export class FinancialApprovals extends BaseModel {
|
|
|
42
42
|
@Column({ type: 'int', nullable: true })
|
|
43
43
|
approved_by: number | null;
|
|
44
44
|
|
|
45
|
+
@Column({ type: 'int', nullable: true })
|
|
46
|
+
delegate_user_id: number | null;
|
|
47
|
+
|
|
45
48
|
@ManyToOne(() => FinancialRequests, fr => fr.approvals)
|
|
46
49
|
@JoinColumn({ name: 'financial_request_id' })
|
|
47
50
|
financialRequest?: FinancialRequests;
|
|
@@ -53,7 +56,8 @@ export class FinancialApprovals extends BaseModel {
|
|
|
53
56
|
approval_status: FinancialApprovalStatus,
|
|
54
57
|
department_id: number | null,
|
|
55
58
|
section_id: number | null,
|
|
56
|
-
approved_by: number | null
|
|
59
|
+
approved_by: number | null,
|
|
60
|
+
delegate_user_id: number | null
|
|
57
61
|
) {
|
|
58
62
|
super();
|
|
59
63
|
this.financial_request_id = financial_request_id;
|
|
@@ -63,6 +67,7 @@ export class FinancialApprovals extends BaseModel {
|
|
|
63
67
|
this.department_id = department_id;
|
|
64
68
|
this.section_id = section_id;
|
|
65
69
|
this.approved_by = approved_by;
|
|
70
|
+
this.delegate_user_id = delegate_user_id;
|
|
66
71
|
}
|
|
67
72
|
}
|
|
68
73
|
|
|
@@ -2,6 +2,19 @@ import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
import { FinancialRequests } from './FinancialRequestsModel';
|
|
4
4
|
|
|
5
|
+
export enum statusEnum {
|
|
6
|
+
PENDING = "Pending",
|
|
7
|
+
APPROVED = "Approved",
|
|
8
|
+
REJECTED = "Rejected"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export enum messageTypeEnum {
|
|
12
|
+
TEXT = "text",
|
|
13
|
+
IMAGE = "image",
|
|
14
|
+
AUDIO = "audio",
|
|
15
|
+
VIDEO = "video"
|
|
16
|
+
}
|
|
17
|
+
|
|
5
18
|
@Entity({ name: 'financial_chats' })
|
|
6
19
|
export class FinancialChats extends BaseModel {
|
|
7
20
|
@Column({ type: 'int' })
|
|
@@ -13,15 +26,28 @@ export class FinancialChats extends BaseModel {
|
|
|
13
26
|
@Column({ type: 'int' })
|
|
14
27
|
sender_user_id: number;
|
|
15
28
|
|
|
29
|
+
@Column({ type: 'int', nullable: true })
|
|
30
|
+
role_id: number | null;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
33
|
+
status: statusEnum | null;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'varchar',length: 255, nullable: true })
|
|
36
|
+
message_type: messageTypeEnum | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'int', nullable: true })
|
|
39
|
+
sender_role_id: number | null;
|
|
40
|
+
|
|
16
41
|
@ManyToOne(() => FinancialRequests, fr => fr.chats)
|
|
17
42
|
@JoinColumn({ name: 'financial_request_id' })
|
|
18
43
|
financialRequest?: FinancialRequests;
|
|
19
44
|
|
|
20
|
-
constructor(financial_request_id: number, content: string, sender_user_id: number) {
|
|
45
|
+
constructor(financial_request_id: number, content: string, sender_user_id: number, sender_role_id: number) {
|
|
21
46
|
super();
|
|
22
47
|
this.financial_request_id = financial_request_id;
|
|
23
48
|
this.content = content;
|
|
24
49
|
this.sender_user_id = sender_user_id;
|
|
50
|
+
this.sender_role_id = sender_role_id;
|
|
25
51
|
}
|
|
26
52
|
}
|
|
27
53
|
|
|
@@ -91,8 +91,8 @@ export class FinancialRequests extends BaseModel {
|
|
|
91
91
|
@OneToOne('AllowanceRequests', 'financialRequest', { nullable: true })
|
|
92
92
|
allowanceRequest?: AllowanceRequests;
|
|
93
93
|
|
|
94
|
-
@
|
|
95
|
-
|
|
94
|
+
@OneToMany('ReimbursementRequests', 'financialRequest', { nullable: true })
|
|
95
|
+
reimbursementRequests?: ReimbursementRequests[];
|
|
96
96
|
|
|
97
97
|
@OneToOne('BankAccountChangeRequests', 'financialRequest', { nullable: true })
|
|
98
98
|
bankAccountChangeRequest?: BankAccountChangeRequests;
|