@platform-modules/foreign-ministry 1.1.27 → 1.1.28
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 +11 -3
- package/dist/models/EarlyCheckoutChatModel.d.ts +4 -0
- package/dist/models/EarlyCheckoutChatModel.js +28 -2
- package/dist/models/FinancialRequestsModel.d.ts +1 -1
- package/dist/models/FinancialRequestsModel.js +3 -3
- package/dist/models/HelpContentMappedCategoriesModel.d.ts +6 -0
- package/dist/models/HelpContentMappedCategoriesModel.js +34 -0
- package/dist/models/HelpContentMappedTagsModel.d.ts +6 -0
- package/dist/models/HelpContentMappedTagsModel.js +34 -0
- package/dist/models/HelpContentTagsModel.d.ts +5 -0
- package/dist/models/HelpContentTagsModel.js +29 -0
- package/dist/models/ReimbursementRequestsModel.js +2 -2
- package/dist/models/StayAfterHoursChatModel.d.ts +4 -0
- package/dist/models/StayAfterHoursChatModel.js +28 -2
- package/dist/models/questionTagsModel.d.ts +6 -0
- package/dist/models/questionTagsModel.js +34 -0
- package/package.json +1 -1
- package/src/models/EarlyCheckoutChatModel.ts +34 -1
- package/src/models/FinancialRequestsModel.ts +2 -2
- package/src/models/ReimbursementRequestsModel.ts +6 -3
- package/src/models/StayAfterHoursChatModel.ts +34 -1
package/.env
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
DB_HOST=localhost
|
|
1
|
+
# DB_HOST=localhost
|
|
2
|
+
# DB_PORT=5433
|
|
3
|
+
# DB_USER=postgres
|
|
4
|
+
# DB_PASS=123
|
|
5
|
+
# DB_NAME=FM
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
DB_HOST=164.52.222.169
|
|
2
10
|
DB_PORT=5432
|
|
3
|
-
DB_USER=
|
|
4
|
-
DB_PASS=
|
|
11
|
+
DB_USER=postgres_admin_user
|
|
12
|
+
DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
|
|
5
13
|
DB_NAME=FM
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { EarlyCheckoutApprovalStatus } from './EarlyCheckoutApprovalModel';
|
|
2
3
|
export declare enum EarlyCheckoutMessageType {
|
|
3
4
|
TEXT = "text",
|
|
4
5
|
IMAGE = "image",
|
|
@@ -11,6 +12,9 @@ export declare class EarlyCheckoutRequestChat extends BaseModel {
|
|
|
11
12
|
service_id: number | null;
|
|
12
13
|
sub_service_id: number | null;
|
|
13
14
|
user_id: number;
|
|
15
|
+
role_id: number;
|
|
14
16
|
message: string;
|
|
15
17
|
messageType: EarlyCheckoutMessageType;
|
|
18
|
+
status: EarlyCheckoutApprovalStatus;
|
|
19
|
+
constructor(request_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: EarlyCheckoutMessageType, status?: EarlyCheckoutApprovalStatus);
|
|
16
20
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.EarlyCheckoutRequestChat = exports.EarlyCheckoutMessageType = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const EarlyCheckoutApprovalModel_1 = require("./EarlyCheckoutApprovalModel");
|
|
15
16
|
var EarlyCheckoutMessageType;
|
|
16
17
|
(function (EarlyCheckoutMessageType) {
|
|
17
18
|
EarlyCheckoutMessageType["TEXT"] = "text";
|
|
@@ -21,6 +22,17 @@ var EarlyCheckoutMessageType;
|
|
|
21
22
|
EarlyCheckoutMessageType["LINK"] = "link";
|
|
22
23
|
})(EarlyCheckoutMessageType || (exports.EarlyCheckoutMessageType = EarlyCheckoutMessageType = {}));
|
|
23
24
|
let EarlyCheckoutRequestChat = class EarlyCheckoutRequestChat extends BaseModel_1.BaseModel {
|
|
25
|
+
constructor(request_id, user_id, role_id, message, service_id, sub_service_id, messageType, status) {
|
|
26
|
+
super();
|
|
27
|
+
this.request_id = request_id;
|
|
28
|
+
this.service_id = service_id || null;
|
|
29
|
+
this.sub_service_id = sub_service_id || null;
|
|
30
|
+
this.user_id = user_id;
|
|
31
|
+
this.role_id = role_id;
|
|
32
|
+
this.message = message;
|
|
33
|
+
this.messageType = messageType || EarlyCheckoutMessageType.TEXT;
|
|
34
|
+
this.status = status || EarlyCheckoutApprovalModel_1.EarlyCheckoutApprovalStatus.PENDING;
|
|
35
|
+
}
|
|
24
36
|
};
|
|
25
37
|
exports.EarlyCheckoutRequestChat = EarlyCheckoutRequestChat;
|
|
26
38
|
__decorate([
|
|
@@ -39,14 +51,28 @@ __decorate([
|
|
|
39
51
|
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
40
52
|
__metadata("design:type", Number)
|
|
41
53
|
], EarlyCheckoutRequestChat.prototype, "user_id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], EarlyCheckoutRequestChat.prototype, "role_id", void 0);
|
|
42
58
|
__decorate([
|
|
43
59
|
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
44
60
|
__metadata("design:type", String)
|
|
45
61
|
], EarlyCheckoutRequestChat.prototype, "message", void 0);
|
|
46
62
|
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({
|
|
63
|
+
(0, typeorm_1.Column)({
|
|
64
|
+
type: 'enum',
|
|
65
|
+
enum: EarlyCheckoutMessageType,
|
|
66
|
+
default: EarlyCheckoutMessageType.TEXT,
|
|
67
|
+
nullable: false
|
|
68
|
+
}),
|
|
48
69
|
__metadata("design:type", String)
|
|
49
70
|
], EarlyCheckoutRequestChat.prototype, "messageType", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: EarlyCheckoutApprovalModel_1.EarlyCheckoutApprovalStatus, default: EarlyCheckoutApprovalModel_1.EarlyCheckoutApprovalStatus.PENDING, nullable: false }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], EarlyCheckoutRequestChat.prototype, "status", void 0);
|
|
50
75
|
exports.EarlyCheckoutRequestChat = EarlyCheckoutRequestChat = __decorate([
|
|
51
|
-
(0, typeorm_1.Entity)({ name: 'early_checkout_chats' })
|
|
76
|
+
(0, typeorm_1.Entity)({ name: 'early_checkout_chats' }),
|
|
77
|
+
__metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, String])
|
|
52
78
|
], EarlyCheckoutRequestChat);
|
|
@@ -41,7 +41,7 @@ export declare class FinancialRequests extends BaseModel {
|
|
|
41
41
|
payslipRequest?: PayslipRequests;
|
|
42
42
|
salaryCertificateRequest?: SalaryCertificateRequests;
|
|
43
43
|
allowanceRequest?: AllowanceRequests;
|
|
44
|
-
|
|
44
|
+
reimbursementRequest?: ReimbursementRequests;
|
|
45
45
|
bankAccountChangeRequest?: BankAccountChangeRequests;
|
|
46
46
|
chats?: FinancialChats[];
|
|
47
47
|
approvals?: FinancialApprovals[];
|
|
@@ -129,9 +129,9 @@ __decorate([
|
|
|
129
129
|
__metadata("design:type", Function)
|
|
130
130
|
], FinancialRequests.prototype, "allowanceRequest", void 0);
|
|
131
131
|
__decorate([
|
|
132
|
-
(0, typeorm_1.
|
|
133
|
-
__metadata("design:type",
|
|
134
|
-
], FinancialRequests.prototype, "
|
|
132
|
+
(0, typeorm_1.OneToOne)('ReimbursementRequests', 'financialRequest', { nullable: true }),
|
|
133
|
+
__metadata("design:type", Function)
|
|
134
|
+
], FinancialRequests.prototype, "reimbursementRequest", void 0);
|
|
135
135
|
__decorate([
|
|
136
136
|
(0, typeorm_1.OneToOne)('BankAccountChangeRequests', 'financialRequest', { nullable: true }),
|
|
137
137
|
__metadata("design:type", Function)
|
|
@@ -0,0 +1,34 @@
|
|
|
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.HelpContentMappedCategories = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let HelpContentMappedCategories = class HelpContentMappedCategories extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(help_content_category_Id, help_content_Id) {
|
|
17
|
+
super();
|
|
18
|
+
this.help_content_category_Id = help_content_category_Id,
|
|
19
|
+
this.help_content_Id = help_content_Id;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.HelpContentMappedCategories = HelpContentMappedCategories;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], HelpContentMappedCategories.prototype, "help_content_category_Id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], HelpContentMappedCategories.prototype, "help_content_Id", void 0);
|
|
31
|
+
exports.HelpContentMappedCategories = HelpContentMappedCategories = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'help_content_mapped_categories' }),
|
|
33
|
+
__metadata("design:paramtypes", [Number, Number])
|
|
34
|
+
], HelpContentMappedCategories);
|
|
@@ -0,0 +1,34 @@
|
|
|
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.HelpContentMappedTags = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let HelpContentMappedTags = class HelpContentMappedTags extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(help_content_tag_Id, help_content_Id) {
|
|
17
|
+
super();
|
|
18
|
+
this.help_content_tag_Id = help_content_tag_Id,
|
|
19
|
+
this.help_content_Id = help_content_Id;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.HelpContentMappedTags = HelpContentMappedTags;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], HelpContentMappedTags.prototype, "help_content_tag_Id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], HelpContentMappedTags.prototype, "help_content_Id", void 0);
|
|
31
|
+
exports.HelpContentMappedTags = HelpContentMappedTags = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'help_content_mapped_tags' }),
|
|
33
|
+
__metadata("design:paramtypes", [Number, Number])
|
|
34
|
+
], HelpContentMappedTags);
|
|
@@ -0,0 +1,29 @@
|
|
|
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.HelpContentTags = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let HelpContentTags = class HelpContentTags extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.HelpContentTags = HelpContentTags;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], HelpContentTags.prototype, "name", void 0);
|
|
26
|
+
exports.HelpContentTags = HelpContentTags = __decorate([
|
|
27
|
+
(0, typeorm_1.Entity)({ name: 'help_content_tags' }),
|
|
28
|
+
__metadata("design:paramtypes", [String])
|
|
29
|
+
], HelpContentTags);
|
|
@@ -29,7 +29,7 @@ let ReimbursementRequests = class ReimbursementRequests extends BaseModel_1.Base
|
|
|
29
29
|
};
|
|
30
30
|
exports.ReimbursementRequests = ReimbursementRequests;
|
|
31
31
|
__decorate([
|
|
32
|
-
(0, typeorm_1.Column)({ type: 'int' }),
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'int', unique: true }),
|
|
33
33
|
__metadata("design:type", Number)
|
|
34
34
|
], ReimbursementRequests.prototype, "financial_request_id", void 0);
|
|
35
35
|
__decorate([
|
|
@@ -69,7 +69,7 @@ __decorate([
|
|
|
69
69
|
__metadata("design:type", Date)
|
|
70
70
|
], ReimbursementRequests.prototype, "payment_date", void 0);
|
|
71
71
|
__decorate([
|
|
72
|
-
(0, typeorm_1.
|
|
72
|
+
(0, typeorm_1.OneToOne)(() => FinancialRequestsModel_1.FinancialRequests, fr => fr.reimbursementRequest),
|
|
73
73
|
(0, typeorm_1.JoinColumn)({ name: 'financial_request_id' }),
|
|
74
74
|
__metadata("design:type", FinancialRequestsModel_1.FinancialRequests)
|
|
75
75
|
], ReimbursementRequests.prototype, "financialRequest", void 0);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { StayAfterHoursApprovalStatus } from './StayAfterHoursApprovalModel';
|
|
2
3
|
export declare enum StayAfterHoursMessageType {
|
|
3
4
|
TEXT = "text",
|
|
4
5
|
IMAGE = "image",
|
|
@@ -11,6 +12,9 @@ export declare class StayAfterHoursRequestChat extends BaseModel {
|
|
|
11
12
|
service_id: number | null;
|
|
12
13
|
sub_service_id: number | null;
|
|
13
14
|
user_id: number;
|
|
15
|
+
role_id: number;
|
|
14
16
|
message: string;
|
|
15
17
|
messageType: StayAfterHoursMessageType;
|
|
18
|
+
status: StayAfterHoursApprovalStatus;
|
|
19
|
+
constructor(request_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: StayAfterHoursMessageType, status?: StayAfterHoursApprovalStatus);
|
|
16
20
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.StayAfterHoursRequestChat = exports.StayAfterHoursMessageType = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const StayAfterHoursApprovalModel_1 = require("./StayAfterHoursApprovalModel");
|
|
15
16
|
var StayAfterHoursMessageType;
|
|
16
17
|
(function (StayAfterHoursMessageType) {
|
|
17
18
|
StayAfterHoursMessageType["TEXT"] = "text";
|
|
@@ -21,6 +22,17 @@ var StayAfterHoursMessageType;
|
|
|
21
22
|
StayAfterHoursMessageType["LINK"] = "link";
|
|
22
23
|
})(StayAfterHoursMessageType || (exports.StayAfterHoursMessageType = StayAfterHoursMessageType = {}));
|
|
23
24
|
let StayAfterHoursRequestChat = class StayAfterHoursRequestChat extends BaseModel_1.BaseModel {
|
|
25
|
+
constructor(request_id, user_id, role_id, message, service_id, sub_service_id, messageType, status) {
|
|
26
|
+
super();
|
|
27
|
+
this.request_id = request_id;
|
|
28
|
+
this.service_id = service_id || null;
|
|
29
|
+
this.sub_service_id = sub_service_id || null;
|
|
30
|
+
this.user_id = user_id;
|
|
31
|
+
this.role_id = role_id;
|
|
32
|
+
this.message = message;
|
|
33
|
+
this.messageType = messageType || StayAfterHoursMessageType.TEXT;
|
|
34
|
+
this.status = status || StayAfterHoursApprovalModel_1.StayAfterHoursApprovalStatus.PENDING;
|
|
35
|
+
}
|
|
24
36
|
};
|
|
25
37
|
exports.StayAfterHoursRequestChat = StayAfterHoursRequestChat;
|
|
26
38
|
__decorate([
|
|
@@ -39,14 +51,28 @@ __decorate([
|
|
|
39
51
|
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
40
52
|
__metadata("design:type", Number)
|
|
41
53
|
], StayAfterHoursRequestChat.prototype, "user_id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], StayAfterHoursRequestChat.prototype, "role_id", void 0);
|
|
42
58
|
__decorate([
|
|
43
59
|
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
44
60
|
__metadata("design:type", String)
|
|
45
61
|
], StayAfterHoursRequestChat.prototype, "message", void 0);
|
|
46
62
|
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({
|
|
63
|
+
(0, typeorm_1.Column)({
|
|
64
|
+
type: 'enum',
|
|
65
|
+
enum: StayAfterHoursMessageType,
|
|
66
|
+
default: StayAfterHoursMessageType.TEXT,
|
|
67
|
+
nullable: false
|
|
68
|
+
}),
|
|
48
69
|
__metadata("design:type", String)
|
|
49
70
|
], StayAfterHoursRequestChat.prototype, "messageType", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: StayAfterHoursApprovalModel_1.StayAfterHoursApprovalStatus, default: StayAfterHoursApprovalModel_1.StayAfterHoursApprovalStatus.PENDING, nullable: false }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], StayAfterHoursRequestChat.prototype, "status", void 0);
|
|
50
75
|
exports.StayAfterHoursRequestChat = StayAfterHoursRequestChat = __decorate([
|
|
51
|
-
(0, typeorm_1.Entity)({ name: 'stay_after_hours_chats' })
|
|
76
|
+
(0, typeorm_1.Entity)({ name: 'stay_after_hours_chats' }),
|
|
77
|
+
__metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, String])
|
|
52
78
|
], StayAfterHoursRequestChat);
|
|
@@ -0,0 +1,34 @@
|
|
|
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.QuestionTags = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let QuestionTags = class QuestionTags extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, question_Id) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name,
|
|
19
|
+
this.question_Id = question_Id;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.QuestionTags = QuestionTags;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], QuestionTags.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], QuestionTags.prototype, "question_Id", void 0);
|
|
31
|
+
exports.QuestionTags = QuestionTags = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'question_tags' }),
|
|
33
|
+
__metadata("design:paramtypes", [String, Number])
|
|
34
|
+
], QuestionTags);
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { EarlyCheckoutApprovalStatus } from './EarlyCheckoutApprovalModel';
|
|
3
4
|
|
|
4
5
|
export enum EarlyCheckoutMessageType {
|
|
5
6
|
TEXT = "text",
|
|
@@ -24,11 +25,43 @@ export class EarlyCheckoutRequestChat extends BaseModel {
|
|
|
24
25
|
@Column({ type: 'integer', nullable: false })
|
|
25
26
|
user_id: number;
|
|
26
27
|
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
role_id: number;
|
|
30
|
+
|
|
27
31
|
@Column({ type: 'text', nullable: false })
|
|
28
32
|
message: string;
|
|
29
33
|
|
|
30
|
-
@Column({
|
|
34
|
+
@Column({
|
|
35
|
+
type: 'enum',
|
|
36
|
+
enum: EarlyCheckoutMessageType,
|
|
37
|
+
default: EarlyCheckoutMessageType.TEXT,
|
|
38
|
+
nullable: false
|
|
39
|
+
})
|
|
31
40
|
messageType: EarlyCheckoutMessageType;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'enum', enum: EarlyCheckoutApprovalStatus, default: EarlyCheckoutApprovalStatus.PENDING, nullable: false })
|
|
43
|
+
status: EarlyCheckoutApprovalStatus;
|
|
44
|
+
|
|
45
|
+
constructor(
|
|
46
|
+
request_id: number,
|
|
47
|
+
user_id: number,
|
|
48
|
+
role_id: number,
|
|
49
|
+
message: string,
|
|
50
|
+
service_id?: number,
|
|
51
|
+
sub_service_id?: number,
|
|
52
|
+
messageType?: EarlyCheckoutMessageType,
|
|
53
|
+
status?: EarlyCheckoutApprovalStatus
|
|
54
|
+
) {
|
|
55
|
+
super();
|
|
56
|
+
this.request_id = request_id;
|
|
57
|
+
this.service_id = service_id || null;
|
|
58
|
+
this.sub_service_id = sub_service_id || null;
|
|
59
|
+
this.user_id = user_id;
|
|
60
|
+
this.role_id = role_id;
|
|
61
|
+
this.message = message;
|
|
62
|
+
this.messageType = messageType || EarlyCheckoutMessageType.TEXT;
|
|
63
|
+
this.status = status || EarlyCheckoutApprovalStatus.PENDING;
|
|
64
|
+
}
|
|
32
65
|
}
|
|
33
66
|
|
|
34
67
|
|
|
@@ -91,8 +91,8 @@ export class FinancialRequests extends BaseModel {
|
|
|
91
91
|
@OneToOne('AllowanceRequests', 'financialRequest', { nullable: true })
|
|
92
92
|
allowanceRequest?: AllowanceRequests;
|
|
93
93
|
|
|
94
|
-
@
|
|
95
|
-
|
|
94
|
+
@OneToOne('ReimbursementRequests', 'financialRequest', { nullable: true })
|
|
95
|
+
reimbursementRequest?: ReimbursementRequests;
|
|
96
96
|
|
|
97
97
|
@OneToOne('BankAccountChangeRequests', 'financialRequest', { nullable: true })
|
|
98
98
|
bankAccountChangeRequest?: BankAccountChangeRequests;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Column, Entity,
|
|
1
|
+
import { Column, Entity, OneToOne, JoinColumn } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
import { FinancialRequests } from "./FinancialRequestsModel";
|
|
4
4
|
|
|
5
5
|
@Entity({ name: 'reimbursement_requests' })
|
|
6
6
|
export class ReimbursementRequests extends BaseModel {
|
|
7
|
-
@Column({ type: 'int' })
|
|
7
|
+
@Column({ type: 'int', unique: true })
|
|
8
8
|
financial_request_id: number;
|
|
9
9
|
|
|
10
10
|
@Column({ type: 'text' })
|
|
@@ -34,7 +34,10 @@ export class ReimbursementRequests extends BaseModel {
|
|
|
34
34
|
@Column({ type: 'date', nullable: true })
|
|
35
35
|
payment_date: Date;
|
|
36
36
|
|
|
37
|
-
@
|
|
37
|
+
// @OneToOne('FinancialRequests', 'reimbursementRequest')
|
|
38
|
+
// financialRequest?: FinancialRequests;
|
|
39
|
+
|
|
40
|
+
@OneToOne(() => FinancialRequests, fr => fr.reimbursementRequest)
|
|
38
41
|
@JoinColumn({ name: 'financial_request_id' })
|
|
39
42
|
financialRequest?: FinancialRequests;
|
|
40
43
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { StayAfterHoursApprovalStatus } from './StayAfterHoursApprovalModel';
|
|
3
4
|
|
|
4
5
|
export enum StayAfterHoursMessageType {
|
|
5
6
|
TEXT = "text",
|
|
@@ -24,10 +25,42 @@ export class StayAfterHoursRequestChat extends BaseModel {
|
|
|
24
25
|
@Column({ type: 'integer', nullable: false })
|
|
25
26
|
user_id: number;
|
|
26
27
|
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
role_id: number;
|
|
30
|
+
|
|
27
31
|
@Column({ type: 'text', nullable: false })
|
|
28
32
|
message: string;
|
|
29
33
|
|
|
30
|
-
@Column({
|
|
34
|
+
@Column({
|
|
35
|
+
type: 'enum',
|
|
36
|
+
enum: StayAfterHoursMessageType,
|
|
37
|
+
default: StayAfterHoursMessageType.TEXT,
|
|
38
|
+
nullable: false
|
|
39
|
+
})
|
|
31
40
|
messageType: StayAfterHoursMessageType;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'enum', enum: StayAfterHoursApprovalStatus, default: StayAfterHoursApprovalStatus.PENDING, nullable: false })
|
|
43
|
+
status: StayAfterHoursApprovalStatus;
|
|
44
|
+
|
|
45
|
+
constructor(
|
|
46
|
+
request_id: number,
|
|
47
|
+
user_id: number,
|
|
48
|
+
role_id: number,
|
|
49
|
+
message: string,
|
|
50
|
+
service_id?: number,
|
|
51
|
+
sub_service_id?: number,
|
|
52
|
+
messageType?: StayAfterHoursMessageType,
|
|
53
|
+
status?: StayAfterHoursApprovalStatus
|
|
54
|
+
) {
|
|
55
|
+
super();
|
|
56
|
+
this.request_id = request_id;
|
|
57
|
+
this.service_id = service_id || null;
|
|
58
|
+
this.sub_service_id = sub_service_id || null;
|
|
59
|
+
this.user_id = user_id;
|
|
60
|
+
this.role_id = role_id;
|
|
61
|
+
this.message = message;
|
|
62
|
+
this.messageType = messageType || StayAfterHoursMessageType.TEXT;
|
|
63
|
+
this.status = status || StayAfterHoursApprovalStatus.PENDING;
|
|
64
|
+
}
|
|
32
65
|
}
|
|
33
66
|
|