@platform-modules/civil-aviation-authority 2.3.87 → 2.3.90
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/.env +17 -9
- package/dist/data-source.js +13 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +17 -1
- package/dist/models/DepartmentDocumentOwnerModel.d.ts +10 -0
- package/dist/models/DepartmentDocumentOwnerModel.js +44 -0
- package/dist/models/DocumentAuditLogModel.d.ts +13 -0
- package/dist/models/DocumentAuditLogModel.js +60 -0
- package/dist/models/DocumentFolderModel.d.ts +14 -0
- package/dist/models/DocumentFolderModel.js +60 -0
- package/dist/models/DocumentMetadataModel.d.ts +45 -0
- package/dist/models/DocumentMetadataModel.js +171 -0
- package/dist/models/DocumentModel.d.ts +25 -0
- package/dist/models/DocumentModel.js +96 -0
- package/dist/models/DocumentPermissionModel.d.ts +11 -0
- package/dist/models/DocumentPermissionModel.js +52 -0
- package/dist/models/DocumentTypeModel.d.ts +8 -0
- package/dist/models/{ITServicesTypesMuscatModel.js → DocumentTypeModel.js} +19 -16
- package/dist/models/DocumentationDepartmentsModel.d.ts +13 -0
- package/dist/models/DocumentationDepartmentsModel.js +53 -0
- package/dist/models/FolderModel.d.ts +16 -0
- package/dist/models/FolderModel.js +85 -0
- package/dist/models/HumanResourceAnnualPlanningRequestModel.d.ts +35 -0
- package/dist/models/HumanResourceAnnualPlanningRequestModel.js +121 -0
- package/dist/models/HumanResourceAnnualPlanningTaskModel.d.ts +25 -0
- package/dist/models/HumanResourceAnnualPlanningTaskModel.js +83 -0
- package/dist/models/PerformanceCyclePeriodModel.d.ts +7 -0
- package/dist/models/PerformanceCyclePeriodModel.js +40 -0
- package/dist/models/PerformanceGoalMasterModel.d.ts +8 -0
- package/dist/models/PerformanceGoalMasterModel.js +45 -0
- package/dist/models/PerformanceManagementRequestModel.d.ts +34 -0
- package/dist/models/PerformanceManagementRequestModel.js +128 -0
- package/dist/models/PermissionModel.d.ts +18 -0
- package/dist/models/PermissionModel.js +68 -0
- package/dist/models/UUIDBaseModel.d.ts +14 -0
- package/dist/models/UUIDBaseModel.js +66 -0
- package/package.json +1 -1
- package/src/data-source.ts +13 -1
- package/src/index.ts +13 -1
- package/src/models/DepartmentDocumentOwnerModel.ts +25 -0
- package/src/models/DepartmentsModel.ts +25 -25
- package/src/models/DocumentAuditLogModel.ts +38 -0
- package/src/models/DocumentFolderModel.ts +37 -0
- package/src/models/DocumentModel.ts +65 -0
- package/src/models/DocumentPermissionModel.ts +32 -0
- package/src/models/DocumentTypeModel.ts +19 -0
- package/src/models/HumanResourceAnnualPlanningRequestModel.ts +108 -0
- package/src/models/HumanResourceAnnualPlanningTaskModel.ts +70 -0
- package/src/models/ITRequestChatModel.ts +62 -62
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/src/models/MissionTravelPassportExpiryNotificationConfigModel.ts +36 -36
- package/src/models/PerformanceCyclePeriodModel.ts +23 -0
- package/src/models/PerformanceGoalMasterModel.ts +27 -0
- package/src/models/PerformanceManagementRequestModel.ts +115 -0
- package/src/models/ServicesNotificationConfigModel.ts +55 -55
- package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
- package/dist/models/HotelreservationModal.d.ts +0 -30
- package/dist/models/HotelreservationModal.js +0 -119
- package/dist/models/ITApprovalSettings.d.ts +0 -7
- package/dist/models/ITApprovalSettings.js +0 -40
- package/dist/models/ITServicesTypesMuscatModel.d.ts +0 -6
- package/dist/models/ITServicesTypesSalalahModel.d.ts +0 -6
- package/dist/models/ITServicesTypesSalalahModel.js +0 -34
- package/dist/models/Workflows.d.ts +0 -0
- package/dist/models/Workflows.js +0 -31
|
@@ -0,0 +1,45 @@
|
|
|
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.PerformanceGoalMaster = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let PerformanceGoalMaster = class PerformanceGoalMaster extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(goal_title, goal_description, cycle_period_id) {
|
|
17
|
+
super();
|
|
18
|
+
this.goal_title = goal_title || "";
|
|
19
|
+
this.goal_description = goal_description || null;
|
|
20
|
+
this.cycle_period_id = cycle_period_id || 0;
|
|
21
|
+
this.is_active = true;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.PerformanceGoalMaster = PerformanceGoalMaster;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], PerformanceGoalMaster.prototype, "goal_title", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], PerformanceGoalMaster.prototype, "goal_description", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
35
|
+
(0, typeorm_1.Index)("idx_performance_goal_cycle_period_id"),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], PerformanceGoalMaster.prototype, "cycle_period_id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
40
|
+
__metadata("design:type", Boolean)
|
|
41
|
+
], PerformanceGoalMaster.prototype, "is_active", void 0);
|
|
42
|
+
exports.PerformanceGoalMaster = PerformanceGoalMaster = __decorate([
|
|
43
|
+
(0, typeorm_1.Entity)({ name: "performance_management_goals" }),
|
|
44
|
+
__metadata("design:paramtypes", [String, Object, Number])
|
|
45
|
+
], PerformanceGoalMaster);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
export declare enum PerformanceManagementRequestStatus {
|
|
3
|
+
PENDING = "Pending",
|
|
4
|
+
ASSIGNED = "Assigned",
|
|
5
|
+
IN_PROGRESS = "In Progress",
|
|
6
|
+
COMPLETED = "Completed",
|
|
7
|
+
APPROVED = "Approved",
|
|
8
|
+
REJECTED = "Rejected"
|
|
9
|
+
}
|
|
10
|
+
export declare enum PerformanceManagementCyclePeriod {
|
|
11
|
+
JAN_JUN = "Jan-Jun",
|
|
12
|
+
JUL_DEC = "Jul-Dec"
|
|
13
|
+
}
|
|
14
|
+
export declare class PerformanceManagementRequest extends BaseModel {
|
|
15
|
+
req_user_department_id: number | null;
|
|
16
|
+
req_user_section_id: number | null;
|
|
17
|
+
req_user_position_id: number | null;
|
|
18
|
+
user_id: number;
|
|
19
|
+
service_id: number | null;
|
|
20
|
+
sub_service_id: number | null;
|
|
21
|
+
status: PerformanceManagementRequestStatus;
|
|
22
|
+
reviewer_user_id: number | null;
|
|
23
|
+
assigned_to_user_id: number | null;
|
|
24
|
+
assigned_at: Date | null;
|
|
25
|
+
workflow_execution_id: string | null;
|
|
26
|
+
description: string | null;
|
|
27
|
+
goal_title: string;
|
|
28
|
+
goal_id: string;
|
|
29
|
+
goal_description: string;
|
|
30
|
+
cycle_period: PerformanceManagementCyclePeriod;
|
|
31
|
+
goal_weight: number;
|
|
32
|
+
cycle_year: number | null;
|
|
33
|
+
constructor(user_id: number, status?: PerformanceManagementRequestStatus, service_id?: number | null, sub_service_id?: number | null, req_user_department_id?: number | null, req_user_section_id?: number | null, req_user_position_id?: number | null, description?: string | null, reviewer_user_id?: number | null, assigned_to_user_id?: number | null, assigned_at?: Date | null, workflow_execution_id?: string | null, goal_title?: string, goal_id?: string, goal_description?: string, cycle_period?: PerformanceManagementCyclePeriod, goal_weight?: number, cycle_year?: number | null);
|
|
34
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
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.PerformanceManagementRequest = exports.PerformanceManagementCyclePeriod = exports.PerformanceManagementRequestStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var PerformanceManagementRequestStatus;
|
|
16
|
+
(function (PerformanceManagementRequestStatus) {
|
|
17
|
+
PerformanceManagementRequestStatus["PENDING"] = "Pending";
|
|
18
|
+
PerformanceManagementRequestStatus["ASSIGNED"] = "Assigned";
|
|
19
|
+
PerformanceManagementRequestStatus["IN_PROGRESS"] = "In Progress";
|
|
20
|
+
PerformanceManagementRequestStatus["COMPLETED"] = "Completed";
|
|
21
|
+
PerformanceManagementRequestStatus["APPROVED"] = "Approved";
|
|
22
|
+
PerformanceManagementRequestStatus["REJECTED"] = "Rejected";
|
|
23
|
+
})(PerformanceManagementRequestStatus || (exports.PerformanceManagementRequestStatus = PerformanceManagementRequestStatus = {}));
|
|
24
|
+
var PerformanceManagementCyclePeriod;
|
|
25
|
+
(function (PerformanceManagementCyclePeriod) {
|
|
26
|
+
PerformanceManagementCyclePeriod["JAN_JUN"] = "Jan-Jun";
|
|
27
|
+
PerformanceManagementCyclePeriod["JUL_DEC"] = "Jul-Dec";
|
|
28
|
+
})(PerformanceManagementCyclePeriod || (exports.PerformanceManagementCyclePeriod = PerformanceManagementCyclePeriod = {}));
|
|
29
|
+
let PerformanceManagementRequest = class PerformanceManagementRequest extends BaseModel_1.BaseModel {
|
|
30
|
+
constructor(user_id, status = PerformanceManagementRequestStatus.PENDING, service_id, sub_service_id, req_user_department_id, req_user_section_id, req_user_position_id, description, reviewer_user_id, assigned_to_user_id, assigned_at, workflow_execution_id, goal_title, goal_id, goal_description, cycle_period, goal_weight, cycle_year) {
|
|
31
|
+
super();
|
|
32
|
+
this.user_id = user_id;
|
|
33
|
+
this.status = status;
|
|
34
|
+
this.service_id = service_id || null;
|
|
35
|
+
this.sub_service_id = sub_service_id || null;
|
|
36
|
+
this.req_user_department_id = req_user_department_id || null;
|
|
37
|
+
this.req_user_section_id = req_user_section_id || null;
|
|
38
|
+
this.req_user_position_id = req_user_position_id || null;
|
|
39
|
+
this.description = description || null;
|
|
40
|
+
this.reviewer_user_id = reviewer_user_id || null;
|
|
41
|
+
this.assigned_to_user_id = assigned_to_user_id || null;
|
|
42
|
+
this.assigned_at = assigned_at || null;
|
|
43
|
+
this.workflow_execution_id = workflow_execution_id || null;
|
|
44
|
+
this.goal_title = goal_title || "";
|
|
45
|
+
this.goal_id = goal_id || "";
|
|
46
|
+
this.goal_description = goal_description || "";
|
|
47
|
+
this.cycle_period = cycle_period || PerformanceManagementCyclePeriod.JAN_JUN;
|
|
48
|
+
this.goal_weight = goal_weight || 0;
|
|
49
|
+
this.cycle_year = cycle_year || null;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
exports.PerformanceManagementRequest = PerformanceManagementRequest;
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], PerformanceManagementRequest.prototype, "req_user_department_id", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], PerformanceManagementRequest.prototype, "req_user_section_id", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], PerformanceManagementRequest.prototype, "req_user_position_id", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false }),
|
|
67
|
+
__metadata("design:type", Number)
|
|
68
|
+
], PerformanceManagementRequest.prototype, "user_id", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
71
|
+
__metadata("design:type", Object)
|
|
72
|
+
], PerformanceManagementRequest.prototype, "service_id", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
75
|
+
__metadata("design:type", Object)
|
|
76
|
+
], PerformanceManagementRequest.prototype, "sub_service_id", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.Column)({ type: "enum", enum: PerformanceManagementRequestStatus, default: PerformanceManagementRequestStatus.PENDING, nullable: false }),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], PerformanceManagementRequest.prototype, "status", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
83
|
+
__metadata("design:type", Object)
|
|
84
|
+
], PerformanceManagementRequest.prototype, "reviewer_user_id", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
87
|
+
__metadata("design:type", Object)
|
|
88
|
+
], PerformanceManagementRequest.prototype, "assigned_to_user_id", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
91
|
+
__metadata("design:type", Object)
|
|
92
|
+
], PerformanceManagementRequest.prototype, "assigned_at", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
95
|
+
__metadata("design:type", Object)
|
|
96
|
+
], PerformanceManagementRequest.prototype, "workflow_execution_id", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
99
|
+
__metadata("design:type", Object)
|
|
100
|
+
], PerformanceManagementRequest.prototype, "description", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], PerformanceManagementRequest.prototype, "goal_title", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: false }),
|
|
107
|
+
__metadata("design:type", String)
|
|
108
|
+
], PerformanceManagementRequest.prototype, "goal_id", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], PerformanceManagementRequest.prototype, "goal_description", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, typeorm_1.Column)({ type: "enum", enum: PerformanceManagementCyclePeriod, nullable: false }),
|
|
115
|
+
__metadata("design:type", String)
|
|
116
|
+
], PerformanceManagementRequest.prototype, "cycle_period", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: false, default: 0 }),
|
|
119
|
+
__metadata("design:type", Number)
|
|
120
|
+
], PerformanceManagementRequest.prototype, "goal_weight", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
123
|
+
__metadata("design:type", Object)
|
|
124
|
+
], PerformanceManagementRequest.prototype, "cycle_year", void 0);
|
|
125
|
+
exports.PerformanceManagementRequest = PerformanceManagementRequest = __decorate([
|
|
126
|
+
(0, typeorm_1.Entity)({ name: "performance_management_requests" }),
|
|
127
|
+
__metadata("design:paramtypes", [Number, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, String, String, String, String, Number, Object])
|
|
128
|
+
], PerformanceManagementRequest);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Role } from './role';
|
|
2
|
+
import { UUIDBaseModel } from './UUIDBaseModel';
|
|
3
|
+
export declare enum PermissionType {
|
|
4
|
+
VIEW = "view",
|
|
5
|
+
UPLOAD = "upload",
|
|
6
|
+
UPDATE = "update",
|
|
7
|
+
DELETE = "delete",
|
|
8
|
+
PUBLISH = "publish"
|
|
9
|
+
}
|
|
10
|
+
export declare class Permission extends UUIDBaseModel {
|
|
11
|
+
name: string;
|
|
12
|
+
code: string;
|
|
13
|
+
type: PermissionType;
|
|
14
|
+
description?: string;
|
|
15
|
+
is_active: boolean;
|
|
16
|
+
roles: Role[];
|
|
17
|
+
constructor(name: string, code: string, type: PermissionType, created_by: string, description?: string, is_active?: boolean);
|
|
18
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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.Permission = exports.PermissionType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const role_1 = require("./role");
|
|
15
|
+
const UUIDBaseModel_1 = require("./UUIDBaseModel");
|
|
16
|
+
var PermissionType;
|
|
17
|
+
(function (PermissionType) {
|
|
18
|
+
PermissionType["VIEW"] = "view";
|
|
19
|
+
PermissionType["UPLOAD"] = "upload";
|
|
20
|
+
PermissionType["UPDATE"] = "update";
|
|
21
|
+
PermissionType["DELETE"] = "delete";
|
|
22
|
+
PermissionType["PUBLISH"] = "publish";
|
|
23
|
+
})(PermissionType || (exports.PermissionType = PermissionType = {}));
|
|
24
|
+
let Permission = class Permission extends UUIDBaseModel_1.UUIDBaseModel {
|
|
25
|
+
constructor(name, code, type, created_by, description, is_active = true) {
|
|
26
|
+
super();
|
|
27
|
+
this.name = name;
|
|
28
|
+
this.code = code;
|
|
29
|
+
this.type = type;
|
|
30
|
+
this.created_by = created_by;
|
|
31
|
+
this.description = description;
|
|
32
|
+
this.is_active = is_active;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.Permission = Permission;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, unique: true }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], Permission.prototype, "name", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, unique: true }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Permission.prototype, "code", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: PermissionType }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], Permission.prototype, "type", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], Permission.prototype, "description", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], Permission.prototype, "is_active", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.ManyToMany)(() => role_1.Role),
|
|
58
|
+
(0, typeorm_1.JoinTable)({
|
|
59
|
+
name: 'role_permissions',
|
|
60
|
+
joinColumn: { name: 'permission_id', referencedColumnName: 'id' },
|
|
61
|
+
inverseJoinColumn: { name: 'role_id', referencedColumnName: 'id' },
|
|
62
|
+
}),
|
|
63
|
+
__metadata("design:type", Array)
|
|
64
|
+
], Permission.prototype, "roles", void 0);
|
|
65
|
+
exports.Permission = Permission = __decorate([
|
|
66
|
+
(0, typeorm_1.Entity)({ name: 'permissions' }),
|
|
67
|
+
__metadata("design:paramtypes", [String, String, String, String, String, Boolean])
|
|
68
|
+
], Permission);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare abstract class UUIDModel0 {
|
|
2
|
+
jsonIgnore: string[];
|
|
3
|
+
created_by?: string;
|
|
4
|
+
created_at?: Date;
|
|
5
|
+
updated_by?: string;
|
|
6
|
+
updated_at?: Date;
|
|
7
|
+
insertCreated(): void;
|
|
8
|
+
is_deleted?: boolean;
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
11
|
+
export declare abstract class UUIDBaseModel extends UUIDModel0 {
|
|
12
|
+
id: string;
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.UUIDBaseModel = exports.UUIDModel0 = void 0;
|
|
16
|
+
const moment_timezone_1 = __importDefault(require("moment-timezone"));
|
|
17
|
+
const typeorm_1 = require("typeorm");
|
|
18
|
+
class UUIDModel0 {
|
|
19
|
+
insertCreated() {
|
|
20
|
+
const currentTime = (0, moment_timezone_1.default)().utc().tz('Asia/Kolkata').toDate();
|
|
21
|
+
this.created_at = currentTime;
|
|
22
|
+
this.updated_at = currentTime;
|
|
23
|
+
}
|
|
24
|
+
constructor() {
|
|
25
|
+
this.jsonIgnore = ['logicalDelete', 'is_deleted', 'jsonIgnore'];
|
|
26
|
+
this.is_deleted = false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.UUIDModel0 = UUIDModel0;
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], UUIDModel0.prototype, "created_by", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.CreateDateColumn)({ type: "timestamptz", default: () => "CURRENT_TIMESTAMP" }),
|
|
36
|
+
__metadata("design:type", Date)
|
|
37
|
+
], UUIDModel0.prototype, "created_at", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], UUIDModel0.prototype, "updated_by", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.UpdateDateColumn)({ type: "timestamptz", default: () => "CURRENT_TIMESTAMP" }),
|
|
44
|
+
__metadata("design:type", Date)
|
|
45
|
+
], UUIDModel0.prototype, "updated_at", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
48
|
+
__metadata("design:type", Function),
|
|
49
|
+
__metadata("design:paramtypes", []),
|
|
50
|
+
__metadata("design:returntype", void 0)
|
|
51
|
+
], UUIDModel0.prototype, "insertCreated", null);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ nullable: true, default: false }),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], UUIDModel0.prototype, "is_deleted", void 0);
|
|
56
|
+
class UUIDBaseModel extends UUIDModel0 {
|
|
57
|
+
constructor() {
|
|
58
|
+
super();
|
|
59
|
+
this.id = ''; // This will be set by the database when the entity is saved
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.UUIDBaseModel = UUIDBaseModel;
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], UUIDBaseModel.prototype, "id", void 0);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -97,6 +97,12 @@ import { AssignTasksEmpApprovalDetails } from './models/AssignTasksEmpApprovalMo
|
|
|
97
97
|
import { AssignTasksEmpWorkFlow } from './models/AssignTasksEmpWorkflowModel';
|
|
98
98
|
import { AssignTasksEmpRequestAttachment } from './models/AssignTasksEmpAttachmentModel';
|
|
99
99
|
import { AssignTasksEmpRequestChat } from './models/AssignTasksEmpChatModel';
|
|
100
|
+
import { Document } from './models/DocumentModel';
|
|
101
|
+
import { DocumentFolder } from './models/DocumentFolderModel';
|
|
102
|
+
import { DocumentType } from './models/DocumentTypeModel';
|
|
103
|
+
import { DocumentPermission } from './models/DocumentPermissionModel';
|
|
104
|
+
import { DocumentAuditLog } from './models/DocumentAuditLogModel';
|
|
105
|
+
import { DepartmentDocumentOwner } from './models/DepartmentDocumentOwnerModel';
|
|
100
106
|
import { TrainingWorkFlow } from './models/TrainingWorkflowModel';
|
|
101
107
|
import { TrainingApprovalDetails } from './models/TrainingApprovalModel';
|
|
102
108
|
import { TrainingRequestChat } from './models/TrainingChatModel';
|
|
@@ -260,6 +266,12 @@ export const AppDataSource = new DataSource({
|
|
|
260
266
|
PromotionRequest,
|
|
261
267
|
AnnualIncrementRequest,
|
|
262
268
|
SkillsEnhancementRequest,
|
|
263
|
-
CityMaster
|
|
269
|
+
CityMaster,
|
|
270
|
+
Document,
|
|
271
|
+
DocumentFolder,
|
|
272
|
+
DocumentType,
|
|
273
|
+
DocumentPermission,
|
|
274
|
+
DocumentAuditLog,
|
|
275
|
+
DepartmentDocumentOwner
|
|
264
276
|
],
|
|
265
277
|
});
|
package/src/index.ts
CHANGED
|
@@ -237,4 +237,16 @@ export * from './models/AnnualIncrementRequestModel';
|
|
|
237
237
|
export { AnnualIncrementRequestStatus } from './models/AnnualIncrementRequestModel';
|
|
238
238
|
|
|
239
239
|
export * from './models/SkillsEnhancementRequestModel';
|
|
240
|
-
export { SkillsEnhancementRequestStatus } from './models/SkillsEnhancementRequestModel';
|
|
240
|
+
export { SkillsEnhancementRequestStatus } from './models/SkillsEnhancementRequestModel';
|
|
241
|
+
|
|
242
|
+
// Performance Management Service
|
|
243
|
+
export * from './models/PerformanceManagementRequestModel';
|
|
244
|
+
export { PerformanceManagementRequestStatus, PerformanceManagementCyclePeriod } from './models/PerformanceManagementRequestModel';
|
|
245
|
+
export * from './models/PerformanceCyclePeriodModel';
|
|
246
|
+
export * from './models/PerformanceGoalMasterModel';
|
|
247
|
+
|
|
248
|
+
// Human Resource Annual Planning Service
|
|
249
|
+
export * from './models/HumanResourceAnnualPlanningRequestModel';
|
|
250
|
+
export { HumanResourceAnnualPlanningRequestStatus, Quarter } from './models/HumanResourceAnnualPlanningRequestModel';
|
|
251
|
+
export * from './models/HumanResourceAnnualPlanningTaskModel';
|
|
252
|
+
export { RepeatFrequency, DurationUnit } from './models/HumanResourceAnnualPlanningTaskModel';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { Departments } from './DepartmentsModel';
|
|
4
|
+
import { User } from './user';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'department_document_owners' })
|
|
7
|
+
export class DepartmentDocumentOwner extends BaseModel {
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'integer', nullable: false, unique: true })
|
|
10
|
+
department_id: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'integer', nullable: false })
|
|
13
|
+
user_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'boolean', nullable: false, default: true })
|
|
16
|
+
is_active: boolean;
|
|
17
|
+
|
|
18
|
+
@ManyToOne(() => Departments)
|
|
19
|
+
@JoinColumn({ name: 'department_id' })
|
|
20
|
+
department?: Departments;
|
|
21
|
+
|
|
22
|
+
@ManyToOne(() => User)
|
|
23
|
+
@JoinColumn({ name: 'user_id' })
|
|
24
|
+
user?: User;
|
|
25
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
@Entity({ name: 'departments' })
|
|
5
|
-
export class Departments extends BaseModel {
|
|
6
|
-
|
|
7
|
-
@Column({ type: 'varchar', length: 64, nullable: false})
|
|
8
|
-
department_name: string;
|
|
9
|
-
|
|
10
|
-
@Column({ type: 'varchar', length: 64, nullable: false})
|
|
11
|
-
department_code: string;
|
|
12
|
-
|
|
13
|
-
@Column({ nullable: false })
|
|
14
|
-
department_description: string;
|
|
15
|
-
|
|
16
|
-
constructor(
|
|
17
|
-
department_name: string,
|
|
18
|
-
department_code: string,
|
|
19
|
-
department_description: string,
|
|
20
|
-
) {
|
|
21
|
-
super();
|
|
22
|
-
this.department_name = department_name
|
|
23
|
-
this.department_code = department_code
|
|
24
|
-
this.department_description = department_description
|
|
25
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'departments' })
|
|
5
|
+
export class Departments extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'varchar', length: 64, nullable: false})
|
|
8
|
+
department_name: string;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'varchar', length: 64, nullable: false})
|
|
11
|
+
department_code: string;
|
|
12
|
+
|
|
13
|
+
@Column({ nullable: false })
|
|
14
|
+
department_description: string;
|
|
15
|
+
|
|
16
|
+
constructor(
|
|
17
|
+
department_name: string,
|
|
18
|
+
department_code: string,
|
|
19
|
+
department_description: string,
|
|
20
|
+
) {
|
|
21
|
+
super();
|
|
22
|
+
this.department_name = department_name
|
|
23
|
+
this.department_code = department_code
|
|
24
|
+
this.department_description = department_description
|
|
25
|
+
}
|
|
26
26
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { User } from './user';
|
|
4
|
+
import { Document } from './DocumentModel';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'document_audit_logs' })
|
|
7
|
+
export class DocumentAuditLog extends BaseModel {
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'integer', nullable: false })
|
|
10
|
+
document_id: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'integer', nullable: false })
|
|
13
|
+
user_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({
|
|
16
|
+
type: 'varchar',
|
|
17
|
+
length: 50,
|
|
18
|
+
nullable: false
|
|
19
|
+
})
|
|
20
|
+
action_type: string;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'jsonb', nullable: true })
|
|
23
|
+
action_details?: any;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'varchar', length: 45, nullable: true })
|
|
26
|
+
ip_address?: string;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'text', nullable: true })
|
|
29
|
+
user_agent?: string;
|
|
30
|
+
|
|
31
|
+
@ManyToOne(() => Document)
|
|
32
|
+
@JoinColumn({ name: 'document_id' })
|
|
33
|
+
document?: Document;
|
|
34
|
+
|
|
35
|
+
@ManyToOne(() => User)
|
|
36
|
+
@JoinColumn({ name: 'user_id' })
|
|
37
|
+
user?: User;
|
|
38
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { Departments } from './DepartmentsModel';
|
|
4
|
+
import { Document } from './DocumentModel';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'document_folders' })
|
|
7
|
+
export class DocumentFolder extends BaseModel {
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
10
|
+
name: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'integer', nullable: false })
|
|
13
|
+
department_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'integer', nullable: true })
|
|
16
|
+
parent_folder_id?: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'text', nullable: true })
|
|
19
|
+
description?: string;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'boolean', nullable: false, default: true })
|
|
22
|
+
is_active: boolean;
|
|
23
|
+
|
|
24
|
+
@ManyToOne(() => Departments)
|
|
25
|
+
@JoinColumn({ name: 'department_id' })
|
|
26
|
+
department?: Departments;
|
|
27
|
+
|
|
28
|
+
@ManyToOne(() => DocumentFolder, { nullable: true })
|
|
29
|
+
@JoinColumn({ name: 'parent_folder_id' })
|
|
30
|
+
parentFolder?: DocumentFolder;
|
|
31
|
+
|
|
32
|
+
@OneToMany(() => DocumentFolder, folder => folder.parentFolder)
|
|
33
|
+
subFolders?: DocumentFolder[];
|
|
34
|
+
|
|
35
|
+
@OneToMany(() => Document, document => document.folder)
|
|
36
|
+
documents?: Document[];
|
|
37
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { Departments } from './DepartmentsModel';
|
|
4
|
+
import { DocumentFolder } from './DocumentFolderModel';
|
|
5
|
+
import { DocumentType } from './DocumentTypeModel';
|
|
6
|
+
import { DocumentPermission } from './DocumentPermissionModel';
|
|
7
|
+
import { DocumentAuditLog } from './DocumentAuditLogModel';
|
|
8
|
+
|
|
9
|
+
@Entity({ name: 'documents' })
|
|
10
|
+
export class Document extends BaseModel {
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'varchar', length: 200, nullable: false })
|
|
13
|
+
title: string;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'integer', nullable: false })
|
|
16
|
+
department_id: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'integer', nullable: false })
|
|
19
|
+
document_type_id: number;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'integer', nullable: true })
|
|
22
|
+
folder_id?: number;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
25
|
+
mongodb_file_id: string;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
28
|
+
file_name: string;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'bigint', nullable: false })
|
|
31
|
+
file_size: number;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
34
|
+
file_type?: string;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'integer', nullable: false, default: 1 })
|
|
37
|
+
version: number;
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'text', nullable: true })
|
|
40
|
+
description?: string;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'boolean', nullable: false, default: false })
|
|
43
|
+
is_sensitive: boolean;
|
|
44
|
+
|
|
45
|
+
@Column({ type: 'boolean', nullable: false, default: true })
|
|
46
|
+
is_active: boolean;
|
|
47
|
+
|
|
48
|
+
@ManyToOne(() => Departments)
|
|
49
|
+
@JoinColumn({ name: 'department_id' })
|
|
50
|
+
department?: Departments;
|
|
51
|
+
|
|
52
|
+
@ManyToOne(() => DocumentType)
|
|
53
|
+
@JoinColumn({ name: 'document_type_id' })
|
|
54
|
+
documentType?: DocumentType;
|
|
55
|
+
|
|
56
|
+
@ManyToOne(() => DocumentFolder, { nullable: true })
|
|
57
|
+
@JoinColumn({ name: 'folder_id' })
|
|
58
|
+
folder?: DocumentFolder;
|
|
59
|
+
|
|
60
|
+
@OneToMany(() => DocumentPermission, permission => permission.document)
|
|
61
|
+
permissions?: DocumentPermission[];
|
|
62
|
+
|
|
63
|
+
@OneToMany(() => DocumentAuditLog, log => log.document)
|
|
64
|
+
auditLogs?: DocumentAuditLog[];
|
|
65
|
+
}
|