@platform-modules/foreign-ministry 1.0.25 → 1.0.26
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/dist/data-source.js +5 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/models/faqsModel.d.ts +11 -0
- package/dist/models/faqsModel.js +57 -0
- package/dist/models/questionTagsModel.d.ts +6 -0
- package/dist/models/questionTagsModel.js +34 -0
- package/dist/models/user.d.ts +2 -1
- package/dist/models/user.js +7 -2
- package/package.json +1 -1
- package/src/data-source.ts +5 -1
- package/src/index.ts +3 -1
- package/src/models/faqsModel.ts +43 -0
- package/src/models/questionTagsModel.ts +22 -0
- package/src/models/user.ts +5 -0
- package/dist/models/LeaveApprovalDetailsModel.d.ts +0 -13
- package/dist/models/LeaveApprovalDetailsModel.js +0 -51
- package/dist/models/LeaveApprovalMatrixModel.d.ts +0 -7
- package/dist/models/LeaveApprovalMatrixModel.js +0 -40
package/.env
CHANGED
package/dist/data-source.js
CHANGED
|
@@ -24,6 +24,8 @@ const SectionModel_1 = require("./models/SectionModel");
|
|
|
24
24
|
const DesignationModel_1 = require("./models/DesignationModel");
|
|
25
25
|
const DepartmentsModel_1 = require("./models/DepartmentsModel");
|
|
26
26
|
const DivisionModel_1 = require("./models/DivisionModel");
|
|
27
|
+
const faqsModel_1 = require("./models/faqsModel");
|
|
28
|
+
const questionTagsModel_1 = require("./models/questionTagsModel");
|
|
27
29
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
28
30
|
type: 'postgres',
|
|
29
31
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -52,6 +54,8 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
52
54
|
SectionModel_1.Sections,
|
|
53
55
|
DesignationModel_1.Designation,
|
|
54
56
|
DepartmentsModel_1.Departments,
|
|
55
|
-
DivisionModel_1.Division
|
|
57
|
+
DivisionModel_1.Division,
|
|
58
|
+
faqsModel_1.Faqs,
|
|
59
|
+
questionTagsModel_1.QuestionTags
|
|
56
60
|
],
|
|
57
61
|
});
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -33,3 +33,5 @@ __exportStar(require("./models/SectionModel"), exports);
|
|
|
33
33
|
__exportStar(require("./models/DesignationModel"), exports);
|
|
34
34
|
__exportStar(require("./models/DepartmentsModel"), exports);
|
|
35
35
|
__exportStar(require("./models/DivisionModel"), exports);
|
|
36
|
+
__exportStar(require("./models/faqsModel"), exports);
|
|
37
|
+
__exportStar(require("./models/questionTagsModel"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class Faqs extends BaseModel {
|
|
3
|
+
question: string;
|
|
4
|
+
answer: string;
|
|
5
|
+
category_Id: number;
|
|
6
|
+
sub_category_Id: number;
|
|
7
|
+
department_Id: number;
|
|
8
|
+
like_count: number;
|
|
9
|
+
dislike_count: number;
|
|
10
|
+
constructor(question: string, answer: string, category_Id: number, sub_category_Id: number, department_Id: number);
|
|
11
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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.Faqs = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let Faqs = class Faqs extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(question, answer, category_Id, sub_category_Id, department_Id) {
|
|
17
|
+
super();
|
|
18
|
+
this.question = question,
|
|
19
|
+
this.answer = answer,
|
|
20
|
+
this.category_Id = category_Id,
|
|
21
|
+
this.sub_category_Id = sub_category_Id,
|
|
22
|
+
this.department_Id = department_Id;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.Faqs = Faqs;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], Faqs.prototype, "question", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], Faqs.prototype, "answer", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], Faqs.prototype, "category_Id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], Faqs.prototype, "sub_category_Id", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], Faqs.prototype, "department_Id", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ nullable: true, default: 0 }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], Faqs.prototype, "like_count", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ nullable: true, default: 0 }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], Faqs.prototype, "dislike_count", void 0);
|
|
54
|
+
exports.Faqs = Faqs = __decorate([
|
|
55
|
+
(0, typeorm_1.Entity)({ name: 'faqs' }),
|
|
56
|
+
__metadata("design:paramtypes", [String, String, Number, Number, Number])
|
|
57
|
+
], Faqs);
|
|
@@ -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/dist/models/user.d.ts
CHANGED
|
@@ -27,5 +27,6 @@ export declare class User extends BaseModel {
|
|
|
27
27
|
address?: string;
|
|
28
28
|
residential_status?: string;
|
|
29
29
|
religion?: string;
|
|
30
|
-
|
|
30
|
+
avatar?: string;
|
|
31
|
+
constructor(employee_id?: number, employee_name?: string, employee_arabic_name?: string, date_of_birth?: string, region_of_birth?: string, country_of_birth?: string, date_of_joining?: string, last_promotion_date?: string, gender?: string, marital_status?: string, nationality?: string, email?: string, blood_group?: string, national_id?: number, mobile?: string, department?: number, section?: number, grade?: number, location?: string, country?: string, is_admin?: boolean, division?: number, reporting_to?: number, address?: string, residential_status?: string, religion?: string, designation?: number, avatar?: string);
|
|
31
32
|
}
|
package/dist/models/user.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.User = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
let User = class User extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(employee_id, employee_name, employee_arabic_name, date_of_birth, region_of_birth, country_of_birth, date_of_joining, last_promotion_date, gender, marital_status, nationality, email, blood_group, national_id, mobile, department, section, grade, location, country, is_admin, division, reporting_to, address, residential_status, religion, designation) {
|
|
16
|
+
constructor(employee_id, employee_name, employee_arabic_name, date_of_birth, region_of_birth, country_of_birth, date_of_joining, last_promotion_date, gender, marital_status, nationality, email, blood_group, national_id, mobile, department, section, grade, location, country, is_admin, division, reporting_to, address, residential_status, religion, designation, avatar) {
|
|
17
17
|
super();
|
|
18
18
|
this.employee_id = employee_id;
|
|
19
19
|
this.employee_name = employee_name;
|
|
@@ -42,6 +42,7 @@ let User = class User extends BaseModel_1.BaseModel {
|
|
|
42
42
|
this.residential_status = residential_status;
|
|
43
43
|
this.religion = religion;
|
|
44
44
|
this.designation = designation;
|
|
45
|
+
this.avatar = avatar;
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
48
|
exports.User = User;
|
|
@@ -153,7 +154,11 @@ __decorate([
|
|
|
153
154
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
154
155
|
__metadata("design:type", String)
|
|
155
156
|
], User.prototype, "religion", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
159
|
+
__metadata("design:type", String)
|
|
160
|
+
], User.prototype, "avatar", void 0);
|
|
156
161
|
exports.User = User = __decorate([
|
|
157
162
|
(0, typeorm_1.Entity)({ name: 'users' }),
|
|
158
|
-
__metadata("design:paramtypes", [Number, String, String, String, String, String, String, String, String, String, String, String, String, Number, String, Number, Number, Number, String, String, Boolean, Number, Number, String, String, String, Number])
|
|
163
|
+
__metadata("design:paramtypes", [Number, String, String, String, String, String, String, String, String, String, String, String, String, Number, String, Number, Number, Number, String, String, Boolean, Number, Number, String, String, String, Number, String])
|
|
159
164
|
], User);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -23,6 +23,8 @@ import { Departments } from './models/DepartmentsModel';
|
|
|
23
23
|
import { Division } from './models/DivisionModel';
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
import { Faqs } from './models/faqsModel';
|
|
27
|
+
import { QuestionTags } from './models/questionTagsModel';
|
|
26
28
|
|
|
27
29
|
|
|
28
30
|
export const AppDataSource = new DataSource({
|
|
@@ -53,6 +55,8 @@ export const AppDataSource = new DataSource({
|
|
|
53
55
|
Sections,
|
|
54
56
|
Designation,
|
|
55
57
|
Departments,
|
|
56
|
-
Division
|
|
58
|
+
Division,
|
|
59
|
+
Faqs,
|
|
60
|
+
QuestionTags
|
|
57
61
|
],
|
|
58
62
|
});
|
package/src/index.ts
CHANGED
|
@@ -16,4 +16,6 @@ export * from './models/LeaveWorkFlowModel';
|
|
|
16
16
|
export * from './models/SectionModel';
|
|
17
17
|
export * from './models/DesignationModel';
|
|
18
18
|
export * from './models/DepartmentsModel';
|
|
19
|
-
export * from './models/DivisionModel';
|
|
19
|
+
export * from './models/DivisionModel';
|
|
20
|
+
export * from './models/faqsModel';
|
|
21
|
+
export * from './models/questionTagsModel';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
import { Column, Entity ,BeforeInsert,BeforeUpdate } from "typeorm";
|
|
3
|
+
import { BaseModel } from './BaseModel';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'faqs' })
|
|
6
|
+
export class Faqs extends BaseModel {
|
|
7
|
+
|
|
8
|
+
@Column({ nullable: true })
|
|
9
|
+
question: string;
|
|
10
|
+
|
|
11
|
+
@Column({ nullable: true })
|
|
12
|
+
answer: string;
|
|
13
|
+
|
|
14
|
+
@Column({ nullable: true })
|
|
15
|
+
category_Id: number;
|
|
16
|
+
|
|
17
|
+
@Column({ nullable: true })
|
|
18
|
+
sub_category_Id: number;
|
|
19
|
+
|
|
20
|
+
@Column({ nullable: true })
|
|
21
|
+
department_Id: number;
|
|
22
|
+
|
|
23
|
+
@Column({ nullable: true, default: 0 })
|
|
24
|
+
like_count: number;
|
|
25
|
+
|
|
26
|
+
@Column({ nullable: true, default: 0 })
|
|
27
|
+
dislike_count: number;
|
|
28
|
+
|
|
29
|
+
constructor(
|
|
30
|
+
question: string,
|
|
31
|
+
answer: string,
|
|
32
|
+
category_Id: number,
|
|
33
|
+
sub_category_Id: number,
|
|
34
|
+
department_Id: number,
|
|
35
|
+
) {
|
|
36
|
+
super();
|
|
37
|
+
this.question = question,
|
|
38
|
+
this.answer = answer,
|
|
39
|
+
this.category_Id = category_Id ,
|
|
40
|
+
this.sub_category_Id = sub_category_Id,
|
|
41
|
+
this.department_Id = department_Id
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
import { Column, Entity ,BeforeInsert,BeforeUpdate } from "typeorm";
|
|
3
|
+
import { BaseModel } from './BaseModel';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'question_tags' })
|
|
6
|
+
export class QuestionTags extends BaseModel {
|
|
7
|
+
|
|
8
|
+
@Column({ nullable: true })
|
|
9
|
+
name: string;
|
|
10
|
+
|
|
11
|
+
@Column({ nullable: true })
|
|
12
|
+
question_Id: number;
|
|
13
|
+
|
|
14
|
+
constructor(
|
|
15
|
+
name: string,
|
|
16
|
+
question_Id: number
|
|
17
|
+
) {
|
|
18
|
+
super();
|
|
19
|
+
this.name = name,
|
|
20
|
+
this.question_Id = question_Id
|
|
21
|
+
}
|
|
22
|
+
}
|
package/src/models/user.ts
CHANGED
|
@@ -85,6 +85,9 @@ export class User extends BaseModel {
|
|
|
85
85
|
@Column({ nullable: true })
|
|
86
86
|
religion?: string;
|
|
87
87
|
|
|
88
|
+
@Column({ nullable: true })
|
|
89
|
+
avatar?: string;
|
|
90
|
+
|
|
88
91
|
constructor(
|
|
89
92
|
employee_id?: number,
|
|
90
93
|
employee_name?: string,
|
|
@@ -113,6 +116,7 @@ export class User extends BaseModel {
|
|
|
113
116
|
residential_status?: string,
|
|
114
117
|
religion?: string,
|
|
115
118
|
designation?: number,
|
|
119
|
+
avatar?: string,
|
|
116
120
|
) {
|
|
117
121
|
super();
|
|
118
122
|
this.employee_id = employee_id;
|
|
@@ -142,5 +146,6 @@ export class User extends BaseModel {
|
|
|
142
146
|
this.residential_status = residential_status;
|
|
143
147
|
this.religion = religion;
|
|
144
148
|
this.designation = designation;
|
|
149
|
+
this.avatar = avatar;
|
|
145
150
|
}
|
|
146
151
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare enum ApprovalStatus {
|
|
3
|
-
PENDING = "Pending",
|
|
4
|
-
APPROVED = "Approved",
|
|
5
|
-
REJECTED = "Rejected"
|
|
6
|
-
}
|
|
7
|
-
export declare class LeaveApprovalDetails extends BaseModel {
|
|
8
|
-
leave_request_id: number;
|
|
9
|
-
level: number;
|
|
10
|
-
approver_id: number;
|
|
11
|
-
approval_status: ApprovalStatus;
|
|
12
|
-
constructor(leave_request_id: number, approver_id: number, approval_status: ApprovalStatus, level: number);
|
|
13
|
-
}
|
|
@@ -1,51 +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.LeaveApprovalDetails = exports.ApprovalStatus = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
var ApprovalStatus;
|
|
16
|
-
(function (ApprovalStatus) {
|
|
17
|
-
ApprovalStatus["PENDING"] = "Pending";
|
|
18
|
-
ApprovalStatus["APPROVED"] = "Approved";
|
|
19
|
-
ApprovalStatus["REJECTED"] = "Rejected";
|
|
20
|
-
})(ApprovalStatus || (exports.ApprovalStatus = ApprovalStatus = {}));
|
|
21
|
-
//This model is used to store the store the leave apporval details of the user for the leave request
|
|
22
|
-
let LeaveApprovalDetails = class LeaveApprovalDetails extends BaseModel_1.BaseModel {
|
|
23
|
-
constructor(leave_request_id, approver_id, approval_status, level) {
|
|
24
|
-
super();
|
|
25
|
-
this.leave_request_id = leave_request_id;
|
|
26
|
-
this.approver_id = approver_id;
|
|
27
|
-
this.approval_status = approval_status;
|
|
28
|
-
this.level = level;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
exports.LeaveApprovalDetails = LeaveApprovalDetails;
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
34
|
-
__metadata("design:type", Number)
|
|
35
|
-
], LeaveApprovalDetails.prototype, "leave_request_id", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
38
|
-
__metadata("design:type", Number)
|
|
39
|
-
], LeaveApprovalDetails.prototype, "level", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
42
|
-
__metadata("design:type", Number)
|
|
43
|
-
], LeaveApprovalDetails.prototype, "approver_id", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({ type: 'enum', enum: ApprovalStatus, default: ApprovalStatus.PENDING, nullable: false }),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], LeaveApprovalDetails.prototype, "approval_status", void 0);
|
|
48
|
-
exports.LeaveApprovalDetails = LeaveApprovalDetails = __decorate([
|
|
49
|
-
(0, typeorm_1.Entity)({ name: 'leave_approval_details' }),
|
|
50
|
-
__metadata("design:paramtypes", [Number, Number, String, Number])
|
|
51
|
-
], LeaveApprovalDetails);
|
|
@@ -1,40 +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.LeaveApprovalMatrix = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
//This model is used to store the store the leave apporval matrix(HOD, Manager, HR, Director) based on leave type along with the levels
|
|
16
|
-
let LeaveApprovalMatrix = class LeaveApprovalMatrix extends BaseModel_1.BaseModel {
|
|
17
|
-
constructor(leave_type, level, approval_matrix) {
|
|
18
|
-
super();
|
|
19
|
-
this.leave_type = leave_type;
|
|
20
|
-
this.level = level;
|
|
21
|
-
this.approval_matrix = approval_matrix;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
exports.LeaveApprovalMatrix = LeaveApprovalMatrix;
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
27
|
-
__metadata("design:type", Number)
|
|
28
|
-
], LeaveApprovalMatrix.prototype, "leave_type", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
31
|
-
__metadata("design:type", Number)
|
|
32
|
-
], LeaveApprovalMatrix.prototype, "level", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], LeaveApprovalMatrix.prototype, "approval_matrix", void 0);
|
|
37
|
-
exports.LeaveApprovalMatrix = LeaveApprovalMatrix = __decorate([
|
|
38
|
-
(0, typeorm_1.Entity)({ name: 'leave_approval_matrix' }),
|
|
39
|
-
__metadata("design:paramtypes", [Number, Number, String])
|
|
40
|
-
], LeaveApprovalMatrix);
|