@platform-modules/foreign-ministry 1.0.22 → 1.0.24
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 +8 -4
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/models/DepartmentsModel.d.ts +7 -0
- package/dist/models/DepartmentsModel.js +39 -0
- package/dist/models/DesignationModel.d.ts +6 -0
- package/dist/models/{questionTagsModel.js → DesignationModel.js} +13 -13
- package/dist/models/DivisionModel.d.ts +6 -0
- package/dist/models/DivisionModel.js +34 -0
- package/dist/models/LeaveApprovalDetailsModel.d.ts +13 -0
- package/dist/models/LeaveApprovalDetailsModel.js +51 -0
- package/dist/models/LeaveApprovalMatrixModel.d.ts +7 -0
- package/dist/models/LeaveApprovalMatrixModel.js +40 -0
- package/dist/models/SectionModel.d.ts +8 -0
- package/dist/models/SectionModel.js +44 -0
- package/dist/models/user.d.ts +28 -16
- package/dist/models/user.js +94 -39
- package/package.json +1 -1
- package/src/data-source.ts +10 -4
- package/src/index.ts +4 -2
- package/src/models/DepartmentsModel.ts +26 -0
- package/src/models/DesignationModel.ts +19 -0
- package/src/models/DivisionModel.ts +19 -0
- package/src/models/SectionModel.ts +31 -0
- package/src/models/user.ts +106 -60
- package/dist/models/faqsModel.d.ts +0 -11
- package/dist/models/faqsModel.js +0 -57
- package/dist/models/questionTagsModel.d.ts +0 -6
- package/src/models/faqsModel.ts +0 -43
- package/src/models/questionTagsModel.ts +0 -22
package/.env
CHANGED
package/dist/data-source.js
CHANGED
|
@@ -20,8 +20,10 @@ const LeaveApprovalsModel_1 = require("./models/LeaveApprovalsModel");
|
|
|
20
20
|
const LeaveAttachmentsModel_1 = require("./models/LeaveAttachmentsModel");
|
|
21
21
|
const LeaveChatModel_1 = require("./models/LeaveChatModel");
|
|
22
22
|
const LeaveWorkFlowModel_1 = require("./models/LeaveWorkFlowModel");
|
|
23
|
-
const
|
|
24
|
-
const
|
|
23
|
+
const SectionModel_1 = require("./models/SectionModel");
|
|
24
|
+
const DesignationModel_1 = require("./models/DesignationModel");
|
|
25
|
+
const DepartmentsModel_1 = require("./models/DepartmentsModel");
|
|
26
|
+
const DivisionModel_1 = require("./models/DivisionModel");
|
|
25
27
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
26
28
|
type: 'postgres',
|
|
27
29
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -47,7 +49,9 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
47
49
|
LeaveAttachmentsModel_1.LeaveAttachments,
|
|
48
50
|
LeaveChatModel_1.LeaveChat,
|
|
49
51
|
LeaveWorkFlowModel_1.LeaveWorkFlow,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
SectionModel_1.Sections,
|
|
53
|
+
DesignationModel_1.Designation,
|
|
54
|
+
DepartmentsModel_1.Departments,
|
|
55
|
+
DivisionModel_1.Division
|
|
52
56
|
],
|
|
53
57
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -13,5 +13,7 @@ export * from './models/LeaveApprovalsModel';
|
|
|
13
13
|
export * from './models/LeaveAttachmentsModel';
|
|
14
14
|
export * from './models/LeaveChatModel';
|
|
15
15
|
export * from './models/LeaveWorkFlowModel';
|
|
16
|
-
export * from './models/
|
|
17
|
-
export * from './models/
|
|
16
|
+
export * from './models/SectionModel';
|
|
17
|
+
export * from './models/DesignationModel';
|
|
18
|
+
export * from './models/DepartmentsModel';
|
|
19
|
+
export * from './models/DivisionModel';
|
package/dist/index.js
CHANGED
|
@@ -29,5 +29,7 @@ __exportStar(require("./models/LeaveApprovalsModel"), exports);
|
|
|
29
29
|
__exportStar(require("./models/LeaveAttachmentsModel"), exports);
|
|
30
30
|
__exportStar(require("./models/LeaveChatModel"), exports);
|
|
31
31
|
__exportStar(require("./models/LeaveWorkFlowModel"), exports);
|
|
32
|
-
__exportStar(require("./models/
|
|
33
|
-
__exportStar(require("./models/
|
|
32
|
+
__exportStar(require("./models/SectionModel"), exports);
|
|
33
|
+
__exportStar(require("./models/DesignationModel"), exports);
|
|
34
|
+
__exportStar(require("./models/DepartmentsModel"), exports);
|
|
35
|
+
__exportStar(require("./models/DivisionModel"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class Departments extends BaseModel {
|
|
3
|
+
department_name: string;
|
|
4
|
+
department_code: string;
|
|
5
|
+
department_description: string;
|
|
6
|
+
constructor(department_name: string, department_code: string, department_description: string);
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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.Departments = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let Departments = class Departments extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(department_name, department_code, department_description) {
|
|
17
|
+
super();
|
|
18
|
+
this.department_name = department_name;
|
|
19
|
+
this.department_code = department_code;
|
|
20
|
+
this.department_description = department_description;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.Departments = Departments;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], Departments.prototype, "department_name", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], Departments.prototype, "department_code", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], Departments.prototype, "department_description", void 0);
|
|
36
|
+
exports.Departments = Departments = __decorate([
|
|
37
|
+
(0, typeorm_1.Entity)({ name: 'departments' }),
|
|
38
|
+
__metadata("design:paramtypes", [String, String, String])
|
|
39
|
+
], Departments);
|
|
@@ -9,26 +9,26 @@ 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.Designation = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let
|
|
16
|
-
constructor(name,
|
|
15
|
+
let Designation = class Designation extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, is_deleted) {
|
|
17
17
|
super();
|
|
18
|
-
this.name = name
|
|
19
|
-
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.is_deleted = is_deleted;
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
exports.
|
|
22
|
+
exports.Designation = Designation;
|
|
23
23
|
__decorate([
|
|
24
24
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
25
|
__metadata("design:type", String)
|
|
26
|
-
],
|
|
26
|
+
], Designation.prototype, "name", void 0);
|
|
27
27
|
__decorate([
|
|
28
28
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
-
__metadata("design:type",
|
|
30
|
-
],
|
|
31
|
-
exports.
|
|
32
|
-
(0, typeorm_1.Entity)({ name: '
|
|
33
|
-
__metadata("design:paramtypes", [String,
|
|
34
|
-
],
|
|
29
|
+
__metadata("design:type", Boolean)
|
|
30
|
+
], Designation.prototype, "is_deleted", void 0);
|
|
31
|
+
exports.Designation = Designation = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'designation' }),
|
|
33
|
+
__metadata("design:paramtypes", [String, Boolean])
|
|
34
|
+
], Designation);
|
|
@@ -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.Division = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let Division = class Division extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, is_deleted) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.is_deleted = is_deleted;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.Division = Division;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], Division.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
+
__metadata("design:type", Boolean)
|
|
30
|
+
], Division.prototype, "is_deleted", void 0);
|
|
31
|
+
exports.Division = Division = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'division' }),
|
|
33
|
+
__metadata("design:paramtypes", [String, Boolean])
|
|
34
|
+
], Division);
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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);
|
|
@@ -0,0 +1,40 @@
|
|
|
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);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class Sections extends BaseModel {
|
|
3
|
+
section_name: string;
|
|
4
|
+
section_code: string;
|
|
5
|
+
section_description: string;
|
|
6
|
+
department_id: number;
|
|
7
|
+
constructor(section_name: string, section_code: string, section_description: string, department_id: number);
|
|
8
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.Sections = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let Sections = class Sections extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(section_name, section_code, section_description, department_id) {
|
|
17
|
+
super();
|
|
18
|
+
this.section_name = section_name;
|
|
19
|
+
this.section_code = section_code;
|
|
20
|
+
this.section_description = section_description;
|
|
21
|
+
this.department_id = department_id;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.Sections = Sections;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], Sections.prototype, "section_name", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], Sections.prototype, "section_code", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], Sections.prototype, "section_description", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], Sections.prototype, "department_id", void 0);
|
|
41
|
+
exports.Sections = Sections = __decorate([
|
|
42
|
+
(0, typeorm_1.Entity)({ name: 'sections' }),
|
|
43
|
+
__metadata("design:paramtypes", [String, String, String, Number])
|
|
44
|
+
], Sections);
|
package/dist/models/user.d.ts
CHANGED
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
2
|
export declare class User extends BaseModel {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
employee_id?: number;
|
|
4
|
+
employee_name?: string;
|
|
5
|
+
employee_arabic_name?: string;
|
|
6
|
+
date_of_birth?: string;
|
|
7
|
+
region_of_birth?: string;
|
|
8
|
+
country_of_birth?: string;
|
|
9
|
+
date_of_joining?: string;
|
|
10
|
+
last_promotion_date?: string;
|
|
11
|
+
gender?: string;
|
|
12
|
+
marital_status?: string;
|
|
13
|
+
nationality?: string;
|
|
14
|
+
email?: string;
|
|
15
|
+
blood_group?: string;
|
|
16
|
+
national_id?: number;
|
|
17
|
+
mobile?: string;
|
|
18
|
+
department?: number;
|
|
19
|
+
section?: number;
|
|
20
|
+
designation?: number;
|
|
21
|
+
grade?: number;
|
|
22
|
+
location?: string;
|
|
23
|
+
country?: string;
|
|
24
|
+
is_admin?: boolean;
|
|
25
|
+
division?: number;
|
|
26
|
+
reporting_to?: number;
|
|
27
|
+
address?: string;
|
|
28
|
+
residential_status?: string;
|
|
29
|
+
religion?: string;
|
|
30
|
+
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);
|
|
19
31
|
}
|
package/dist/models/user.js
CHANGED
|
@@ -13,92 +13,147 @@ 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(
|
|
17
|
-
// contract_start_date: string,
|
|
18
|
-
// contract_end_date: string,
|
|
19
|
-
company) {
|
|
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) {
|
|
20
17
|
super();
|
|
21
|
-
this.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
18
|
+
this.employee_id = employee_id;
|
|
19
|
+
this.employee_name = employee_name;
|
|
20
|
+
this.employee_arabic_name = employee_arabic_name;
|
|
21
|
+
this.date_of_birth = date_of_birth;
|
|
22
|
+
this.region_of_birth = region_of_birth;
|
|
23
|
+
this.country_of_birth = country_of_birth;
|
|
24
|
+
this.date_of_joining = date_of_joining;
|
|
25
|
+
this.last_promotion_date = last_promotion_date;
|
|
26
|
+
this.gender = gender;
|
|
27
|
+
this.marital_status = marital_status;
|
|
28
|
+
this.nationality = nationality;
|
|
29
|
+
this.email = email;
|
|
30
|
+
this.blood_group = blood_group;
|
|
31
|
+
this.national_id = national_id;
|
|
32
|
+
this.mobile = mobile;
|
|
33
|
+
this.department = department;
|
|
34
|
+
this.section = section;
|
|
35
|
+
this.grade = grade;
|
|
36
|
+
this.location = location;
|
|
37
|
+
this.country = country;
|
|
38
|
+
this.is_admin = is_admin;
|
|
39
|
+
this.division = division;
|
|
40
|
+
this.reporting_to = reporting_to;
|
|
41
|
+
this.address = address;
|
|
42
|
+
this.residential_status = residential_status;
|
|
43
|
+
this.religion = religion;
|
|
44
|
+
this.designation = designation;
|
|
38
45
|
}
|
|
39
46
|
};
|
|
40
47
|
exports.User = User;
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], User.prototype, "employee_id", void 0);
|
|
41
52
|
__decorate([
|
|
42
53
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
43
54
|
__metadata("design:type", String)
|
|
44
|
-
], User.prototype, "
|
|
55
|
+
], User.prototype, "employee_name", void 0);
|
|
45
56
|
__decorate([
|
|
46
57
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
47
58
|
__metadata("design:type", String)
|
|
48
|
-
], User.prototype, "
|
|
59
|
+
], User.prototype, "employee_arabic_name", void 0);
|
|
49
60
|
__decorate([
|
|
50
61
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
51
62
|
__metadata("design:type", String)
|
|
52
|
-
], User.prototype, "
|
|
63
|
+
], User.prototype, "date_of_birth", void 0);
|
|
53
64
|
__decorate([
|
|
54
65
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
55
66
|
__metadata("design:type", String)
|
|
56
|
-
], User.prototype, "
|
|
67
|
+
], User.prototype, "region_of_birth", void 0);
|
|
57
68
|
__decorate([
|
|
58
69
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
59
70
|
__metadata("design:type", String)
|
|
60
|
-
], User.prototype, "
|
|
71
|
+
], User.prototype, "country_of_birth", void 0);
|
|
61
72
|
__decorate([
|
|
62
73
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
63
74
|
__metadata("design:type", String)
|
|
64
|
-
], User.prototype, "
|
|
75
|
+
], User.prototype, "date_of_joining", void 0);
|
|
65
76
|
__decorate([
|
|
66
77
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
67
78
|
__metadata("design:type", String)
|
|
68
|
-
], User.prototype, "
|
|
79
|
+
], User.prototype, "last_promotion_date", void 0);
|
|
69
80
|
__decorate([
|
|
70
81
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
71
82
|
__metadata("design:type", String)
|
|
72
|
-
], User.prototype, "
|
|
83
|
+
], User.prototype, "gender", void 0);
|
|
73
84
|
__decorate([
|
|
74
85
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
75
86
|
__metadata("design:type", String)
|
|
76
|
-
], User.prototype, "
|
|
87
|
+
], User.prototype, "marital_status", void 0);
|
|
77
88
|
__decorate([
|
|
78
89
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
79
90
|
__metadata("design:type", String)
|
|
80
|
-
], User.prototype, "
|
|
91
|
+
], User.prototype, "nationality", void 0);
|
|
81
92
|
__decorate([
|
|
82
93
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
83
94
|
__metadata("design:type", String)
|
|
84
|
-
], User.prototype, "
|
|
95
|
+
], User.prototype, "email", void 0);
|
|
85
96
|
__decorate([
|
|
86
|
-
(0, typeorm_1.Column)({ nullable: true
|
|
87
|
-
__metadata("design:type",
|
|
88
|
-
], User.prototype, "
|
|
97
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], User.prototype, "blood_group", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
102
|
+
__metadata("design:type", Number)
|
|
103
|
+
], User.prototype, "national_id", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
106
|
+
__metadata("design:type", String)
|
|
107
|
+
], User.prototype, "mobile", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
110
|
+
__metadata("design:type", Number)
|
|
111
|
+
], User.prototype, "department", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
114
|
+
__metadata("design:type", Number)
|
|
115
|
+
], User.prototype, "section", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
118
|
+
__metadata("design:type", Number)
|
|
119
|
+
], User.prototype, "designation", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
122
|
+
__metadata("design:type", Number)
|
|
123
|
+
], User.prototype, "grade", void 0);
|
|
89
124
|
__decorate([
|
|
90
125
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
91
126
|
__metadata("design:type", String)
|
|
92
|
-
], User.prototype, "
|
|
127
|
+
], User.prototype, "location", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
130
|
+
__metadata("design:type", String)
|
|
131
|
+
], User.prototype, "country", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, typeorm_1.Column)({ nullable: true, default: false }),
|
|
134
|
+
__metadata("design:type", Boolean)
|
|
135
|
+
], User.prototype, "is_admin", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
138
|
+
__metadata("design:type", Number)
|
|
139
|
+
], User.prototype, "division", void 0);
|
|
93
140
|
__decorate([
|
|
94
141
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
95
142
|
__metadata("design:type", Number)
|
|
96
|
-
], User.prototype, "
|
|
143
|
+
], User.prototype, "reporting_to", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
146
|
+
__metadata("design:type", String)
|
|
147
|
+
], User.prototype, "address", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
150
|
+
__metadata("design:type", String)
|
|
151
|
+
], User.prototype, "residential_status", void 0);
|
|
97
152
|
__decorate([
|
|
98
153
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
99
154
|
__metadata("design:type", String)
|
|
100
|
-
], User.prototype, "
|
|
155
|
+
], User.prototype, "religion", void 0);
|
|
101
156
|
exports.User = User = __decorate([
|
|
102
157
|
(0, typeorm_1.Entity)({ name: 'users' }),
|
|
103
|
-
__metadata("design:paramtypes", [String, String, String, String, String, String, String, String, String, String, String,
|
|
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])
|
|
104
159
|
], User);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -17,8 +17,12 @@ import { LeaveApprovalDetails } from './models/LeaveApprovalsModel';
|
|
|
17
17
|
import { LeaveAttachments } from './models/LeaveAttachmentsModel';
|
|
18
18
|
import { LeaveChat } from './models/LeaveChatModel';
|
|
19
19
|
import { LeaveWorkFlow } from './models/LeaveWorkFlowModel';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
20
|
+
import { Sections } from './models/SectionModel';
|
|
21
|
+
import { Designation } from './models/DesignationModel';
|
|
22
|
+
import { Departments } from './models/DepartmentsModel';
|
|
23
|
+
import { Division } from './models/DivisionModel';
|
|
24
|
+
|
|
25
|
+
|
|
22
26
|
|
|
23
27
|
|
|
24
28
|
export const AppDataSource = new DataSource({
|
|
@@ -46,7 +50,9 @@ export const AppDataSource = new DataSource({
|
|
|
46
50
|
LeaveAttachments,
|
|
47
51
|
LeaveChat,
|
|
48
52
|
LeaveWorkFlow,
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
Sections,
|
|
54
|
+
Designation,
|
|
55
|
+
Departments,
|
|
56
|
+
Division
|
|
51
57
|
],
|
|
52
58
|
});
|
package/src/index.ts
CHANGED
|
@@ -13,5 +13,7 @@ export * from './models/LeaveApprovalsModel';
|
|
|
13
13
|
export * from './models/LeaveAttachmentsModel';
|
|
14
14
|
export * from './models/LeaveChatModel';
|
|
15
15
|
export * from './models/LeaveWorkFlowModel';
|
|
16
|
-
export * from './models/
|
|
17
|
-
export * from './models/
|
|
16
|
+
export * from './models/SectionModel';
|
|
17
|
+
export * from './models/DesignationModel';
|
|
18
|
+
export * from './models/DepartmentsModel';
|
|
19
|
+
export * from './models/DivisionModel';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'departments' })
|
|
5
|
+
export class Departments extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'varchar', length: 64, nullable: false, unique: true })
|
|
8
|
+
department_name: string;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'varchar', length: 64, nullable: false, unique: true })
|
|
11
|
+
department_code: string;
|
|
12
|
+
|
|
13
|
+
@Column({ nullable: false })
|
|
14
|
+
department_description: string;
|
|
15
|
+
|
|
16
|
+
constructor(
|
|
17
|
+
department_name: string,
|
|
18
|
+
department_code: string,
|
|
19
|
+
department_description: string,
|
|
20
|
+
) {
|
|
21
|
+
super();
|
|
22
|
+
this.department_name = department_name
|
|
23
|
+
this.department_code = department_code
|
|
24
|
+
this.department_description = department_description
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'designation' })
|
|
5
|
+
export class Designation extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ nullable: true })
|
|
8
|
+
name: string;
|
|
9
|
+
|
|
10
|
+
@Column({ nullable: true })
|
|
11
|
+
is_deleted?: boolean;
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
constructor(name: string,is_deleted:boolean) {
|
|
15
|
+
super();
|
|
16
|
+
this.name = name
|
|
17
|
+
this.is_deleted = is_deleted
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'division' })
|
|
5
|
+
export class Division extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ nullable: true })
|
|
8
|
+
name: string;
|
|
9
|
+
|
|
10
|
+
@Column({ nullable: true })
|
|
11
|
+
is_deleted?: boolean;
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
constructor(name: string,is_deleted:boolean) {
|
|
15
|
+
super();
|
|
16
|
+
this.name = name
|
|
17
|
+
this.is_deleted = is_deleted
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'sections' })
|
|
5
|
+
export class Sections extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'varchar', length: 64, nullable: false, unique: true })
|
|
8
|
+
section_name: string;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'varchar', length: 64, nullable: false, unique: true })
|
|
11
|
+
section_code: string;
|
|
12
|
+
|
|
13
|
+
@Column({ nullable: false })
|
|
14
|
+
section_description: string;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'bigint', nullable: true })
|
|
17
|
+
department_id: number;
|
|
18
|
+
|
|
19
|
+
constructor(
|
|
20
|
+
section_name: string,
|
|
21
|
+
section_code: string,
|
|
22
|
+
section_description: string,
|
|
23
|
+
department_id: number
|
|
24
|
+
) {
|
|
25
|
+
super();
|
|
26
|
+
this.section_name = section_name
|
|
27
|
+
this.section_code = section_code
|
|
28
|
+
this.section_description = section_description
|
|
29
|
+
this.department_id = department_id
|
|
30
|
+
}
|
|
31
|
+
}
|
package/src/models/user.ts
CHANGED
|
@@ -1,100 +1,146 @@
|
|
|
1
|
-
|
|
2
|
-
import { Column, Entity ,BeforeInsert,BeforeUpdate } from "typeorm";
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
3
2
|
import { BaseModel } from './BaseModel';
|
|
4
3
|
|
|
5
4
|
@Entity({ name: 'users' })
|
|
6
5
|
export class User extends BaseModel {
|
|
7
6
|
|
|
7
|
+
@Column({ type: 'bigint', nullable: true })
|
|
8
|
+
employee_id?: number;
|
|
9
|
+
|
|
10
|
+
@Column({ nullable: true })
|
|
11
|
+
employee_name?: string;
|
|
12
|
+
|
|
13
|
+
@Column({ nullable: true })
|
|
14
|
+
employee_arabic_name?: string;
|
|
15
|
+
|
|
8
16
|
@Column({ nullable: true })
|
|
9
|
-
|
|
17
|
+
date_of_birth?: string;
|
|
10
18
|
|
|
11
19
|
@Column({ nullable: true })
|
|
12
|
-
|
|
20
|
+
region_of_birth?: string;
|
|
13
21
|
|
|
14
22
|
@Column({ nullable: true })
|
|
15
|
-
|
|
23
|
+
country_of_birth?: string;
|
|
16
24
|
|
|
17
25
|
@Column({ nullable: true })
|
|
18
|
-
|
|
26
|
+
date_of_joining?: string;
|
|
19
27
|
|
|
20
28
|
@Column({ nullable: true })
|
|
21
|
-
|
|
29
|
+
last_promotion_date?: string;
|
|
22
30
|
|
|
23
31
|
@Column({ nullable: true })
|
|
24
|
-
|
|
32
|
+
gender?: string;
|
|
25
33
|
|
|
26
34
|
@Column({ nullable: true })
|
|
27
|
-
|
|
35
|
+
marital_status?: string;
|
|
28
36
|
|
|
29
37
|
@Column({ nullable: true })
|
|
30
|
-
|
|
38
|
+
nationality?: string;
|
|
31
39
|
|
|
32
40
|
@Column({ nullable: true })
|
|
33
|
-
|
|
41
|
+
email?: string;
|
|
34
42
|
|
|
35
43
|
@Column({ nullable: true })
|
|
36
|
-
|
|
44
|
+
blood_group?: string;
|
|
45
|
+
|
|
46
|
+
@Column({ type: 'bigint', nullable: true })
|
|
47
|
+
national_id?: number;
|
|
37
48
|
|
|
38
49
|
@Column({ nullable: true })
|
|
39
|
-
|
|
50
|
+
mobile?: string;
|
|
40
51
|
|
|
41
|
-
@Column({ nullable: true
|
|
42
|
-
|
|
52
|
+
@Column({ nullable: true })
|
|
53
|
+
department?: number;
|
|
43
54
|
|
|
44
55
|
@Column({ nullable: true })
|
|
45
|
-
|
|
56
|
+
section?: number;
|
|
46
57
|
|
|
47
58
|
@Column({ nullable: true })
|
|
48
|
-
|
|
59
|
+
designation?: number;
|
|
49
60
|
|
|
50
|
-
|
|
51
|
-
|
|
61
|
+
@Column({ nullable: true })
|
|
62
|
+
grade?: number;
|
|
52
63
|
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
@Column({ nullable: true })
|
|
65
|
+
location?: string;
|
|
55
66
|
|
|
56
67
|
@Column({ nullable: true })
|
|
57
|
-
|
|
68
|
+
country?: string;
|
|
58
69
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
company: string
|
|
70
|
+
@Column({ nullable: true , default: false})
|
|
71
|
+
is_admin?: boolean;
|
|
72
|
+
|
|
73
|
+
@Column({ nullable: true })
|
|
74
|
+
division?: number;
|
|
75
|
+
|
|
76
|
+
@Column({ nullable: true })
|
|
77
|
+
reporting_to?: number;
|
|
78
|
+
|
|
79
|
+
@Column({ nullable: true })
|
|
80
|
+
address?: string;
|
|
81
|
+
|
|
82
|
+
@Column({ nullable: true })
|
|
83
|
+
residential_status?: string;
|
|
84
|
+
|
|
85
|
+
@Column({ nullable: true })
|
|
86
|
+
religion?: string;
|
|
77
87
|
|
|
88
|
+
constructor(
|
|
89
|
+
employee_id?: number,
|
|
90
|
+
employee_name?: string,
|
|
91
|
+
employee_arabic_name?: string,
|
|
92
|
+
date_of_birth?: string,
|
|
93
|
+
region_of_birth?: string,
|
|
94
|
+
country_of_birth?: string,
|
|
95
|
+
date_of_joining?: string,
|
|
96
|
+
last_promotion_date?: string,
|
|
97
|
+
gender?: string,
|
|
98
|
+
marital_status?: string,
|
|
99
|
+
nationality?: string,
|
|
100
|
+
email?: string,
|
|
101
|
+
blood_group?: string,
|
|
102
|
+
national_id?: number,
|
|
103
|
+
mobile?: string,
|
|
104
|
+
department?: number,
|
|
105
|
+
section?: number,
|
|
106
|
+
grade?: number,
|
|
107
|
+
location?: string,
|
|
108
|
+
country?: string,
|
|
109
|
+
is_admin?: boolean,
|
|
110
|
+
division?: number,
|
|
111
|
+
reporting_to?: number,
|
|
112
|
+
address?: string,
|
|
113
|
+
residential_status?: string,
|
|
114
|
+
religion?: string,
|
|
115
|
+
designation?: number,
|
|
78
116
|
) {
|
|
79
117
|
super();
|
|
80
|
-
this.
|
|
81
|
-
this.
|
|
82
|
-
this.
|
|
83
|
-
this.
|
|
84
|
-
this.
|
|
85
|
-
this.
|
|
86
|
-
this.
|
|
87
|
-
this.
|
|
88
|
-
this.
|
|
89
|
-
this.
|
|
90
|
-
this.
|
|
91
|
-
this.
|
|
92
|
-
this.
|
|
93
|
-
this.
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
this.
|
|
118
|
+
this.employee_id = employee_id;
|
|
119
|
+
this.employee_name = employee_name;
|
|
120
|
+
this.employee_arabic_name = employee_arabic_name;
|
|
121
|
+
this.date_of_birth = date_of_birth;
|
|
122
|
+
this.region_of_birth = region_of_birth;
|
|
123
|
+
this.country_of_birth = country_of_birth;
|
|
124
|
+
this.date_of_joining = date_of_joining;
|
|
125
|
+
this.last_promotion_date = last_promotion_date;
|
|
126
|
+
this.gender = gender;
|
|
127
|
+
this.marital_status = marital_status;
|
|
128
|
+
this.nationality = nationality;
|
|
129
|
+
this.email = email;
|
|
130
|
+
this.blood_group = blood_group;
|
|
131
|
+
this.national_id = national_id;
|
|
132
|
+
this.mobile = mobile;
|
|
133
|
+
this.department = department;
|
|
134
|
+
this.section = section;
|
|
135
|
+
this.grade = grade;
|
|
136
|
+
this.location = location;
|
|
137
|
+
this.country = country;
|
|
138
|
+
this.is_admin = is_admin;
|
|
139
|
+
this.division = division;
|
|
140
|
+
this.reporting_to = reporting_to;
|
|
141
|
+
this.address = address;
|
|
142
|
+
this.residential_status = residential_status;
|
|
143
|
+
this.religion = religion;
|
|
144
|
+
this.designation = designation;
|
|
97
145
|
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
146
|
+
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
}
|
package/dist/models/faqsModel.js
DELETED
|
@@ -1,57 +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.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);
|
package/src/models/faqsModel.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
}
|