@platform-modules/foreign-ministry 1.1.111 → 1.1.112
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 +1 -41
- package/dist/index.d.ts +10 -0
- package/dist/index.js +12 -1
- package/dist/models/DiplomaticApprovalsModel.d.ts +24 -0
- package/dist/models/DiplomaticApprovalsModel.js +94 -0
- package/dist/models/DiplomaticAttachmentsModel.d.ts +11 -0
- package/dist/models/DiplomaticAttachmentsModel.js +53 -0
- package/dist/models/DiplomaticChatsModel.d.ts +20 -0
- package/dist/models/DiplomaticChatsModel.js +70 -0
- package/dist/models/DiplomaticClubCardMembersModel.d.ts +26 -0
- package/dist/models/DiplomaticClubCardMembersModel.js +85 -0
- package/dist/models/DiplomaticClubSubscriptionMasterModel.d.ts +12 -0
- package/dist/models/DiplomaticClubSubscriptionMasterModel.js +64 -0
- package/dist/models/DiplomaticRequestsModel.d.ts +54 -0
- package/dist/models/DiplomaticRequestsModel.js +186 -0
- package/dist/models/DiplomaticTitlesMasterModel.d.ts +6 -1
- package/dist/models/DiplomaticTitlesMasterModel.js +13 -3
- package/dist/models/DiplomaticWorkFlowModel.d.ts +20 -0
- package/dist/models/DiplomaticWorkFlowModel.js +77 -0
- package/package.json +1 -1
- package/src/data-source.ts +1 -43
- package/src/index.ts +10 -0
- package/src/models/DiplomaticApprovalsModel.ts +77 -0
- package/src/models/DiplomaticAttachmentsModel.ts +37 -0
- package/src/models/DiplomaticChatsModel.ts +53 -0
- package/src/models/DiplomaticClubCardMembersModel.ts +71 -0
- package/src/models/DiplomaticClubSubscriptionMasterModel.ts +50 -0
- package/src/models/DiplomaticRequestsModel.ts +154 -0
- package/src/models/DiplomaticTitlesMasterModel.ts +10 -1
- package/src/models/DiplomaticWorkFlowModel.ts +59 -0
|
@@ -0,0 +1,186 @@
|
|
|
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.DiplomaticRequests = exports.DiplomaticRequestStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var DiplomaticRequestStatus;
|
|
16
|
+
(function (DiplomaticRequestStatus) {
|
|
17
|
+
DiplomaticRequestStatus["DRAFT"] = "Draft";
|
|
18
|
+
DiplomaticRequestStatus["SUBMITTED"] = "Submitted";
|
|
19
|
+
DiplomaticRequestStatus["PENDING"] = "Pending";
|
|
20
|
+
DiplomaticRequestStatus["IN_PROGRESS"] = "In Progress";
|
|
21
|
+
DiplomaticRequestStatus["APPROVED"] = "Approved";
|
|
22
|
+
DiplomaticRequestStatus["REJECTED"] = "Rejected";
|
|
23
|
+
DiplomaticRequestStatus["COMPLETED"] = "Completed";
|
|
24
|
+
DiplomaticRequestStatus["CANCELLED"] = "Cancelled";
|
|
25
|
+
})(DiplomaticRequestStatus || (exports.DiplomaticRequestStatus = DiplomaticRequestStatus = {}));
|
|
26
|
+
let DiplomaticRequests = class DiplomaticRequests extends BaseModel_1.BaseModel {
|
|
27
|
+
constructor(user_id, employee_id, employee_name, email_address, contact_number, service_id, sub_service_id, section_id, reporting_manager) {
|
|
28
|
+
super();
|
|
29
|
+
this.user_id = user_id;
|
|
30
|
+
this.employee_id = employee_id;
|
|
31
|
+
this.employee_name = employee_name;
|
|
32
|
+
this.email_address = email_address;
|
|
33
|
+
this.contact_number = contact_number;
|
|
34
|
+
this.request_date = new Date();
|
|
35
|
+
this.request_status = DiplomaticRequestStatus.PENDING;
|
|
36
|
+
this.service_id = service_id;
|
|
37
|
+
this.sub_service_id = sub_service_id;
|
|
38
|
+
this.section_id = section_id;
|
|
39
|
+
this.reporting_manager = reporting_manager;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.DiplomaticRequests = DiplomaticRequests;
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'int' }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], DiplomaticRequests.prototype, "user_id", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100 }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], DiplomaticRequests.prototype, "employee_id", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], DiplomaticRequests.prototype, "employee_name", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
57
|
+
__metadata("design:type", Object)
|
|
58
|
+
], DiplomaticRequests.prototype, "grade", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], DiplomaticRequests.prototype, "designation_id", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], DiplomaticRequests.prototype, "department_id", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], DiplomaticRequests.prototype, "email_address", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 20 }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], DiplomaticRequests.prototype, "contact_number", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
77
|
+
__metadata("design:type", Date)
|
|
78
|
+
], DiplomaticRequests.prototype, "request_date", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: DiplomaticRequestStatus, default: DiplomaticRequestStatus.PENDING }),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], DiplomaticRequests.prototype, "request_status", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
|
|
85
|
+
__metadata("design:type", Object)
|
|
86
|
+
], DiplomaticRequests.prototype, "request_close_date", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
89
|
+
__metadata("design:type", Object)
|
|
90
|
+
], DiplomaticRequests.prototype, "end_date", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
93
|
+
__metadata("design:type", Object)
|
|
94
|
+
], DiplomaticRequests.prototype, "remarks", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
97
|
+
__metadata("design:type", Object)
|
|
98
|
+
], DiplomaticRequests.prototype, "current_approval_level", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
101
|
+
__metadata("design:type", Object)
|
|
102
|
+
], DiplomaticRequests.prototype, "current_approver_id", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
105
|
+
__metadata("design:type", Object)
|
|
106
|
+
], DiplomaticRequests.prototype, "service_id", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
109
|
+
__metadata("design:type", Object)
|
|
110
|
+
], DiplomaticRequests.prototype, "sub_service_id", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
113
|
+
__metadata("design:type", Object)
|
|
114
|
+
], DiplomaticRequests.prototype, "member_name", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
117
|
+
__metadata("design:type", Object)
|
|
118
|
+
], DiplomaticRequests.prototype, "membership_type", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
121
|
+
__metadata("design:type", Object)
|
|
122
|
+
], DiplomaticRequests.prototype, "diplomatic_title_id", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
125
|
+
__metadata("design:type", Object)
|
|
126
|
+
], DiplomaticRequests.prototype, "location", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
129
|
+
__metadata("design:type", Object)
|
|
130
|
+
], DiplomaticRequests.prototype, "request_type", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
133
|
+
__metadata("design:type", Object)
|
|
134
|
+
], DiplomaticRequests.prototype, "expiry_date", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
137
|
+
__metadata("design:type", Object)
|
|
138
|
+
], DiplomaticRequests.prototype, "photo_url", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
141
|
+
__metadata("design:type", Object)
|
|
142
|
+
], DiplomaticRequests.prototype, "membership_id", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
145
|
+
__metadata("design:type", Object)
|
|
146
|
+
], DiplomaticRequests.prototype, "organization", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: true }),
|
|
149
|
+
__metadata("design:type", Object)
|
|
150
|
+
], DiplomaticRequests.prototype, "subscription_amount", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
153
|
+
__metadata("design:type", Object)
|
|
154
|
+
], DiplomaticRequests.prototype, "section_id", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
157
|
+
__metadata("design:type", Object)
|
|
158
|
+
], DiplomaticRequests.prototype, "reporting_manager", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
161
|
+
__metadata("design:type", Object)
|
|
162
|
+
], DiplomaticRequests.prototype, "workflow_execution_id", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, typeorm_1.OneToMany)('DiplomaticClubCardMembers', 'diplomaticRequest', { nullable: true }),
|
|
165
|
+
__metadata("design:type", Array)
|
|
166
|
+
], DiplomaticRequests.prototype, "diplomaticClubCardMembers", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
(0, typeorm_1.OneToMany)('DiplomaticApprovals', 'diplomaticRequest'),
|
|
169
|
+
__metadata("design:type", Array)
|
|
170
|
+
], DiplomaticRequests.prototype, "approvals", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
(0, typeorm_1.OneToMany)('DiplomaticWorkFlow', 'diplomaticRequest'),
|
|
173
|
+
__metadata("design:type", Array)
|
|
174
|
+
], DiplomaticRequests.prototype, "workflows", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
(0, typeorm_1.OneToMany)('DiplomaticAttachments', 'diplomaticRequest'),
|
|
177
|
+
__metadata("design:type", Array)
|
|
178
|
+
], DiplomaticRequests.prototype, "attachments", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
(0, typeorm_1.OneToMany)('DiplomaticChats', 'diplomaticRequest'),
|
|
181
|
+
__metadata("design:type", Array)
|
|
182
|
+
], DiplomaticRequests.prototype, "chats", void 0);
|
|
183
|
+
exports.DiplomaticRequests = DiplomaticRequests = __decorate([
|
|
184
|
+
(0, typeorm_1.Entity)({ name: 'diplomatic_requests' }),
|
|
185
|
+
__metadata("design:paramtypes", [Number, String, String, String, String, Object, Object, Object, Object])
|
|
186
|
+
], DiplomaticRequests);
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum TitleCategory {
|
|
3
|
+
EMPLOYEE = "Employee",
|
|
4
|
+
NON_EMPLOYEE = "Non Employee"
|
|
5
|
+
}
|
|
2
6
|
export declare class DiplomaticTitlesMaster extends BaseModel {
|
|
3
7
|
title: string;
|
|
4
8
|
title_in_arabic: string | null;
|
|
9
|
+
category: TitleCategory;
|
|
5
10
|
description: string | null;
|
|
6
11
|
is_active: boolean;
|
|
7
12
|
display_order: number;
|
|
8
|
-
constructor(title: string);
|
|
13
|
+
constructor(title: string, category: TitleCategory);
|
|
9
14
|
}
|
|
@@ -9,13 +9,19 @@ 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.DiplomaticTitlesMaster = void 0;
|
|
12
|
+
exports.DiplomaticTitlesMaster = exports.TitleCategory = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var TitleCategory;
|
|
16
|
+
(function (TitleCategory) {
|
|
17
|
+
TitleCategory["EMPLOYEE"] = "Employee";
|
|
18
|
+
TitleCategory["NON_EMPLOYEE"] = "Non Employee";
|
|
19
|
+
})(TitleCategory || (exports.TitleCategory = TitleCategory = {}));
|
|
15
20
|
let DiplomaticTitlesMaster = class DiplomaticTitlesMaster extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(title) {
|
|
21
|
+
constructor(title, category) {
|
|
17
22
|
super();
|
|
18
23
|
this.title = title;
|
|
24
|
+
this.category = category;
|
|
19
25
|
this.is_active = true;
|
|
20
26
|
this.display_order = 0;
|
|
21
27
|
}
|
|
@@ -29,6 +35,10 @@ __decorate([
|
|
|
29
35
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
30
36
|
__metadata("design:type", Object)
|
|
31
37
|
], DiplomaticTitlesMaster.prototype, "title_in_arabic", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: TitleCategory, nullable: false }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], DiplomaticTitlesMaster.prototype, "category", void 0);
|
|
32
42
|
__decorate([
|
|
33
43
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
34
44
|
__metadata("design:type", Object)
|
|
@@ -43,5 +53,5 @@ __decorate([
|
|
|
43
53
|
], DiplomaticTitlesMaster.prototype, "display_order", void 0);
|
|
44
54
|
exports.DiplomaticTitlesMaster = DiplomaticTitlesMaster = __decorate([
|
|
45
55
|
(0, typeorm_1.Entity)({ name: 'diplomatic_titles_master' }),
|
|
46
|
-
__metadata("design:paramtypes", [String])
|
|
56
|
+
__metadata("design:paramtypes", [String, String])
|
|
47
57
|
], DiplomaticTitlesMaster);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { DiplomaticRequests } from "./DiplomaticRequestsModel";
|
|
3
|
+
export declare enum DiplomaticWorkFlowStatus {
|
|
4
|
+
COMPLETED = "Completed",
|
|
5
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
6
|
+
PENDING = "Pending"
|
|
7
|
+
}
|
|
8
|
+
export declare class DiplomaticWorkFlow extends BaseModel {
|
|
9
|
+
diplomatic_request_id: number;
|
|
10
|
+
service_id: number | null;
|
|
11
|
+
sub_service_id: number | null;
|
|
12
|
+
content: string;
|
|
13
|
+
status: DiplomaticWorkFlowStatus;
|
|
14
|
+
user_id: number | null;
|
|
15
|
+
step_order: number | null;
|
|
16
|
+
diplomatic_approval_id: number | null;
|
|
17
|
+
approved_by_role_id: number | null;
|
|
18
|
+
diplomaticRequest?: DiplomaticRequests;
|
|
19
|
+
constructor(diplomatic_request_id: number, content: string, status: DiplomaticWorkFlowStatus, user_id: number | null, step_order: number | null);
|
|
20
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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.DiplomaticWorkFlow = exports.DiplomaticWorkFlowStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const DiplomaticRequestsModel_1 = require("./DiplomaticRequestsModel");
|
|
16
|
+
var DiplomaticWorkFlowStatus;
|
|
17
|
+
(function (DiplomaticWorkFlowStatus) {
|
|
18
|
+
DiplomaticWorkFlowStatus["COMPLETED"] = "Completed";
|
|
19
|
+
DiplomaticWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
20
|
+
DiplomaticWorkFlowStatus["PENDING"] = "Pending";
|
|
21
|
+
})(DiplomaticWorkFlowStatus || (exports.DiplomaticWorkFlowStatus = DiplomaticWorkFlowStatus = {}));
|
|
22
|
+
let DiplomaticWorkFlow = class DiplomaticWorkFlow extends BaseModel_1.BaseModel {
|
|
23
|
+
constructor(diplomatic_request_id, content, status, user_id, step_order) {
|
|
24
|
+
super();
|
|
25
|
+
this.diplomatic_request_id = diplomatic_request_id;
|
|
26
|
+
this.content = content;
|
|
27
|
+
this.status = status;
|
|
28
|
+
this.user_id = user_id;
|
|
29
|
+
this.step_order = step_order;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.DiplomaticWorkFlow = DiplomaticWorkFlow;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'int' }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], DiplomaticWorkFlow.prototype, "diplomatic_request_id", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
39
|
+
__metadata("design:type", Object)
|
|
40
|
+
], DiplomaticWorkFlow.prototype, "service_id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], DiplomaticWorkFlow.prototype, "sub_service_id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], DiplomaticWorkFlow.prototype, "content", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: DiplomaticWorkFlowStatus, default: DiplomaticWorkFlowStatus.NOT_YET_STARTED }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], DiplomaticWorkFlow.prototype, "status", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], DiplomaticWorkFlow.prototype, "user_id", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], DiplomaticWorkFlow.prototype, "step_order", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], DiplomaticWorkFlow.prototype, "diplomatic_approval_id", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], DiplomaticWorkFlow.prototype, "approved_by_role_id", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.ManyToOne)(() => DiplomaticRequestsModel_1.DiplomaticRequests, dr => dr.workflows),
|
|
71
|
+
(0, typeorm_1.JoinColumn)({ name: 'diplomatic_request_id' }),
|
|
72
|
+
__metadata("design:type", DiplomaticRequestsModel_1.DiplomaticRequests)
|
|
73
|
+
], DiplomaticWorkFlow.prototype, "diplomaticRequest", void 0);
|
|
74
|
+
exports.DiplomaticWorkFlow = DiplomaticWorkFlow = __decorate([
|
|
75
|
+
(0, typeorm_1.Entity)({ name: 'diplomatic_workflows' }),
|
|
76
|
+
__metadata("design:paramtypes", [Number, String, String, Object, Object])
|
|
77
|
+
], DiplomaticWorkFlow);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -127,28 +127,6 @@ import { Group } from './models/GroupModel';
|
|
|
127
127
|
import { WorkSchedule } from './models/WorkScheduleModel';
|
|
128
128
|
import { Jobs } from './models/JobsModel';
|
|
129
129
|
import { TelephoneDirectory } from './models/TelephoneDirectoryModel'
|
|
130
|
-
import { MandCMaster } from './models/M&CMasterModel'
|
|
131
|
-
import { LeaveBalance } from './models/LeaveBalanceModel'
|
|
132
|
-
import { LeaveConfiguration } from './models/LeaveConfigModel'
|
|
133
|
-
import { LeaveConfigurationGrades } from './models/LeaveConfigGradesModel'
|
|
134
|
-
import { LeaveTransaction } from './models/LeaveTransactionModel'
|
|
135
|
-
import { EarlyCheckoutBalance } from './models/EarlyCheckoutBalanceModel'
|
|
136
|
-
import { EarlyCheckoutConfiguration } from './models/EarlyCheckoutConfigModel'
|
|
137
|
-
import { EarlyCheckoutTransaction } from './models/EarlyCheckoutTransactionModel'
|
|
138
|
-
import { StayAfterHoursBalance } from './models/StayAfterHoursBalanceModel'
|
|
139
|
-
import { StayAfterHoursTransaction } from './models/StayAfterHoursTransactionModel'
|
|
140
|
-
import {StationeryRequests} from './models/StationeryRequestsModel'
|
|
141
|
-
import {StationeryMaterialMaster} from './models/StationeryMaterialMasterModel'
|
|
142
|
-
import { ProfileUpdateRequests } from './models/ProfileUpdateRequestsModel'
|
|
143
|
-
import { UserPersonalDetails } from './models/UserPersonalDetailsModel'
|
|
144
|
-
import { UserEmploymentDetails } from './models/UserEmploymentDetailsModel'
|
|
145
|
-
import { UserEducationDetails } from './models/UserEducationDetailsModel'
|
|
146
|
-
import { DiplomaticTitlesMaster } from './models/DiplomaticTitlesMasterModel'
|
|
147
|
-
import { CountryMaster } from './models/CountryMasterModel'
|
|
148
|
-
import { NationalityMaster } from './models/NationalityMasterModel'
|
|
149
|
-
import { OfficeMaster } from './models/OfficeMasterModel'
|
|
150
|
-
|
|
151
|
-
|
|
152
130
|
export const AppDataSource = new DataSource({
|
|
153
131
|
type: 'postgres',
|
|
154
132
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -275,26 +253,6 @@ export const AppDataSource = new DataSource({
|
|
|
275
253
|
Group,
|
|
276
254
|
WorkSchedule,
|
|
277
255
|
Jobs,
|
|
278
|
-
TelephoneDirectory
|
|
279
|
-
MandCMaster,
|
|
280
|
-
LeaveBalance,
|
|
281
|
-
LeaveConfiguration,
|
|
282
|
-
LeaveConfigurationGrades,
|
|
283
|
-
LeaveTransaction,
|
|
284
|
-
EarlyCheckoutBalance,
|
|
285
|
-
EarlyCheckoutConfiguration,
|
|
286
|
-
EarlyCheckoutTransaction,
|
|
287
|
-
StayAfterHoursBalance,
|
|
288
|
-
StayAfterHoursTransaction,
|
|
289
|
-
StationeryRequests,
|
|
290
|
-
StationeryMaterialMaster,
|
|
291
|
-
ProfileUpdateRequests,
|
|
292
|
-
UserPersonalDetails,
|
|
293
|
-
UserEmploymentDetails,
|
|
294
|
-
UserEducationDetails,
|
|
295
|
-
DiplomaticTitlesMaster,
|
|
296
|
-
CountryMaster,
|
|
297
|
-
NationalityMaster,
|
|
298
|
-
OfficeMaster
|
|
256
|
+
TelephoneDirectory
|
|
299
257
|
],
|
|
300
258
|
});
|
package/src/index.ts
CHANGED
|
@@ -121,6 +121,15 @@ export * from './models/GroupNamesModel';
|
|
|
121
121
|
export * from './models/GroupModel';
|
|
122
122
|
export * from './models/WorkScheduleModel';
|
|
123
123
|
export * from './models/JobsModel';
|
|
124
|
+
export * from './models/TelephoneDirectoryModel';
|
|
125
|
+
export * from './models/DiplomaticRequestsModel';
|
|
126
|
+
export * from './models/DiplomaticApprovalsModel';
|
|
127
|
+
export * from './models/DiplomaticWorkFlowModel';
|
|
128
|
+
export * from './models/DiplomaticAttachmentsModel';
|
|
129
|
+
export * from './models/DiplomaticChatsModel';
|
|
130
|
+
export * from './models/DiplomaticClubCardMembersModel';
|
|
131
|
+
export * from './models/DiplomaticTitlesMasterModel';
|
|
132
|
+
export * from './models/DiplomaticClubSubscriptionMasterModel';
|
|
124
133
|
export * from './models/M&CMasterModel';
|
|
125
134
|
export * from './models/LeaveBalanceModel';
|
|
126
135
|
export * from './models/LeaveConfigModel';
|
|
@@ -148,6 +157,7 @@ export * from './models/UserEmploymentDetailsModel';
|
|
|
148
157
|
export * from './models/UserEducationDetailsModel';
|
|
149
158
|
export { ProfileUpdateRequestStatus } from './models/ProfileUpdateRequestsModel';
|
|
150
159
|
export * from './models/DiplomaticTitlesMasterModel';
|
|
160
|
+
export { TitleCategory } from './models/DiplomaticTitlesMasterModel';
|
|
151
161
|
export * from './models/CountryMasterModel';
|
|
152
162
|
export * from './models/NationalityMasterModel';
|
|
153
163
|
export * from './models/OfficeMasterModel';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { DiplomaticRequests } from "./DiplomaticRequestsModel";
|
|
4
|
+
|
|
5
|
+
export enum DiplomaticApprovalStatus {
|
|
6
|
+
PENDING = "Pending",
|
|
7
|
+
APPROVED = "Approved",
|
|
8
|
+
REJECTED = "Rejected",
|
|
9
|
+
IN_PROGRESS = "In Progress"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Entity({ name: 'diplomatic_approvals' })
|
|
13
|
+
export class DiplomaticApprovals extends BaseModel {
|
|
14
|
+
@Column({ type: 'int' })
|
|
15
|
+
diplomatic_request_id: number;
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'int' })
|
|
18
|
+
level: number;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'int', nullable: true })
|
|
21
|
+
approver_user_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'int' })
|
|
24
|
+
approver_role_id: number;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'text', nullable: true })
|
|
27
|
+
comment: string | null;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'enum', enum: DiplomaticApprovalStatus, default: DiplomaticApprovalStatus.PENDING })
|
|
30
|
+
approval_status: DiplomaticApprovalStatus;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'timestamp', nullable: true })
|
|
33
|
+
action_date: Date;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'int', nullable: true })
|
|
36
|
+
department_id: number | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'int', nullable: true })
|
|
39
|
+
section_id: number | null;
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'int', nullable: true })
|
|
42
|
+
approved_by: number | null;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'int', nullable: true })
|
|
45
|
+
delegate_user_id: number | null;
|
|
46
|
+
|
|
47
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
48
|
+
is_allowed: boolean;
|
|
49
|
+
|
|
50
|
+
@ManyToOne(() => DiplomaticRequests, dr => dr.approvals)
|
|
51
|
+
@JoinColumn({ name: 'diplomatic_request_id' })
|
|
52
|
+
diplomaticRequest?: DiplomaticRequests;
|
|
53
|
+
|
|
54
|
+
constructor(
|
|
55
|
+
diplomatic_request_id: number,
|
|
56
|
+
level: number,
|
|
57
|
+
approver_role_id: number,
|
|
58
|
+
approval_status: DiplomaticApprovalStatus,
|
|
59
|
+
department_id: number | null,
|
|
60
|
+
section_id: number | null,
|
|
61
|
+
approved_by: number | null,
|
|
62
|
+
delegate_user_id: number | null,
|
|
63
|
+
is_allowed: boolean = true
|
|
64
|
+
) {
|
|
65
|
+
super();
|
|
66
|
+
this.diplomatic_request_id = diplomatic_request_id;
|
|
67
|
+
this.level = level;
|
|
68
|
+
this.approver_role_id = approver_role_id;
|
|
69
|
+
this.approval_status = approval_status;
|
|
70
|
+
this.department_id = department_id;
|
|
71
|
+
this.section_id = section_id;
|
|
72
|
+
this.approved_by = approved_by;
|
|
73
|
+
this.delegate_user_id = delegate_user_id;
|
|
74
|
+
this.is_allowed = is_allowed;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { DiplomaticRequests } from "./DiplomaticRequestsModel";
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'diplomatic_attachments' })
|
|
6
|
+
export class DiplomaticAttachments extends BaseModel {
|
|
7
|
+
@Column({ type: 'int' })
|
|
8
|
+
diplomatic_request_id: number;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'varchar', length: 500 })
|
|
11
|
+
file_url: string;
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
14
|
+
file_name: string;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
17
|
+
file_type: string;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'bigint', nullable: true })
|
|
20
|
+
file_size: number | null;
|
|
21
|
+
|
|
22
|
+
@ManyToOne(() => DiplomaticRequests, dr => dr.attachments)
|
|
23
|
+
@JoinColumn({ name: 'diplomatic_request_id' })
|
|
24
|
+
diplomaticRequest?: DiplomaticRequests;
|
|
25
|
+
|
|
26
|
+
constructor(
|
|
27
|
+
diplomatic_request_id: number,
|
|
28
|
+
file_url: string,
|
|
29
|
+
file_name: string
|
|
30
|
+
) {
|
|
31
|
+
super();
|
|
32
|
+
this.diplomatic_request_id = diplomatic_request_id;
|
|
33
|
+
this.file_url = file_url;
|
|
34
|
+
this.file_name = file_name;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { DiplomaticRequests } from "./DiplomaticRequestsModel";
|
|
4
|
+
|
|
5
|
+
export enum DiplomaticMessageType {
|
|
6
|
+
TEXT = "text",
|
|
7
|
+
IMAGE = "image",
|
|
8
|
+
VIDEO = "video",
|
|
9
|
+
FILE = "file",
|
|
10
|
+
AUDIO = "audio"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@Entity({ name: 'diplomatic_chats' })
|
|
14
|
+
export class DiplomaticChats extends BaseModel {
|
|
15
|
+
@Column({ type: 'int' })
|
|
16
|
+
diplomatic_request_id: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'text' })
|
|
19
|
+
content: string;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'int' })
|
|
22
|
+
sender_user_id: number;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'int', nullable: true })
|
|
25
|
+
role_id: number | null;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
28
|
+
status: string | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
31
|
+
message_type: DiplomaticMessageType | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'int', nullable: true })
|
|
34
|
+
sender_role_id: number | null;
|
|
35
|
+
|
|
36
|
+
@ManyToOne(() => DiplomaticRequests, dr => dr.chats)
|
|
37
|
+
@JoinColumn({ name: 'diplomatic_request_id' })
|
|
38
|
+
diplomaticRequest?: DiplomaticRequests;
|
|
39
|
+
|
|
40
|
+
constructor(
|
|
41
|
+
diplomatic_request_id: number,
|
|
42
|
+
content: string,
|
|
43
|
+
sender_user_id: number,
|
|
44
|
+
sender_role_id: number
|
|
45
|
+
) {
|
|
46
|
+
super();
|
|
47
|
+
this.diplomatic_request_id = diplomatic_request_id;
|
|
48
|
+
this.content = content;
|
|
49
|
+
this.sender_user_id = sender_user_id;
|
|
50
|
+
this.sender_role_id = sender_role_id;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { DiplomaticRequests } from "./DiplomaticRequestsModel";
|
|
4
|
+
|
|
5
|
+
export enum MembershipType {
|
|
6
|
+
SINGLE = "Single",
|
|
7
|
+
FAMILY = "Family"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export enum RequestType {
|
|
11
|
+
EMPLOYEE_SELF = "Employee Self",
|
|
12
|
+
NON_EMPLOYEE = "Non Employee"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export enum MemberType {
|
|
16
|
+
PRIMARY = "Primary",
|
|
17
|
+
FAMILY_MEMBER = "Family Member"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@Entity({ name: 'diplomatic_club_card_members' })
|
|
21
|
+
export class DiplomaticClubCardMembers extends BaseModel {
|
|
22
|
+
@Column({ type: 'int' })
|
|
23
|
+
diplomatic_request_id: number;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'varchar', length: 255 })
|
|
26
|
+
family_member_name: string;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
29
|
+
relation: string | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
32
|
+
title: string | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'int', nullable: true })
|
|
35
|
+
diplomatic_title_id: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'date', nullable: true })
|
|
38
|
+
expiry_date: Date | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
41
|
+
photo_url: string | null;
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
44
|
+
membership_id: string | null;
|
|
45
|
+
|
|
46
|
+
@ManyToOne(() => DiplomaticRequests, dr => dr.diplomaticClubCardMembers)
|
|
47
|
+
@JoinColumn({ name: 'diplomatic_request_id' })
|
|
48
|
+
diplomaticRequest?: DiplomaticRequests;
|
|
49
|
+
|
|
50
|
+
constructor(
|
|
51
|
+
diplomatic_request_id: number,
|
|
52
|
+
family_member_name: string,
|
|
53
|
+
relation?: string | null,
|
|
54
|
+
title?: string | null,
|
|
55
|
+
diplomatic_title_id?: number | null,
|
|
56
|
+
expiry_date?: Date | null,
|
|
57
|
+
photo_url?: string | null,
|
|
58
|
+
membership_id?: string | null
|
|
59
|
+
) {
|
|
60
|
+
super();
|
|
61
|
+
this.diplomatic_request_id = diplomatic_request_id;
|
|
62
|
+
this.family_member_name = family_member_name;
|
|
63
|
+
this.relation = relation || null;
|
|
64
|
+
this.title = title || null;
|
|
65
|
+
this.diplomatic_title_id = diplomatic_title_id || null;
|
|
66
|
+
this.expiry_date = expiry_date || null;
|
|
67
|
+
this.photo_url = photo_url || null;
|
|
68
|
+
this.membership_id = membership_id || null;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|