@platform-modules/foreign-ministry 1.0.74 → 1.0.76
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 +2 -2
- package/FINANCIAL_MODELS_SUMMARY.md +144 -0
- package/FINANCIAL_SERVICES_MODELS.md +236 -0
- package/dist/data-source.js +2 -10
- package/dist/index.d.ts +13 -4
- package/dist/index.js +13 -4
- package/dist/models/AllowanceRequestsModel.d.ts +9 -0
- package/dist/models/AllowanceRequestsModel.js +49 -0
- package/dist/models/AllowanceTypesModel.d.ts +8 -0
- package/dist/models/AllowanceTypesModel.js +43 -0
- package/dist/models/BankAccountChangeRequestsModel.d.ts +12 -0
- package/dist/models/BankAccountChangeRequestsModel.js +62 -0
- package/dist/models/FMServices.js +1 -1
- package/dist/models/FinancialApprovalsModel.d.ts +20 -0
- package/dist/models/FinancialApprovalsModel.js +76 -0
- package/dist/models/FinancialAttachmentsModel.d.ts +8 -0
- package/dist/models/FinancialAttachmentsModel.js +43 -0
- package/dist/models/FinancialChatsModel.d.ts +7 -0
- package/dist/models/{PortalFeedbackModel.js → FinancialChatsModel.js} +19 -24
- package/dist/models/FinancialRequestsModel.d.ts +29 -0
- package/dist/models/FinancialRequestsModel.js +103 -0
- package/dist/models/FinancialSettingsModel.d.ts +8 -0
- package/dist/models/{userRolesModel.js → FinancialSettingsModel.js} +21 -31
- package/dist/models/FinancialWorkFlowModel.d.ts +16 -0
- package/dist/models/FinancialWorkFlowModel.js +61 -0
- package/dist/models/PayslipRequestsModel.d.ts +8 -0
- package/dist/models/PayslipRequestsModel.js +44 -0
- package/dist/models/ReimbursementRequestsModel.d.ts +14 -0
- package/dist/models/ReimbursementRequestsModel.js +73 -0
- package/dist/models/RequestTypeMasterModel.d.ts +12 -0
- package/dist/models/RequestTypeMasterModel.js +60 -0
- package/dist/models/SalaryCertificateRequestsModel.d.ts +7 -0
- package/dist/models/SalaryCertificateRequestsModel.js +39 -0
- package/dist/models/role.d.ts +7 -1
- package/dist/models/role.js +2 -2
- package/package.json +1 -1
- package/src/data-source.ts +2 -10
- package/src/index.ts +13 -4
- package/src/models/AllowanceRequestsModel.ts +38 -0
- package/src/models/AllowanceTypesModel.ts +26 -0
- package/src/models/BankAccountChangeRequestsModel.ts +50 -0
- package/src/models/FMServices.ts +1 -1
- package/src/models/FinancialApprovalsModel.ts +57 -0
- package/src/models/FinancialAttachmentsModel.ts +30 -0
- package/src/models/FinancialChatsModel.ts +23 -0
- package/src/models/FinancialRequestsModel.ts +81 -0
- package/src/models/FinancialSettingsModel.ts +30 -0
- package/src/models/FinancialWorkFlowModel.ts +47 -0
- package/src/models/PayslipRequestsModel.ts +29 -0
- package/src/models/ReimbursementRequestsModel.ts +58 -0
- package/src/models/RequestTypeMasterModel.ts +38 -0
- package/src/models/SalaryCertificateRequestsModel.ts +24 -0
- package/src/models/role.ts +7 -1
- package/dist/models/HelpContentMappedCategoriesModel.d.ts +0 -6
- package/dist/models/HelpContentMappedCategoriesModel.js +0 -34
- package/dist/models/HelpContentMappedTagsModel.d.ts +0 -6
- package/dist/models/HelpContentMappedTagsModel.js +0 -34
- package/dist/models/HelpContentTagsModel.d.ts +0 -5
- package/dist/models/HelpContentTagsModel.js +0 -29
- package/dist/models/HolidaysModel.d.ts +0 -11
- package/dist/models/HolidaysModel.js +0 -59
- package/dist/models/PortalFeedbackModel.d.ts +0 -8
- package/dist/models/roleRightsModel.d.ts +0 -16
- package/dist/models/roleRightsModel.js +0 -44
- package/dist/models/userRolesModel.d.ts +0 -18
- package/src/models/HolidaysModel.ts +0 -46
- package/src/models/PortalFeedbackModel.ts +0 -33
- package/src/models/roleRightsModel.ts +0 -31
- package/src/models/userRolesModel.ts +0 -38
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum FinancialWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending",
|
|
8
|
+
IN_PROGRESS = "In Progress"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Entity({ name: 'financial_work_flows' })
|
|
12
|
+
export class FinancialWorkFlow extends BaseModel {
|
|
13
|
+
@Column({ type: 'int' })
|
|
14
|
+
financial_request_id: number;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'int', nullable: true, default: 0 })
|
|
17
|
+
financial_approval_id: number;
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'enum', enum: FinancialWorkFlowStatus, default: FinancialWorkFlowStatus.NOT_YET_STARTED })
|
|
21
|
+
status: FinancialWorkFlowStatus;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'int', nullable: true })
|
|
24
|
+
approved_by_user_id: number;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'int', nullable: true })
|
|
27
|
+
content: string;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
|
|
30
|
+
activity_date: Date;
|
|
31
|
+
|
|
32
|
+
constructor(
|
|
33
|
+
financial_request_id: number,
|
|
34
|
+
status: FinancialWorkFlowStatus,
|
|
35
|
+
approved_by_user_id: number,
|
|
36
|
+
content: string
|
|
37
|
+
) {
|
|
38
|
+
super();
|
|
39
|
+
this.financial_request_id = financial_request_id;
|
|
40
|
+
this.status = status;
|
|
41
|
+
this.financial_approval_id = 0;
|
|
42
|
+
this.activity_date = new Date();
|
|
43
|
+
this.approved_by_user_id = approved_by_user_id;
|
|
44
|
+
this.content = content;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Column, Entity, OneToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'payslip_requests' })
|
|
5
|
+
export class PayslipRequests extends BaseModel {
|
|
6
|
+
@Column({ type: 'int', unique: true })
|
|
7
|
+
financial_request_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'varchar', length: 7 })
|
|
10
|
+
payslip_month: string; // Format: 2025-01
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'int', nullable: true })
|
|
13
|
+
payslip_year: number;
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
18
|
+
payslip_url: string;
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
constructor(financial_request_id: number, payslip_month: string, payslip_year: number, payslip_url: string) {
|
|
22
|
+
super();
|
|
23
|
+
this.financial_request_id = financial_request_id;
|
|
24
|
+
this.payslip_month = payslip_month;
|
|
25
|
+
this.payslip_year = payslip_year;
|
|
26
|
+
this.payslip_url = payslip_url;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Column, Entity, OneToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'reimbursement_requests' })
|
|
5
|
+
export class ReimbursementRequests extends BaseModel {
|
|
6
|
+
@Column({ type: 'int', unique: true })
|
|
7
|
+
financial_request_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'text' })
|
|
10
|
+
expense_description: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'decimal', precision: 10, scale: 2 })
|
|
13
|
+
price: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'decimal', precision: 10, scale: 2 })
|
|
16
|
+
quantity: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'decimal', precision: 10, scale: 2 })
|
|
19
|
+
amount: number;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'decimal', precision: 10, scale: 2 })
|
|
22
|
+
total_amount: number;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
25
|
+
approved_amount: number;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'boolean', default: false })
|
|
28
|
+
payment_processed: boolean;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
31
|
+
payment_mode: string;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'date', nullable: true })
|
|
34
|
+
payment_date: Date;
|
|
35
|
+
|
|
36
|
+
constructor(
|
|
37
|
+
financial_request_id: number,
|
|
38
|
+
amount: number,
|
|
39
|
+
quantity: number,
|
|
40
|
+
total_amount: number,
|
|
41
|
+
approved_amount: number,
|
|
42
|
+
payment_mode: string,
|
|
43
|
+
payment_date: Date,
|
|
44
|
+
expense_description: string
|
|
45
|
+
) {
|
|
46
|
+
super();
|
|
47
|
+
this.financial_request_id = financial_request_id;
|
|
48
|
+
this.amount = amount;
|
|
49
|
+
this.quantity = quantity;
|
|
50
|
+
this.total_amount = total_amount;
|
|
51
|
+
this.approved_amount = approved_amount;
|
|
52
|
+
this.payment_mode = payment_mode;
|
|
53
|
+
this.payment_date = payment_date;
|
|
54
|
+
this.expense_description = expense_description;
|
|
55
|
+
this.payment_processed = false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'request_type_master' })
|
|
5
|
+
export class RequestTypeMaster extends BaseModel {
|
|
6
|
+
@Column({ type: 'varchar', length: 10, unique: true })
|
|
7
|
+
request_code: string; // FM001, FM002, FM003, FM004, FM005
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'varchar', length: 255 })
|
|
10
|
+
request_name: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'text', nullable: true })
|
|
13
|
+
description: string;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
16
|
+
specific_table_name: string; // payslip_requests, salary_certificate_requests, etc.
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'boolean', default: true })
|
|
19
|
+
is_active: boolean;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
22
|
+
icon: string;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'int', nullable: true })
|
|
25
|
+
max_sla_days: number;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'int', default: 0 })
|
|
28
|
+
display_order: number;
|
|
29
|
+
|
|
30
|
+
constructor(request_code: string, request_name: string) {
|
|
31
|
+
super();
|
|
32
|
+
this.request_code = request_code;
|
|
33
|
+
this.request_name = request_name;
|
|
34
|
+
this.is_active = true;
|
|
35
|
+
this.display_order = 0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Column, Entity, OneToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'salary_certificate_requests' })
|
|
5
|
+
export class SalaryCertificateRequests extends BaseModel {
|
|
6
|
+
@Column({ type: 'int', unique: true })
|
|
7
|
+
financial_request_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'varchar', length: 255 })
|
|
10
|
+
certificate_purpose: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
13
|
+
certificate_url: string;
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
constructor(financial_request_id: number, certificate_purpose: string, certificate_url: string) {
|
|
18
|
+
super();
|
|
19
|
+
this.financial_request_id = financial_request_id;
|
|
20
|
+
this.certificate_purpose = certificate_purpose;
|
|
21
|
+
this.certificate_url = certificate_url;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
package/src/models/role.ts
CHANGED
|
@@ -12,6 +12,12 @@ Userrole Information will store
|
|
|
12
12
|
import { Column, Entity } from "typeorm";
|
|
13
13
|
import { BaseModel } from './BaseModel';
|
|
14
14
|
|
|
15
|
+
export interface Irole {
|
|
16
|
+
name: string;
|
|
17
|
+
id?: number;
|
|
18
|
+
is_deleted?: boolean;
|
|
19
|
+
created_by?: number;
|
|
20
|
+
}
|
|
15
21
|
@Entity({ name: 'role' })
|
|
16
22
|
export class Role extends BaseModel {
|
|
17
23
|
|
|
@@ -22,7 +28,7 @@ export class Role extends BaseModel {
|
|
|
22
28
|
is_deleted?: boolean;
|
|
23
29
|
|
|
24
30
|
|
|
25
|
-
constructor(name: string,
|
|
31
|
+
constructor(name: string,is_deleted:boolean,userId: number) {
|
|
26
32
|
super();
|
|
27
33
|
this.name = name
|
|
28
34
|
this.is_deleted = is_deleted
|
|
@@ -1,34 +0,0 @@
|
|
|
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);
|
|
@@ -1,34 +0,0 @@
|
|
|
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);
|
|
@@ -1,29 +0,0 @@
|
|
|
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);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare class Holidays extends BaseModel {
|
|
3
|
-
title: string;
|
|
4
|
-
holiday_date: Date;
|
|
5
|
-
description?: string;
|
|
6
|
-
region?: string;
|
|
7
|
-
is_optional: boolean;
|
|
8
|
-
holiday_type: string;
|
|
9
|
-
year?: number;
|
|
10
|
-
constructor(title: string, holiday_date: Date, description?: string, region?: string, is_optional?: boolean, holiday_type?: string, year?: number);
|
|
11
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
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.Holidays = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let Holidays = class Holidays extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(title, holiday_date, description, region, is_optional = false, holiday_type = 'Public', year) {
|
|
17
|
-
super();
|
|
18
|
-
this.title = title;
|
|
19
|
-
this.holiday_date = holiday_date;
|
|
20
|
-
this.description = description;
|
|
21
|
-
this.region = region;
|
|
22
|
-
this.is_optional = is_optional;
|
|
23
|
-
this.holiday_type = holiday_type;
|
|
24
|
-
this.year = year;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.Holidays = Holidays;
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 200 }),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], Holidays.prototype, "title", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, typeorm_1.Column)({ type: 'date', name: 'holiday_date' }),
|
|
34
|
-
__metadata("design:type", Date)
|
|
35
|
-
], Holidays.prototype, "holiday_date", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], Holidays.prototype, "description", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
|
|
42
|
-
__metadata("design:type", String)
|
|
43
|
-
], Holidays.prototype, "region", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({ type: 'boolean', name: 'is_optional', default: false }),
|
|
46
|
-
__metadata("design:type", Boolean)
|
|
47
|
-
], Holidays.prototype, "is_optional", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 30, name: 'holiday_type', default: 'Public' }),
|
|
50
|
-
__metadata("design:type", String)
|
|
51
|
-
], Holidays.prototype, "holiday_type", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
54
|
-
__metadata("design:type", Number)
|
|
55
|
-
], Holidays.prototype, "year", void 0);
|
|
56
|
-
exports.Holidays = Holidays = __decorate([
|
|
57
|
-
(0, typeorm_1.Entity)({ name: 'holidays' }),
|
|
58
|
-
__metadata("design:paramtypes", [String, Date, String, String, Boolean, String, Number])
|
|
59
|
-
], Holidays);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
import { Rating } from './feedbackModel';
|
|
3
|
-
export declare class PortalFeedback extends BaseModel {
|
|
4
|
-
comment: string;
|
|
5
|
-
rating: Rating;
|
|
6
|
-
user_Id: number;
|
|
7
|
-
constructor(comment: string, rating: Rating, user_Id: number);
|
|
8
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** *
|
|
2
|
-
@author
|
|
3
|
-
Amnet Digital
|
|
4
|
-
@date
|
|
5
|
-
2024-05-20
|
|
6
|
-
@Model
|
|
7
|
-
Role
|
|
8
|
-
@usage
|
|
9
|
-
Userrole Information will store
|
|
10
|
-
*/
|
|
11
|
-
import { BaseModel } from './BaseModel';
|
|
12
|
-
export declare class RoleRights extends BaseModel {
|
|
13
|
-
user_role_id: number;
|
|
14
|
-
service_id: number;
|
|
15
|
-
constructor(user_role_id: number, service_id: number);
|
|
16
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/** *
|
|
3
|
-
@author
|
|
4
|
-
Amnet Digital
|
|
5
|
-
@date
|
|
6
|
-
2024-05-20
|
|
7
|
-
@Model
|
|
8
|
-
Role
|
|
9
|
-
@usage
|
|
10
|
-
Userrole Information will store
|
|
11
|
-
*/
|
|
12
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
13
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17
|
-
};
|
|
18
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.RoleRights = void 0;
|
|
23
|
-
const typeorm_1 = require("typeorm");
|
|
24
|
-
const BaseModel_1 = require("./BaseModel");
|
|
25
|
-
let RoleRights = class RoleRights extends BaseModel_1.BaseModel {
|
|
26
|
-
constructor(user_role_id, service_id) {
|
|
27
|
-
super();
|
|
28
|
-
this.user_role_id = user_role_id;
|
|
29
|
-
this.service_id = service_id;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
exports.RoleRights = RoleRights;
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
35
|
-
__metadata("design:type", Number)
|
|
36
|
-
], RoleRights.prototype, "user_role_id", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({ type: 'bigint', nullable: false }),
|
|
39
|
-
__metadata("design:type", Number)
|
|
40
|
-
], RoleRights.prototype, "service_id", void 0);
|
|
41
|
-
exports.RoleRights = RoleRights = __decorate([
|
|
42
|
-
(0, typeorm_1.Entity)({ name: 'role_rights' }),
|
|
43
|
-
__metadata("design:paramtypes", [Number, Number])
|
|
44
|
-
], RoleRights);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/** *
|
|
2
|
-
@author
|
|
3
|
-
Amnet Digital
|
|
4
|
-
@date
|
|
5
|
-
2024-05-20
|
|
6
|
-
@Model
|
|
7
|
-
Role
|
|
8
|
-
@usage
|
|
9
|
-
Userrole Information will store
|
|
10
|
-
*/
|
|
11
|
-
import { BaseModel } from './BaseModel';
|
|
12
|
-
export declare class UserRole extends BaseModel {
|
|
13
|
-
role_id: number;
|
|
14
|
-
user_id: number;
|
|
15
|
-
department_id: number;
|
|
16
|
-
section_id: number;
|
|
17
|
-
constructor(role_id: number, user_id: number, department_id: number, section_id: number);
|
|
18
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
@Entity({ name: 'holidays' })
|
|
5
|
-
export class Holidays extends BaseModel {
|
|
6
|
-
|
|
7
|
-
@Column({ type: 'varchar', length: 200 })
|
|
8
|
-
title: string;
|
|
9
|
-
|
|
10
|
-
@Column({ type: 'date', name: 'holiday_date' })
|
|
11
|
-
holiday_date: Date;
|
|
12
|
-
|
|
13
|
-
@Column({ type: 'text', nullable: true })
|
|
14
|
-
description?: string;
|
|
15
|
-
|
|
16
|
-
@Column({ type: 'varchar', length: 200, nullable: true })
|
|
17
|
-
region?: string;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'boolean', name: 'is_optional', default: false })
|
|
20
|
-
is_optional: boolean;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'varchar', length: 30, name: 'holiday_type', default: 'Public' })
|
|
23
|
-
holiday_type: string;
|
|
24
|
-
|
|
25
|
-
@Column({ type: 'int', nullable: true })
|
|
26
|
-
year?: number;
|
|
27
|
-
|
|
28
|
-
constructor(
|
|
29
|
-
title: string,
|
|
30
|
-
holiday_date: Date,
|
|
31
|
-
description?: string,
|
|
32
|
-
region?: string,
|
|
33
|
-
is_optional: boolean = false,
|
|
34
|
-
holiday_type: string = 'Public',
|
|
35
|
-
year?: number
|
|
36
|
-
) {
|
|
37
|
-
super();
|
|
38
|
-
this.title = title;
|
|
39
|
-
this.holiday_date = holiday_date;
|
|
40
|
-
this.description = description;
|
|
41
|
-
this.region = region;
|
|
42
|
-
this.is_optional = is_optional;
|
|
43
|
-
this.holiday_type = holiday_type;
|
|
44
|
-
this.year = year;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Column, Entity } from "typeorm";
|
|
3
|
-
import { BaseModel } from './BaseModel';
|
|
4
|
-
import { Rating } from './feedbackModel';
|
|
5
|
-
|
|
6
|
-
@Entity({ name: 'portal_feedback' })
|
|
7
|
-
export class PortalFeedback extends BaseModel {
|
|
8
|
-
|
|
9
|
-
@Column({ nullable: true })
|
|
10
|
-
comment: string;
|
|
11
|
-
|
|
12
|
-
@Column({
|
|
13
|
-
type: "enum",
|
|
14
|
-
enum: Rating,
|
|
15
|
-
nullable: true,
|
|
16
|
-
})
|
|
17
|
-
rating: Rating;
|
|
18
|
-
|
|
19
|
-
@Column({ nullable: true })
|
|
20
|
-
user_Id: number;
|
|
21
|
-
|
|
22
|
-
constructor(
|
|
23
|
-
comment: string,
|
|
24
|
-
rating: Rating,
|
|
25
|
-
user_Id: number,
|
|
26
|
-
) {
|
|
27
|
-
super();
|
|
28
|
-
this.comment = comment,
|
|
29
|
-
this.rating = rating,
|
|
30
|
-
this.user_Id = user_Id
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/** *
|
|
2
|
-
@author
|
|
3
|
-
Amnet Digital
|
|
4
|
-
@date
|
|
5
|
-
2024-05-20
|
|
6
|
-
@Model
|
|
7
|
-
Role
|
|
8
|
-
@usage
|
|
9
|
-
Userrole Information will store
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { Column, Entity } from "typeorm";
|
|
13
|
-
import { BaseModel } from './BaseModel';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@Entity({ name: 'role_rights' })
|
|
17
|
-
export class RoleRights extends BaseModel {
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'bigint', nullable: true })
|
|
20
|
-
user_role_id: number;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'bigint', nullable: false })
|
|
23
|
-
service_id: number;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
constructor(user_role_id: number, service_id: number) {
|
|
27
|
-
super();
|
|
28
|
-
this.user_role_id = user_role_id
|
|
29
|
-
this.service_id = service_id
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/** *
|
|
2
|
-
@author
|
|
3
|
-
Amnet Digital
|
|
4
|
-
@date
|
|
5
|
-
2024-05-20
|
|
6
|
-
@Model
|
|
7
|
-
Role
|
|
8
|
-
@usage
|
|
9
|
-
Userrole Information will store
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { Column, Entity } from "typeorm";
|
|
13
|
-
import { BaseModel } from './BaseModel';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@Entity({ name: 'user_role' })
|
|
17
|
-
export class UserRole extends BaseModel {
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'bigint', nullable: false })
|
|
20
|
-
role_id: number;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'bigint', nullable: false })
|
|
23
|
-
user_id: number;
|
|
24
|
-
|
|
25
|
-
@Column({ type: 'bigint', nullable: true })
|
|
26
|
-
department_id: number;
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'bigint', nullable: true })
|
|
29
|
-
section_id: number;
|
|
30
|
-
|
|
31
|
-
constructor(role_id: number, user_id: number, department_id: number, section_id: number) {
|
|
32
|
-
super();
|
|
33
|
-
this.role_id = role_id
|
|
34
|
-
this.user_id = user_id
|
|
35
|
-
this.department_id = department_id
|
|
36
|
-
this.section_id = section_id
|
|
37
|
-
}
|
|
38
|
-
}
|