@platform-modules/foreign-ministry 1.2.13 → 1.2.14
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 +7 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/models/DiplomaticClubSubscriptionMasterModel.d.ts +7 -2
- package/dist/models/DiplomaticClubSubscriptionMasterModel.js +29 -4
- package/dist/models/DiplomaticTitlesMasterModel.d.ts +4 -0
- package/dist/models/DiplomaticTitlesMasterModel.js +18 -0
- package/dist/models/RoutingGroupUsersModel.d.ts +7 -0
- package/dist/models/{DiplomaticClubCardChatModel.js → RoutingGroupUsersModel.js} +20 -17
- package/package.json +1 -1
- package/src/data-source.ts +8 -1
- package/src/index.ts +2 -0
- package/src/models/DiplomaticClubSubscriptionMasterModel.ts +26 -2
- package/src/models/DiplomaticRequestsModel.ts +154 -154
- package/src/models/DiplomaticTitlesMasterModel.ts +14 -0
- package/src/models/RoutingGroupUsersModel.ts +26 -0
- package/dist/models/DiplomaticClubCardApprovalModel.d.ts +0 -16
- package/dist/models/DiplomaticClubCardApprovalModel.js +0 -58
- package/dist/models/DiplomaticClubCardAttachmentModel.d.ts +0 -9
- package/dist/models/DiplomaticClubCardAttachmentModel.js +0 -44
- package/dist/models/DiplomaticClubCardChatModel.d.ts +0 -7
- package/dist/models/DiplomaticClubCardMemberModel.d.ts +0 -13
- package/dist/models/DiplomaticClubCardMemberModel.js +0 -60
- package/dist/models/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/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/PassportRequestApprovalModel.d.ts +0 -22
- package/dist/models/PassportRequestApprovalModel.js +0 -91
- package/dist/models/PassportRequestAttachmentModel.d.ts +0 -10
- package/dist/models/PassportRequestAttachmentModel.js +0 -54
- package/dist/models/PassportRequestChatModel.d.ts +0 -8
- package/dist/models/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/dist/data-source.js
CHANGED
|
@@ -122,6 +122,9 @@ const GroupModel_1 = require("./models/GroupModel");
|
|
|
122
122
|
const WorkScheduleModel_1 = require("./models/WorkScheduleModel");
|
|
123
123
|
const JobsModel_1 = require("./models/JobsModel");
|
|
124
124
|
const TelephoneDirectoryModel_1 = require("./models/TelephoneDirectoryModel");
|
|
125
|
+
const RoutingGroupsModel_1 = require("./models/RoutingGroupsModel");
|
|
126
|
+
const RoutingGroupUsersModel_1 = require("./models/RoutingGroupUsersModel");
|
|
127
|
+
const IssueTypesModel_1 = require("./models/IssueTypesModel");
|
|
125
128
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
126
129
|
type: 'postgres',
|
|
127
130
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -248,6 +251,9 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
248
251
|
GroupModel_1.Group,
|
|
249
252
|
WorkScheduleModel_1.WorkSchedule,
|
|
250
253
|
JobsModel_1.Jobs,
|
|
251
|
-
TelephoneDirectoryModel_1.TelephoneDirectory
|
|
254
|
+
TelephoneDirectoryModel_1.TelephoneDirectory,
|
|
255
|
+
RoutingGroupsModel_1.RoutingGroups,
|
|
256
|
+
IssueTypesModel_1.IssueTypes,
|
|
257
|
+
RoutingGroupUsersModel_1.RoutingGroupUsers
|
|
252
258
|
],
|
|
253
259
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export * from './models/HelpdeskCategoriesModel';
|
|
|
90
90
|
export * from './models/HelpdeskSubCategoriesModel';
|
|
91
91
|
export * from './models/IssueTypesModel';
|
|
92
92
|
export * from './models/RoutingGroupsModel';
|
|
93
|
+
export * from './models/RoutingGroupUsersModel';
|
|
93
94
|
export * from './models/CurrencyModel';
|
|
94
95
|
export * from './models/TransferMissionRequestModel';
|
|
95
96
|
export * from './models/TransferMissionApprovalModel';
|
|
@@ -161,3 +162,4 @@ export { TitleCategory } from './models/DiplomaticTitlesMasterModel';
|
|
|
161
162
|
export * from './models/CountryMasterModel';
|
|
162
163
|
export * from './models/NationalityMasterModel';
|
|
163
164
|
export * from './models/OfficeMasterModel';
|
|
165
|
+
export * from './models/RoutingGroupUsersModel';
|
package/dist/index.js
CHANGED
|
@@ -107,6 +107,7 @@ __exportStar(require("./models/HelpdeskCategoriesModel"), exports);
|
|
|
107
107
|
__exportStar(require("./models/HelpdeskSubCategoriesModel"), exports);
|
|
108
108
|
__exportStar(require("./models/IssueTypesModel"), exports);
|
|
109
109
|
__exportStar(require("./models/RoutingGroupsModel"), exports);
|
|
110
|
+
__exportStar(require("./models/RoutingGroupUsersModel"), exports);
|
|
110
111
|
__exportStar(require("./models/CurrencyModel"), exports);
|
|
111
112
|
__exportStar(require("./models/TransferMissionRequestModel"), exports);
|
|
112
113
|
__exportStar(require("./models/TransferMissionApprovalModel"), exports);
|
|
@@ -193,3 +194,4 @@ Object.defineProperty(exports, "TitleCategory", { enumerable: true, get: functio
|
|
|
193
194
|
__exportStar(require("./models/CountryMasterModel"), exports);
|
|
194
195
|
__exportStar(require("./models/NationalityMasterModel"), exports);
|
|
195
196
|
__exportStar(require("./models/OfficeMasterModel"), exports);
|
|
197
|
+
__exportStar(require("./models/RoutingGroupUsersModel"), exports);
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
2
|
export declare class DiplomaticClubSubscriptionMaster extends BaseModel {
|
|
3
|
-
subscription_type: string
|
|
3
|
+
subscription_type: string;
|
|
4
4
|
subscription_amount: number;
|
|
5
5
|
currency: string | null;
|
|
6
|
-
|
|
6
|
+
description: string | null;
|
|
7
|
+
is_active: boolean;
|
|
8
|
+
effective_from: Date | null;
|
|
9
|
+
effective_to: Date | null;
|
|
10
|
+
subscription_period: string | null;
|
|
11
|
+
constructor(subscription_type: string, subscription_amount: number, currency?: string | null, description?: string | null, effective_from?: Date | null, effective_to?: Date | null, subscription_period?: string | null);
|
|
7
12
|
}
|
|
@@ -13,17 +13,22 @@ exports.DiplomaticClubSubscriptionMaster = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
let DiplomaticClubSubscriptionMaster = class DiplomaticClubSubscriptionMaster extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(subscription_type, subscription_amount, currency) {
|
|
16
|
+
constructor(subscription_type, subscription_amount, currency, description, effective_from, effective_to, subscription_period) {
|
|
17
17
|
super();
|
|
18
18
|
this.subscription_type = subscription_type;
|
|
19
19
|
this.subscription_amount = subscription_amount;
|
|
20
20
|
this.currency = currency || null;
|
|
21
|
+
this.description = description || null;
|
|
22
|
+
this.is_active = true;
|
|
23
|
+
this.effective_from = effective_from || null;
|
|
24
|
+
this.effective_to = effective_to || null;
|
|
25
|
+
this.subscription_period = subscription_period || null;
|
|
21
26
|
}
|
|
22
27
|
};
|
|
23
28
|
exports.DiplomaticClubSubscriptionMaster = DiplomaticClubSubscriptionMaster;
|
|
24
29
|
__decorate([
|
|
25
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100
|
|
26
|
-
__metadata("design:type",
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100 }),
|
|
31
|
+
__metadata("design:type", String)
|
|
27
32
|
], DiplomaticClubSubscriptionMaster.prototype, "subscription_type", void 0);
|
|
28
33
|
__decorate([
|
|
29
34
|
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2 }),
|
|
@@ -33,7 +38,27 @@ __decorate([
|
|
|
33
38
|
(0, typeorm_1.Column)({ type: 'varchar', length: 10, nullable: true }),
|
|
34
39
|
__metadata("design:type", Object)
|
|
35
40
|
], DiplomaticClubSubscriptionMaster.prototype, "currency", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], DiplomaticClubSubscriptionMaster.prototype, "description", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
47
|
+
__metadata("design:type", Boolean)
|
|
48
|
+
], DiplomaticClubSubscriptionMaster.prototype, "is_active", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], DiplomaticClubSubscriptionMaster.prototype, "effective_from", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], DiplomaticClubSubscriptionMaster.prototype, "effective_to", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 20, nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], DiplomaticClubSubscriptionMaster.prototype, "subscription_period", void 0);
|
|
36
61
|
exports.DiplomaticClubSubscriptionMaster = DiplomaticClubSubscriptionMaster = __decorate([
|
|
37
62
|
(0, typeorm_1.Entity)({ name: 'diplomatic_club_subscription_master' }),
|
|
38
|
-
__metadata("design:paramtypes", [String, Number, Object])
|
|
63
|
+
__metadata("design:paramtypes", [String, Number, Object, Object, Object, Object, Object])
|
|
39
64
|
], DiplomaticClubSubscriptionMaster);
|
|
@@ -5,6 +5,10 @@ export declare enum TitleCategory {
|
|
|
5
5
|
}
|
|
6
6
|
export declare class DiplomaticTitlesMaster extends BaseModel {
|
|
7
7
|
title: string;
|
|
8
|
+
title_in_arabic: string | null;
|
|
8
9
|
category: TitleCategory;
|
|
10
|
+
description: string | null;
|
|
11
|
+
is_active: boolean;
|
|
12
|
+
display_order: number;
|
|
9
13
|
constructor(title: string, category: TitleCategory);
|
|
10
14
|
}
|
|
@@ -22,6 +22,8 @@ let DiplomaticTitlesMaster = class DiplomaticTitlesMaster extends BaseModel_1.Ba
|
|
|
22
22
|
super();
|
|
23
23
|
this.title = title;
|
|
24
24
|
this.category = category;
|
|
25
|
+
this.is_active = true;
|
|
26
|
+
this.display_order = 0;
|
|
25
27
|
}
|
|
26
28
|
};
|
|
27
29
|
exports.DiplomaticTitlesMaster = DiplomaticTitlesMaster;
|
|
@@ -29,10 +31,26 @@ __decorate([
|
|
|
29
31
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
30
32
|
__metadata("design:type", String)
|
|
31
33
|
], DiplomaticTitlesMaster.prototype, "title", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
36
|
+
__metadata("design:type", Object)
|
|
37
|
+
], DiplomaticTitlesMaster.prototype, "title_in_arabic", void 0);
|
|
32
38
|
__decorate([
|
|
33
39
|
(0, typeorm_1.Column)({ type: 'enum', enum: TitleCategory, nullable: false, default: TitleCategory.EMPLOYEE }),
|
|
34
40
|
__metadata("design:type", String)
|
|
35
41
|
], DiplomaticTitlesMaster.prototype, "category", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], DiplomaticTitlesMaster.prototype, "description", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
48
|
+
__metadata("design:type", Boolean)
|
|
49
|
+
], DiplomaticTitlesMaster.prototype, "is_active", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], DiplomaticTitlesMaster.prototype, "display_order", void 0);
|
|
36
54
|
exports.DiplomaticTitlesMaster = DiplomaticTitlesMaster = __decorate([
|
|
37
55
|
(0, typeorm_1.Entity)({ name: 'diplomatic_titles_master' }),
|
|
38
56
|
__metadata("design:paramtypes", [String, String])
|
|
@@ -9,28 +9,31 @@ 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.
|
|
12
|
+
exports.RoutingGroupUsers = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let
|
|
15
|
+
let RoutingGroupUsers = class RoutingGroupUsers extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(routing_group_id, user_id, is_active = true) {
|
|
17
|
+
super();
|
|
18
|
+
this.routing_group_id = routing_group_id;
|
|
19
|
+
this.user_id = user_id;
|
|
20
|
+
this.is_active = is_active;
|
|
21
|
+
}
|
|
16
22
|
};
|
|
17
|
-
exports.
|
|
23
|
+
exports.RoutingGroupUsers = RoutingGroupUsers;
|
|
18
24
|
__decorate([
|
|
19
|
-
(0, typeorm_1.Column)({ type: 'int'
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'int' }),
|
|
20
26
|
__metadata("design:type", Number)
|
|
21
|
-
],
|
|
27
|
+
], RoutingGroupUsers.prototype, "routing_group_id", void 0);
|
|
22
28
|
__decorate([
|
|
23
|
-
(0, typeorm_1.Column)({ type: 'int'
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'int' }),
|
|
24
30
|
__metadata("design:type", Number)
|
|
25
|
-
],
|
|
31
|
+
], RoutingGroupUsers.prototype, "user_id", void 0);
|
|
26
32
|
__decorate([
|
|
27
|
-
(0, typeorm_1.Column)({ type: '
|
|
28
|
-
__metadata("design:type",
|
|
29
|
-
],
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typeorm_1.
|
|
32
|
-
__metadata("design:
|
|
33
|
-
],
|
|
34
|
-
exports.DiplomaticClubCardChat = DiplomaticClubCardChat = __decorate([
|
|
35
|
-
(0, typeorm_1.Entity)({ name: 'diplomatic_club_card_chats' })
|
|
36
|
-
], DiplomaticClubCardChat);
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
34
|
+
__metadata("design:type", Boolean)
|
|
35
|
+
], RoutingGroupUsers.prototype, "is_active", void 0);
|
|
36
|
+
exports.RoutingGroupUsers = RoutingGroupUsers = __decorate([
|
|
37
|
+
(0, typeorm_1.Entity)({ name: 'routing_group_users' }),
|
|
38
|
+
__metadata("design:paramtypes", [Number, Number, Boolean])
|
|
39
|
+
], RoutingGroupUsers);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -127,6 +127,10 @@ 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 { RoutingGroups } from './models/RoutingGroupsModel';
|
|
131
|
+
import { RoutingGroupUsers } from './models/RoutingGroupUsersModel';
|
|
132
|
+
import { IssueTypes } from './models/IssueTypesModel';
|
|
133
|
+
|
|
130
134
|
export const AppDataSource = new DataSource({
|
|
131
135
|
type: 'postgres',
|
|
132
136
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -253,6 +257,9 @@ export const AppDataSource = new DataSource({
|
|
|
253
257
|
Group,
|
|
254
258
|
WorkSchedule,
|
|
255
259
|
Jobs,
|
|
256
|
-
TelephoneDirectory
|
|
260
|
+
TelephoneDirectory,
|
|
261
|
+
RoutingGroups,
|
|
262
|
+
IssueTypes,
|
|
263
|
+
RoutingGroupUsers
|
|
257
264
|
],
|
|
258
265
|
});
|
package/src/index.ts
CHANGED
|
@@ -90,6 +90,7 @@ export * from './models/HelpdeskCategoriesModel';
|
|
|
90
90
|
export * from './models/HelpdeskSubCategoriesModel';
|
|
91
91
|
export * from './models/IssueTypesModel';
|
|
92
92
|
export * from './models/RoutingGroupsModel';
|
|
93
|
+
export * from './models/RoutingGroupUsersModel';
|
|
93
94
|
export * from './models/CurrencyModel';
|
|
94
95
|
export * from './models/TransferMissionRequestModel';
|
|
95
96
|
export * from './models/TransferMissionApprovalModel';
|
|
@@ -161,3 +162,4 @@ export { TitleCategory } from './models/DiplomaticTitlesMasterModel';
|
|
|
161
162
|
export * from './models/CountryMasterModel';
|
|
162
163
|
export * from './models/NationalityMasterModel';
|
|
163
164
|
export * from './models/OfficeMasterModel';
|
|
165
|
+
export * from './models/RoutingGroupUsersModel';
|
|
@@ -3,8 +3,8 @@ import { BaseModel } from './BaseModel';
|
|
|
3
3
|
|
|
4
4
|
@Entity({ name: 'diplomatic_club_subscription_master' })
|
|
5
5
|
export class DiplomaticClubSubscriptionMaster extends BaseModel {
|
|
6
|
-
@Column({ type: 'varchar', length: 100
|
|
7
|
-
subscription_type: string
|
|
6
|
+
@Column({ type: 'varchar', length: 100 })
|
|
7
|
+
subscription_type: string; // e.g., "Single", "Family"
|
|
8
8
|
|
|
9
9
|
@Column({ type: 'decimal', precision: 10, scale: 2 })
|
|
10
10
|
subscription_amount: number;
|
|
@@ -12,15 +12,39 @@ export class DiplomaticClubSubscriptionMaster extends BaseModel {
|
|
|
12
12
|
@Column({ type: 'varchar', length: 10, nullable: true })
|
|
13
13
|
currency: string | null;
|
|
14
14
|
|
|
15
|
+
@Column({ type: 'text', nullable: true })
|
|
16
|
+
description: string | null;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'boolean', default: true })
|
|
19
|
+
is_active: boolean;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'date', nullable: true })
|
|
22
|
+
effective_from: Date | null;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'date', nullable: true })
|
|
25
|
+
effective_to: Date | null;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'varchar', length: 20, nullable: true })
|
|
28
|
+
subscription_period: string | null; // e.g., "Monthly", "Yearly"
|
|
29
|
+
|
|
15
30
|
constructor(
|
|
16
31
|
subscription_type: string,
|
|
17
32
|
subscription_amount: number,
|
|
18
33
|
currency?: string | null,
|
|
34
|
+
description?: string | null,
|
|
35
|
+
effective_from?: Date | null,
|
|
36
|
+
effective_to?: Date | null,
|
|
37
|
+
subscription_period?: string | null
|
|
19
38
|
) {
|
|
20
39
|
super();
|
|
21
40
|
this.subscription_type = subscription_type;
|
|
22
41
|
this.subscription_amount = subscription_amount;
|
|
23
42
|
this.currency = currency || null;
|
|
43
|
+
this.description = description || null;
|
|
44
|
+
this.is_active = true;
|
|
45
|
+
this.effective_from = effective_from || null;
|
|
46
|
+
this.effective_to = effective_to || null;
|
|
47
|
+
this.subscription_period = subscription_period || null;
|
|
24
48
|
}
|
|
25
49
|
}
|
|
26
50
|
|
|
@@ -1,154 +1,154 @@
|
|
|
1
|
-
import { Column, Entity, OneToOne, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
// Import types only (not for runtime)
|
|
5
|
-
import type { DiplomaticApprovals } from './DiplomaticApprovalsModel';
|
|
6
|
-
import type { DiplomaticWorkFlow } from './DiplomaticWorkFlowModel';
|
|
7
|
-
import type { DiplomaticAttachments } from './DiplomaticAttachmentsModel';
|
|
8
|
-
import type { DiplomaticChats } from './DiplomaticChatsModel';
|
|
9
|
-
import type { DiplomaticClubCardMembers } from './DiplomaticClubCardMembersModel';
|
|
10
|
-
|
|
11
|
-
export enum DiplomaticRequestStatus {
|
|
12
|
-
DRAFT = "Draft",
|
|
13
|
-
SUBMITTED = "Submitted",
|
|
14
|
-
PENDING = "Pending",
|
|
15
|
-
IN_PROGRESS = "In Progress",
|
|
16
|
-
APPROVED = "Approved",
|
|
17
|
-
REJECTED = "Rejected",
|
|
18
|
-
COMPLETED = "Completed",
|
|
19
|
-
CANCELLED = "Cancelled"
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@Entity({ name: 'diplomatic_requests' })
|
|
23
|
-
export class DiplomaticRequests extends BaseModel {
|
|
24
|
-
@Column({ type: 'int' })
|
|
25
|
-
user_id: number;
|
|
26
|
-
|
|
27
|
-
@Column({ type: 'varchar', length: 100 })
|
|
28
|
-
employee_id: string;
|
|
29
|
-
|
|
30
|
-
@Column({ type: 'varchar', length: 255 })
|
|
31
|
-
employee_name: string;
|
|
32
|
-
|
|
33
|
-
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
34
|
-
grade: string | null;
|
|
35
|
-
|
|
36
|
-
@Column({ type: 'int', nullable: true })
|
|
37
|
-
designation_id: number | null;
|
|
38
|
-
|
|
39
|
-
@Column({ type: 'int', nullable: true })
|
|
40
|
-
department_id: number | null;
|
|
41
|
-
|
|
42
|
-
@Column({ type: 'varchar', length: 255 })
|
|
43
|
-
email_address: string;
|
|
44
|
-
|
|
45
|
-
@Column({ type: 'varchar', length: 20 })
|
|
46
|
-
contact_number: string;
|
|
47
|
-
|
|
48
|
-
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
49
|
-
request_date: Date;
|
|
50
|
-
|
|
51
|
-
@Column({ type: 'enum', enum: DiplomaticRequestStatus, default: DiplomaticRequestStatus.PENDING })
|
|
52
|
-
request_status: DiplomaticRequestStatus;
|
|
53
|
-
|
|
54
|
-
@Column({ type: 'timestamp', nullable: true })
|
|
55
|
-
request_close_date: Date | null;
|
|
56
|
-
|
|
57
|
-
@Column({ type: 'date', nullable: true })
|
|
58
|
-
end_date: Date | null;
|
|
59
|
-
|
|
60
|
-
@Column({ type: 'text', nullable: true })
|
|
61
|
-
remarks: string | null;
|
|
62
|
-
|
|
63
|
-
@Column({ type: 'int', nullable: true })
|
|
64
|
-
current_approval_level: number | null;
|
|
65
|
-
|
|
66
|
-
@Column({ type: 'int', nullable: true })
|
|
67
|
-
current_approver_id: number | null;
|
|
68
|
-
|
|
69
|
-
@Column({ type: 'int', nullable: true })
|
|
70
|
-
service_id: number | null;
|
|
71
|
-
|
|
72
|
-
@Column({ type: 'int', nullable: true })
|
|
73
|
-
sub_service_id: number | null;
|
|
74
|
-
|
|
75
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
76
|
-
member_name: string | null;
|
|
77
|
-
|
|
78
|
-
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
79
|
-
membership_type: string | null;
|
|
80
|
-
|
|
81
|
-
@Column({ type: 'int', nullable: true })
|
|
82
|
-
diplomatic_title_id: number | null;
|
|
83
|
-
|
|
84
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
85
|
-
location: string | null;
|
|
86
|
-
|
|
87
|
-
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
88
|
-
request_type: string | null;
|
|
89
|
-
|
|
90
|
-
@Column({ type: 'date', nullable: true })
|
|
91
|
-
expiry_date: Date | null;
|
|
92
|
-
|
|
93
|
-
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
94
|
-
photo_url: string | null;
|
|
95
|
-
|
|
96
|
-
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
97
|
-
membership_id: string | null;
|
|
98
|
-
|
|
99
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
100
|
-
organization: string | null;
|
|
101
|
-
|
|
102
|
-
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
103
|
-
subscription_amount: number | null;
|
|
104
|
-
|
|
105
|
-
@Column({ type: 'int', nullable: true })
|
|
106
|
-
section_id: number | null;
|
|
107
|
-
|
|
108
|
-
@Column({ type: 'int', nullable: true })
|
|
109
|
-
reporting_manager: number | null;
|
|
110
|
-
|
|
111
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
112
|
-
workflow_execution_id: string | null;
|
|
113
|
-
|
|
114
|
-
@OneToMany('DiplomaticClubCardMembers', 'diplomaticRequest', { nullable: true })
|
|
115
|
-
diplomaticClubCardMembers?: DiplomaticClubCardMembers[];
|
|
116
|
-
|
|
117
|
-
@OneToMany('DiplomaticApprovals', 'diplomaticRequest')
|
|
118
|
-
approvals?: DiplomaticApprovals[];
|
|
119
|
-
|
|
120
|
-
@OneToMany('DiplomaticWorkFlow', 'diplomaticRequest')
|
|
121
|
-
workflows?: DiplomaticWorkFlow[];
|
|
122
|
-
|
|
123
|
-
@OneToMany('DiplomaticAttachments', 'diplomaticRequest')
|
|
124
|
-
attachments?: DiplomaticAttachments[];
|
|
125
|
-
|
|
126
|
-
@OneToMany('DiplomaticChats', 'diplomaticRequest')
|
|
127
|
-
chats?: DiplomaticChats[];
|
|
128
|
-
|
|
129
|
-
constructor(
|
|
130
|
-
user_id: number,
|
|
131
|
-
employee_id: string,
|
|
132
|
-
employee_name: string,
|
|
133
|
-
email_address: string,
|
|
134
|
-
contact_number: string,
|
|
135
|
-
service_id: number | null,
|
|
136
|
-
sub_service_id: number | null,
|
|
137
|
-
section_id: number | null,
|
|
138
|
-
reporting_manager: number | null
|
|
139
|
-
) {
|
|
140
|
-
super();
|
|
141
|
-
this.user_id = user_id;
|
|
142
|
-
this.employee_id = employee_id;
|
|
143
|
-
this.employee_name = employee_name;
|
|
144
|
-
this.email_address = email_address;
|
|
145
|
-
this.contact_number = contact_number;
|
|
146
|
-
this.request_date = new Date();
|
|
147
|
-
this.request_status = DiplomaticRequestStatus.PENDING;
|
|
148
|
-
this.service_id = service_id;
|
|
149
|
-
this.sub_service_id = sub_service_id;
|
|
150
|
-
this.section_id = section_id;
|
|
151
|
-
this.reporting_manager = reporting_manager;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
1
|
+
import { Column, Entity, OneToOne, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
// Import types only (not for runtime)
|
|
5
|
+
import type { DiplomaticApprovals } from './DiplomaticApprovalsModel';
|
|
6
|
+
import type { DiplomaticWorkFlow } from './DiplomaticWorkFlowModel';
|
|
7
|
+
import type { DiplomaticAttachments } from './DiplomaticAttachmentsModel';
|
|
8
|
+
import type { DiplomaticChats } from './DiplomaticChatsModel';
|
|
9
|
+
import type { DiplomaticClubCardMembers } from './DiplomaticClubCardMembersModel';
|
|
10
|
+
|
|
11
|
+
export enum DiplomaticRequestStatus {
|
|
12
|
+
DRAFT = "Draft",
|
|
13
|
+
SUBMITTED = "Submitted",
|
|
14
|
+
PENDING = "Pending",
|
|
15
|
+
IN_PROGRESS = "In Progress",
|
|
16
|
+
APPROVED = "Approved",
|
|
17
|
+
REJECTED = "Rejected",
|
|
18
|
+
COMPLETED = "Completed",
|
|
19
|
+
CANCELLED = "Cancelled"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@Entity({ name: 'diplomatic_requests' })
|
|
23
|
+
export class DiplomaticRequests extends BaseModel {
|
|
24
|
+
@Column({ type: 'int' })
|
|
25
|
+
user_id: number;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'varchar', length: 100 })
|
|
28
|
+
employee_id: string;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'varchar', length: 255 })
|
|
31
|
+
employee_name: string;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
34
|
+
grade: string | null;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'int', nullable: true })
|
|
37
|
+
designation_id: number | null;
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'int', nullable: true })
|
|
40
|
+
department_id: number | null;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'varchar', length: 255 })
|
|
43
|
+
email_address: string;
|
|
44
|
+
|
|
45
|
+
@Column({ type: 'varchar', length: 20 })
|
|
46
|
+
contact_number: string;
|
|
47
|
+
|
|
48
|
+
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
49
|
+
request_date: Date;
|
|
50
|
+
|
|
51
|
+
@Column({ type: 'enum', enum: DiplomaticRequestStatus, default: DiplomaticRequestStatus.PENDING })
|
|
52
|
+
request_status: DiplomaticRequestStatus;
|
|
53
|
+
|
|
54
|
+
@Column({ type: 'timestamp', nullable: true })
|
|
55
|
+
request_close_date: Date | null;
|
|
56
|
+
|
|
57
|
+
@Column({ type: 'date', nullable: true })
|
|
58
|
+
end_date: Date | null;
|
|
59
|
+
|
|
60
|
+
@Column({ type: 'text', nullable: true })
|
|
61
|
+
remarks: string | null;
|
|
62
|
+
|
|
63
|
+
@Column({ type: 'int', nullable: true })
|
|
64
|
+
current_approval_level: number | null;
|
|
65
|
+
|
|
66
|
+
@Column({ type: 'int', nullable: true })
|
|
67
|
+
current_approver_id: number | null;
|
|
68
|
+
|
|
69
|
+
@Column({ type: 'int', nullable: true })
|
|
70
|
+
service_id: number | null;
|
|
71
|
+
|
|
72
|
+
@Column({ type: 'int', nullable: true })
|
|
73
|
+
sub_service_id: number | null;
|
|
74
|
+
|
|
75
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
76
|
+
member_name: string | null;
|
|
77
|
+
|
|
78
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
79
|
+
membership_type: string | null;
|
|
80
|
+
|
|
81
|
+
@Column({ type: 'int', nullable: true })
|
|
82
|
+
diplomatic_title_id: number | null;
|
|
83
|
+
|
|
84
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
85
|
+
location: string | null;
|
|
86
|
+
|
|
87
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
88
|
+
request_type: string | null;
|
|
89
|
+
|
|
90
|
+
@Column({ type: 'date', nullable: true })
|
|
91
|
+
expiry_date: Date | null;
|
|
92
|
+
|
|
93
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
94
|
+
photo_url: string | null;
|
|
95
|
+
|
|
96
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
97
|
+
membership_id: string | null;
|
|
98
|
+
|
|
99
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
100
|
+
organization: string | null;
|
|
101
|
+
|
|
102
|
+
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
103
|
+
subscription_amount: number | null;
|
|
104
|
+
|
|
105
|
+
@Column({ type: 'int', nullable: true })
|
|
106
|
+
section_id: number | null;
|
|
107
|
+
|
|
108
|
+
@Column({ type: 'int', nullable: true })
|
|
109
|
+
reporting_manager: number | null;
|
|
110
|
+
|
|
111
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
112
|
+
workflow_execution_id: string | null;
|
|
113
|
+
|
|
114
|
+
@OneToMany('DiplomaticClubCardMembers', 'diplomaticRequest', { nullable: true })
|
|
115
|
+
diplomaticClubCardMembers?: DiplomaticClubCardMembers[];
|
|
116
|
+
|
|
117
|
+
@OneToMany('DiplomaticApprovals', 'diplomaticRequest')
|
|
118
|
+
approvals?: DiplomaticApprovals[];
|
|
119
|
+
|
|
120
|
+
@OneToMany('DiplomaticWorkFlow', 'diplomaticRequest')
|
|
121
|
+
workflows?: DiplomaticWorkFlow[];
|
|
122
|
+
|
|
123
|
+
@OneToMany('DiplomaticAttachments', 'diplomaticRequest')
|
|
124
|
+
attachments?: DiplomaticAttachments[];
|
|
125
|
+
|
|
126
|
+
@OneToMany('DiplomaticChats', 'diplomaticRequest')
|
|
127
|
+
chats?: DiplomaticChats[];
|
|
128
|
+
|
|
129
|
+
constructor(
|
|
130
|
+
user_id: number,
|
|
131
|
+
employee_id: string,
|
|
132
|
+
employee_name: string,
|
|
133
|
+
email_address: string,
|
|
134
|
+
contact_number: string,
|
|
135
|
+
service_id: number | null,
|
|
136
|
+
sub_service_id: number | null,
|
|
137
|
+
section_id: number | null,
|
|
138
|
+
reporting_manager: number | null
|
|
139
|
+
) {
|
|
140
|
+
super();
|
|
141
|
+
this.user_id = user_id;
|
|
142
|
+
this.employee_id = employee_id;
|
|
143
|
+
this.employee_name = employee_name;
|
|
144
|
+
this.email_address = email_address;
|
|
145
|
+
this.contact_number = contact_number;
|
|
146
|
+
this.request_date = new Date();
|
|
147
|
+
this.request_status = DiplomaticRequestStatus.PENDING;
|
|
148
|
+
this.service_id = service_id;
|
|
149
|
+
this.sub_service_id = sub_service_id;
|
|
150
|
+
this.section_id = section_id;
|
|
151
|
+
this.reporting_manager = reporting_manager;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
@@ -11,13 +11,27 @@ export class DiplomaticTitlesMaster extends BaseModel {
|
|
|
11
11
|
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
12
12
|
title: string; // Diplomatic title name
|
|
13
13
|
|
|
14
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
15
|
+
title_in_arabic: string | null; // Arabic translation
|
|
16
|
+
|
|
14
17
|
@Column({ type: 'enum', enum: TitleCategory, nullable: false,default: TitleCategory.EMPLOYEE})
|
|
15
18
|
category: TitleCategory; // Category: Employee or Non Employee
|
|
16
19
|
|
|
20
|
+
@Column({ type: 'text', nullable: true })
|
|
21
|
+
description: string | null; // Description of the title
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'boolean', default: true })
|
|
24
|
+
is_active: boolean; // Whether the title is active
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'int', default: 0 })
|
|
27
|
+
display_order: number; // Order for display in dropdowns
|
|
28
|
+
|
|
17
29
|
constructor(title: string, category: TitleCategory) {
|
|
18
30
|
super();
|
|
19
31
|
this.title = title;
|
|
20
32
|
this.category = category;
|
|
33
|
+
this.is_active = true;
|
|
34
|
+
this.display_order = 0;
|
|
21
35
|
}
|
|
22
36
|
}
|
|
23
37
|
|