@platform-modules/foreign-ministry 1.0.26 → 1.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/.env +2 -2
  2. package/dist/data-source.js +5 -34
  3. package/dist/index.d.ts +4 -11
  4. package/dist/index.js +4 -11
  5. package/dist/models/FMServices.d.ts +8 -0
  6. package/dist/models/{DepartmentsModel.js → FMServices.js} +20 -15
  7. package/dist/models/FMSubservices.d.ts +9 -0
  8. package/dist/models/{SectionModel.js → FMSubservices.js} +25 -20
  9. package/dist/models/LeaveApprovalDetailsModel.d.ts +8 -0
  10. package/dist/models/{LeaveApprovalsModel.js → LeaveApprovalDetailsModel.js} +7 -23
  11. package/dist/models/LeaveApprovalMatrixModel.d.ts +7 -0
  12. package/dist/models/{LeaveSettingsModel.js → LeaveApprovalMatrixModel.js} +14 -14
  13. package/dist/models/user.d.ts +16 -29
  14. package/dist/models/user.js +39 -99
  15. package/package.json +1 -1
  16. package/src/data-source.ts +5 -36
  17. package/src/index.ts +4 -11
  18. package/src/models/FMServices.ts +32 -0
  19. package/src/models/FMSubservices.ts +37 -0
  20. package/src/models/LeaveApprovalDetailsModel.ts +25 -0
  21. package/src/models/{LeaveSettingsModel.ts → LeaveApprovalMatrixModel.ts} +6 -6
  22. package/src/models/user.ts +60 -111
  23. package/dist/models/DepartmentsModel.d.ts +0 -7
  24. package/dist/models/DesignationModel.d.ts +0 -6
  25. package/dist/models/DesignationModel.js +0 -34
  26. package/dist/models/DivisionModel.d.ts +0 -6
  27. package/dist/models/DivisionModel.js +0 -34
  28. package/dist/models/LeaveApprovalsModel.d.ts +0 -15
  29. package/dist/models/LeaveAttachmentsModel.d.ts +0 -7
  30. package/dist/models/LeaveAttachmentsModel.js +0 -40
  31. package/dist/models/LeaveChatModel.d.ts +0 -7
  32. package/dist/models/LeaveChatModel.js +0 -40
  33. package/dist/models/LeaveSettingsModel.d.ts +0 -7
  34. package/dist/models/LeaveWorkFlowModel.d.ts +0 -13
  35. package/dist/models/LeaveWorkFlowModel.js +0 -51
  36. package/dist/models/SectionModel.d.ts +0 -8
  37. package/dist/models/faqsModel.d.ts +0 -11
  38. package/dist/models/faqsModel.js +0 -57
  39. package/dist/models/questionTagsModel.d.ts +0 -6
  40. package/dist/models/questionTagsModel.js +0 -34
  41. package/src/models/DepartmentsModel.ts +0 -26
  42. package/src/models/DesignationModel.ts +0 -19
  43. package/src/models/DivisionModel.ts +0 -19
  44. package/src/models/LeaveApprovalsModel.ts +0 -41
  45. package/src/models/LeaveAttachmentsModel.ts +0 -21
  46. package/src/models/LeaveChatModel.ts +0 -21
  47. package/src/models/LeaveWorkFlowModel.ts +0 -32
  48. package/src/models/SectionModel.ts +0 -31
  49. package/src/models/faqsModel.ts +0 -43
  50. package/src/models/questionTagsModel.ts +0 -22
package/.env CHANGED
@@ -1,5 +1,5 @@
1
1
  DB_HOST=localhost
2
- DB_PORT=5433
2
+ DB_PORT=5432
3
3
  DB_USER=postgres
4
- DB_PASS=123
4
+ DB_PASS=Fa@123
5
5
  DB_NAME=FM
@@ -15,17 +15,10 @@ const HajjLeaveDatesModel_1 = require("./models/HajjLeaveDatesModel");
15
15
  const StudyLeaveDegreesModel_1 = require("./models/StudyLeaveDegreesModel");
16
16
  const UnpaidLeaveCatgoriesModel_1 = require("./models/UnpaidLeaveCatgoriesModel");
17
17
  const MounringLeaveRelationModel_1 = require("./models/MounringLeaveRelationModel");
18
- const LeaveSettingsModel_1 = require("./models/LeaveSettingsModel");
19
- const LeaveApprovalsModel_1 = require("./models/LeaveApprovalsModel");
20
- const LeaveAttachmentsModel_1 = require("./models/LeaveAttachmentsModel");
21
- const LeaveChatModel_1 = require("./models/LeaveChatModel");
22
- const LeaveWorkFlowModel_1 = require("./models/LeaveWorkFlowModel");
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");
27
- const faqsModel_1 = require("./models/faqsModel");
28
- const questionTagsModel_1 = require("./models/questionTagsModel");
18
+ const LeaveApprovalMatrixModel_1 = require("./models/LeaveApprovalMatrixModel");
19
+ const LeaveApprovalDetailsModel_1 = require("./models/LeaveApprovalDetailsModel");
20
+ const FMServices_1 = require("./models/FMServices");
21
+ const FMSubservices_1 = require("./models/FMSubservices");
29
22
  exports.AppDataSource = new typeorm_1.DataSource({
30
23
  type: 'postgres',
31
24
  host: process.env.DB_HOST || 'localhost',
@@ -35,27 +28,5 @@ exports.AppDataSource = new typeorm_1.DataSource({
35
28
  database: process.env.DB_NAME || 'common_models',
36
29
  synchronize: true, // auto-create tables (disable in prod)
37
30
  logging: false,
38
- entities: [
39
- user_1.User,
40
- user_sessions_1.userSessions,
41
- role_1.Role,
42
- LeaveRequestModel_1.LeaveRequests,
43
- LeaveTypesModel_1.LeaveTypes,
44
- FinancialGradeModel_1.FinancialGrade,
45
- HajjLeaveDatesModel_1.HajjLeaveDates,
46
- StudyLeaveDegreesModel_1.StudyLeaveDegrees,
47
- UnpaidLeaveCatgoriesModel_1.UnpaidLeaveCategories,
48
- MounringLeaveRelationModel_1.MounringLeaveRelations,
49
- LeaveSettingsModel_1.LeaveSettings,
50
- LeaveApprovalsModel_1.LeaveApprovalDetails,
51
- LeaveAttachmentsModel_1.LeaveAttachments,
52
- LeaveChatModel_1.LeaveChat,
53
- LeaveWorkFlowModel_1.LeaveWorkFlow,
54
- SectionModel_1.Sections,
55
- DesignationModel_1.Designation,
56
- DepartmentsModel_1.Departments,
57
- DivisionModel_1.Division,
58
- faqsModel_1.Faqs,
59
- questionTagsModel_1.QuestionTags
60
- ],
31
+ entities: [user_1.User, user_sessions_1.userSessions, role_1.Role, LeaveRequestModel_1.LeaveRequests, LeaveTypesModel_1.LeaveTypes, FinancialGradeModel_1.FinancialGrade, HajjLeaveDatesModel_1.HajjLeaveDates, StudyLeaveDegreesModel_1.StudyLeaveDegrees, UnpaidLeaveCatgoriesModel_1.UnpaidLeaveCategories, MounringLeaveRelationModel_1.MounringLeaveRelations, LeaveApprovalMatrixModel_1.LeaveApprovalMatrix, LeaveApprovalDetailsModel_1.LeaveApprovalDetails, FMServices_1.FMServices, FMSubservices_1.FMSubServices],
61
32
  });
package/dist/index.d.ts CHANGED
@@ -8,14 +8,7 @@ export * from './models/HajjLeaveDatesModel';
8
8
  export * from './models/StudyLeaveDegreesModel';
9
9
  export * from './models/UnpaidLeaveCatgoriesModel';
10
10
  export * from './models/MounringLeaveRelationModel';
11
- export * from './models/LeaveSettingsModel';
12
- export * from './models/LeaveApprovalsModel';
13
- export * from './models/LeaveAttachmentsModel';
14
- export * from './models/LeaveChatModel';
15
- export * from './models/LeaveWorkFlowModel';
16
- export * from './models/SectionModel';
17
- export * from './models/DesignationModel';
18
- export * from './models/DepartmentsModel';
19
- export * from './models/DivisionModel';
20
- export * from './models/faqsModel';
21
- export * from './models/questionTagsModel';
11
+ export * from './models/LeaveApprovalMatrixModel';
12
+ export * from './models/LeaveApprovalDetailsModel';
13
+ export * from './models/FMServices';
14
+ export * from './models/FMSubservices';
package/dist/index.js CHANGED
@@ -24,14 +24,7 @@ __exportStar(require("./models/HajjLeaveDatesModel"), exports);
24
24
  __exportStar(require("./models/StudyLeaveDegreesModel"), exports);
25
25
  __exportStar(require("./models/UnpaidLeaveCatgoriesModel"), exports);
26
26
  __exportStar(require("./models/MounringLeaveRelationModel"), exports);
27
- __exportStar(require("./models/LeaveSettingsModel"), exports);
28
- __exportStar(require("./models/LeaveApprovalsModel"), exports);
29
- __exportStar(require("./models/LeaveAttachmentsModel"), exports);
30
- __exportStar(require("./models/LeaveChatModel"), exports);
31
- __exportStar(require("./models/LeaveWorkFlowModel"), exports);
32
- __exportStar(require("./models/SectionModel"), exports);
33
- __exportStar(require("./models/DesignationModel"), exports);
34
- __exportStar(require("./models/DepartmentsModel"), exports);
35
- __exportStar(require("./models/DivisionModel"), exports);
36
- __exportStar(require("./models/faqsModel"), exports);
37
- __exportStar(require("./models/questionTagsModel"), exports);
27
+ __exportStar(require("./models/LeaveApprovalMatrixModel"), exports);
28
+ __exportStar(require("./models/LeaveApprovalDetailsModel"), exports);
29
+ __exportStar(require("./models/FMServices"), exports);
30
+ __exportStar(require("./models/FMSubservices"), exports);
@@ -0,0 +1,8 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class FMServices extends BaseModel {
3
+ code: string;
4
+ name: string;
5
+ description: string;
6
+ logo_url: string;
7
+ constructor(name: string, description: string, logo_url: string, code?: string);
8
+ }
@@ -9,31 +9,36 @@ 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.Departments = void 0;
12
+ exports.FMServices = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
- let Departments = class Departments extends BaseModel_1.BaseModel {
16
- constructor(department_name, department_code, department_description) {
15
+ let FMServices = class FMServices extends BaseModel_1.BaseModel {
16
+ constructor(name, description, logo_url, code) {
17
17
  super();
18
- this.department_name = department_name;
19
- this.department_code = department_code;
20
- this.department_description = department_description;
18
+ this.name = name;
19
+ this.description = description;
20
+ this.logo_url = logo_url;
21
+ this.code = code || '';
21
22
  }
22
23
  };
23
- exports.Departments = Departments;
24
+ exports.FMServices = FMServices;
24
25
  __decorate([
25
26
  (0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
26
27
  __metadata("design:type", String)
27
- ], Departments.prototype, "department_name", void 0);
28
+ ], FMServices.prototype, "code", void 0);
28
29
  __decorate([
29
- (0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
30
+ (0, typeorm_1.Column)({ nullable: false }),
31
+ __metadata("design:type", String)
32
+ ], FMServices.prototype, "name", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ nullable: false }),
30
35
  __metadata("design:type", String)
31
- ], Departments.prototype, "department_code", void 0);
36
+ ], FMServices.prototype, "description", void 0);
32
37
  __decorate([
33
38
  (0, typeorm_1.Column)({ nullable: false }),
34
39
  __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);
40
+ ], FMServices.prototype, "logo_url", void 0);
41
+ exports.FMServices = FMServices = __decorate([
42
+ (0, typeorm_1.Entity)({ name: 'fm_services' }),
43
+ __metadata("design:paramtypes", [String, String, String, String])
44
+ ], FMServices);
@@ -0,0 +1,9 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class FMSubServices extends BaseModel {
3
+ code: string | null;
4
+ sub_service_name: string;
5
+ description: string;
6
+ service_id: number;
7
+ logo_url: string;
8
+ constructor(sub_service_name: string, description: string, service_id: number, logo_url: string, code?: string | null);
9
+ }
@@ -9,36 +9,41 @@ 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.Sections = void 0;
12
+ exports.FMSubServices = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
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) {
15
+ let FMSubServices = class FMSubServices extends BaseModel_1.BaseModel {
16
+ constructor(sub_service_name, description, service_id, logo_url, code = null) {
17
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;
18
+ this.sub_service_name = sub_service_name;
19
+ this.description = description;
20
+ this.service_id = service_id;
21
+ this.logo_url = logo_url;
22
+ this.code = code;
22
23
  }
23
24
  };
24
- exports.Sections = Sections;
25
+ exports.FMSubServices = FMSubServices;
25
26
  __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);
27
+ (0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: true, unique: true }),
28
+ __metadata("design:type", Object)
29
+ ], FMSubServices.prototype, "code", void 0);
29
30
  __decorate([
30
- (0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
31
+ (0, typeorm_1.Column)({ nullable: false }),
31
32
  __metadata("design:type", String)
32
- ], Sections.prototype, "section_code", void 0);
33
+ ], FMSubServices.prototype, "sub_service_name", void 0);
33
34
  __decorate([
34
35
  (0, typeorm_1.Column)({ nullable: false }),
35
36
  __metadata("design:type", String)
36
- ], Sections.prototype, "section_description", void 0);
37
+ ], FMSubServices.prototype, "description", void 0);
37
38
  __decorate([
38
- (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
39
+ (0, typeorm_1.Column)({ nullable: true }),
39
40
  __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);
41
+ ], FMSubServices.prototype, "service_id", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({ nullable: true }),
44
+ __metadata("design:type", String)
45
+ ], FMSubServices.prototype, "logo_url", void 0);
46
+ exports.FMSubServices = FMSubServices = __decorate([
47
+ (0, typeorm_1.Entity)({ name: 'fm_sub_services' }),
48
+ __metadata("design:paramtypes", [String, String, Number, String, Object])
49
+ ], FMSubServices);
@@ -0,0 +1,8 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class LeaveApprovalDetails extends BaseModel {
3
+ leave_request_id: number;
4
+ level: number;
5
+ approver_id: number;
6
+ approval_status: number;
7
+ constructor(leave_request_id: number, approver_id: number, approval_status: number, level: number);
8
+ }
@@ -9,23 +9,15 @@ 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.LeaveApprovalDetails = exports.ApprovalStatus = void 0;
12
+ exports.LeaveApprovalDetails = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
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
15
  //This model is used to store the store the leave apporval details of the user for the leave request
22
16
  let LeaveApprovalDetails = class LeaveApprovalDetails extends BaseModel_1.BaseModel {
23
- constructor(leave_request_id, approver_user_id, approver_role_id, comment, approval_status, level) {
17
+ constructor(leave_request_id, approver_id, approval_status, level) {
24
18
  super();
25
19
  this.leave_request_id = leave_request_id;
26
- this.approver_user_id = approver_user_id;
27
- this.approver_role_id = approver_role_id;
28
- this.comment = comment;
20
+ this.approver_id = approver_id;
29
21
  this.approval_status = approval_status;
30
22
  this.level = level;
31
23
  }
@@ -40,22 +32,14 @@ __decorate([
40
32
  __metadata("design:type", Number)
41
33
  ], LeaveApprovalDetails.prototype, "level", void 0);
42
34
  __decorate([
43
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
35
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
44
36
  __metadata("design:type", Number)
45
- ], LeaveApprovalDetails.prototype, "approver_user_id", void 0);
37
+ ], LeaveApprovalDetails.prototype, "approver_id", void 0);
46
38
  __decorate([
47
39
  (0, typeorm_1.Column)({ type: 'int', nullable: false }),
48
40
  __metadata("design:type", Number)
49
- ], LeaveApprovalDetails.prototype, "approver_role_id", void 0);
50
- __decorate([
51
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
52
- __metadata("design:type", String)
53
- ], LeaveApprovalDetails.prototype, "comment", void 0);
54
- __decorate([
55
- (0, typeorm_1.Column)({ type: 'enum', enum: ApprovalStatus, default: ApprovalStatus.PENDING, nullable: false }),
56
- __metadata("design:type", String)
57
41
  ], LeaveApprovalDetails.prototype, "approval_status", void 0);
58
42
  exports.LeaveApprovalDetails = LeaveApprovalDetails = __decorate([
59
- (0, typeorm_1.Entity)({ name: 'leave_approvals' }),
60
- __metadata("design:paramtypes", [Number, Number, Number, String, String, Number])
43
+ (0, typeorm_1.Entity)({ name: 'leave_approval_details' }),
44
+ __metadata("design:paramtypes", [Number, Number, Number, Number])
61
45
  ], LeaveApprovalDetails);
@@ -0,0 +1,7 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class LeaveApprovalMatrix extends BaseModel {
3
+ leave_type: number;
4
+ level: number;
5
+ approval_matrix: number;
6
+ constructor(leave_type: number, level: number, approval_matrix: number);
7
+ }
@@ -9,32 +9,32 @@ 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.LeaveSettings = void 0;
12
+ exports.LeaveApprovalMatrix = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
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 LeaveSettings = class LeaveSettings extends BaseModel_1.BaseModel {
17
- constructor(leave_type, level, leave_approval_authority) {
16
+ let LeaveApprovalMatrix = class LeaveApprovalMatrix extends BaseModel_1.BaseModel {
17
+ constructor(leave_type, level, approval_matrix) {
18
18
  super();
19
19
  this.leave_type = leave_type;
20
20
  this.level = level;
21
- this.leave_approval_authority = leave_approval_authority;
21
+ this.approval_matrix = approval_matrix;
22
22
  }
23
23
  };
24
- exports.LeaveSettings = LeaveSettings;
24
+ exports.LeaveApprovalMatrix = LeaveApprovalMatrix;
25
25
  __decorate([
26
26
  (0, typeorm_1.Column)({ type: 'int', nullable: false }),
27
27
  __metadata("design:type", Number)
28
- ], LeaveSettings.prototype, "leave_type", void 0);
28
+ ], LeaveApprovalMatrix.prototype, "leave_type", void 0);
29
29
  __decorate([
30
30
  (0, typeorm_1.Column)({ type: 'int', nullable: false }),
31
31
  __metadata("design:type", Number)
32
- ], LeaveSettings.prototype, "level", void 0);
32
+ ], LeaveApprovalMatrix.prototype, "level", void 0);
33
33
  __decorate([
34
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
35
- __metadata("design:type", String)
36
- ], LeaveSettings.prototype, "leave_approval_authority", void 0);
37
- exports.LeaveSettings = LeaveSettings = __decorate([
38
- (0, typeorm_1.Entity)({ name: 'leave_settings' }),
39
- __metadata("design:paramtypes", [Number, Number, String])
40
- ], LeaveSettings);
34
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
35
+ __metadata("design:type", Number)
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, Number])
40
+ ], LeaveApprovalMatrix);
@@ -1,32 +1,19 @@
1
1
  import { BaseModel } from './BaseModel';
2
2
  export declare class User extends BaseModel {
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
- 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);
3
+ first_name: string;
4
+ last_name: string;
5
+ full_name: string;
6
+ password: string;
7
+ mobile: string;
8
+ email: string;
9
+ address: string;
10
+ city: string;
11
+ state: string;
12
+ country: string;
13
+ pincode: string;
14
+ is_active: boolean;
15
+ EncryptPassword: string;
16
+ roleId: number;
17
+ company: string;
18
+ constructor(first_name: string, last_name: string, full_name: string, password: string, mobile: string, email: string, address: string, city: string, state: string, country: string, pincode: string, is_active: boolean, EncryptPassword: string, roleId: number, company: string);
32
19
  }
@@ -13,83 +13,51 @@ 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, avatar) {
16
+ constructor(first_name, last_name, full_name, password, mobile, email, address, city, state, country, pincode, is_active, EncryptPassword, roleId,
17
+ // contract_start_date: string,
18
+ // contract_end_date: string,
19
+ company) {
17
20
  super();
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;
45
- this.avatar = avatar;
21
+ this.first_name = first_name,
22
+ this.last_name = last_name,
23
+ this.full_name = full_name,
24
+ this.password = password,
25
+ this.EncryptPassword = EncryptPassword,
26
+ this.mobile = mobile,
27
+ this.email = email,
28
+ this.is_active = is_active,
29
+ this.address = address,
30
+ this.city = city,
31
+ this.state = state,
32
+ this.country = country,
33
+ this.pincode = pincode,
34
+ this.roleId = roleId,
35
+ // this.contract_start_date = contract_start_date,
36
+ // this.contract_end_date = contract_end_date,
37
+ this.company = company;
46
38
  }
47
39
  };
48
40
  exports.User = User;
49
- __decorate([
50
- (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
51
- __metadata("design:type", Number)
52
- ], User.prototype, "employee_id", void 0);
53
41
  __decorate([
54
42
  (0, typeorm_1.Column)({ nullable: true }),
55
43
  __metadata("design:type", String)
56
- ], User.prototype, "employee_name", void 0);
44
+ ], User.prototype, "first_name", void 0);
57
45
  __decorate([
58
46
  (0, typeorm_1.Column)({ nullable: true }),
59
47
  __metadata("design:type", String)
60
- ], User.prototype, "employee_arabic_name", void 0);
61
- __decorate([
62
- (0, typeorm_1.Column)({ nullable: true, type: 'date' }),
63
- __metadata("design:type", String)
64
- ], User.prototype, "date_of_birth", void 0);
65
- __decorate([
66
- (0, typeorm_1.Column)({ nullable: true }),
67
- __metadata("design:type", String)
68
- ], User.prototype, "region_of_birth", void 0);
69
- __decorate([
70
- (0, typeorm_1.Column)({ nullable: true }),
71
- __metadata("design:type", String)
72
- ], User.prototype, "country_of_birth", void 0);
73
- __decorate([
74
- (0, typeorm_1.Column)({ nullable: true, type: 'date' }),
75
- __metadata("design:type", String)
76
- ], User.prototype, "date_of_joining", void 0);
77
- __decorate([
78
- (0, typeorm_1.Column)({ nullable: true, type: 'date' }),
79
- __metadata("design:type", String)
80
- ], User.prototype, "last_promotion_date", void 0);
48
+ ], User.prototype, "last_name", void 0);
81
49
  __decorate([
82
50
  (0, typeorm_1.Column)({ nullable: true }),
83
51
  __metadata("design:type", String)
84
- ], User.prototype, "gender", void 0);
52
+ ], User.prototype, "full_name", void 0);
85
53
  __decorate([
86
54
  (0, typeorm_1.Column)({ nullable: true }),
87
55
  __metadata("design:type", String)
88
- ], User.prototype, "marital_status", void 0);
56
+ ], User.prototype, "password", void 0);
89
57
  __decorate([
90
58
  (0, typeorm_1.Column)({ nullable: true }),
91
59
  __metadata("design:type", String)
92
- ], User.prototype, "nationality", void 0);
60
+ ], User.prototype, "mobile", void 0);
93
61
  __decorate([
94
62
  (0, typeorm_1.Column)({ nullable: true }),
95
63
  __metadata("design:type", String)
@@ -97,68 +65,40 @@ __decorate([
97
65
  __decorate([
98
66
  (0, typeorm_1.Column)({ nullable: true }),
99
67
  __metadata("design:type", String)
100
- ], User.prototype, "blood_group", void 0);
101
- __decorate([
102
- (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
103
- __metadata("design:type", Number)
104
- ], User.prototype, "national_id", void 0);
68
+ ], User.prototype, "address", void 0);
105
69
  __decorate([
106
70
  (0, typeorm_1.Column)({ nullable: true }),
107
71
  __metadata("design:type", String)
108
- ], User.prototype, "mobile", void 0);
109
- __decorate([
110
- (0, typeorm_1.Column)({ nullable: true }),
111
- __metadata("design:type", Number)
112
- ], User.prototype, "department", void 0);
113
- __decorate([
114
- (0, typeorm_1.Column)({ nullable: true }),
115
- __metadata("design:type", Number)
116
- ], User.prototype, "section", void 0);
117
- __decorate([
118
- (0, typeorm_1.Column)({ nullable: true }),
119
- __metadata("design:type", Number)
120
- ], User.prototype, "designation", void 0);
121
- __decorate([
122
- (0, typeorm_1.Column)({ nullable: true }),
123
- __metadata("design:type", Number)
124
- ], User.prototype, "grade", void 0);
72
+ ], User.prototype, "city", void 0);
125
73
  __decorate([
126
74
  (0, typeorm_1.Column)({ nullable: true }),
127
75
  __metadata("design:type", String)
128
- ], User.prototype, "location", void 0);
76
+ ], User.prototype, "state", void 0);
129
77
  __decorate([
130
78
  (0, typeorm_1.Column)({ nullable: true }),
131
79
  __metadata("design:type", String)
132
80
  ], User.prototype, "country", void 0);
133
- __decorate([
134
- (0, typeorm_1.Column)({ nullable: true, default: false }),
135
- __metadata("design:type", Boolean)
136
- ], User.prototype, "is_admin", void 0);
137
- __decorate([
138
- (0, typeorm_1.Column)({ nullable: true }),
139
- __metadata("design:type", Number)
140
- ], User.prototype, "division", void 0);
141
- __decorate([
142
- (0, typeorm_1.Column)({ nullable: true }),
143
- __metadata("design:type", Number)
144
- ], User.prototype, "reporting_to", void 0);
145
81
  __decorate([
146
82
  (0, typeorm_1.Column)({ nullable: true }),
147
83
  __metadata("design:type", String)
148
- ], User.prototype, "address", void 0);
84
+ ], User.prototype, "pincode", void 0);
85
+ __decorate([
86
+ (0, typeorm_1.Column)({ nullable: true, default: true }),
87
+ __metadata("design:type", Boolean)
88
+ ], User.prototype, "is_active", void 0);
149
89
  __decorate([
150
90
  (0, typeorm_1.Column)({ nullable: true }),
151
91
  __metadata("design:type", String)
152
- ], User.prototype, "residential_status", void 0);
92
+ ], User.prototype, "EncryptPassword", void 0);
153
93
  __decorate([
154
94
  (0, typeorm_1.Column)({ nullable: true }),
155
- __metadata("design:type", String)
156
- ], User.prototype, "religion", void 0);
95
+ __metadata("design:type", Number)
96
+ ], User.prototype, "roleId", void 0);
157
97
  __decorate([
158
98
  (0, typeorm_1.Column)({ nullable: true }),
159
99
  __metadata("design:type", String)
160
- ], User.prototype, "avatar", void 0);
100
+ ], User.prototype, "company", void 0);
161
101
  exports.User = User = __decorate([
162
102
  (0, typeorm_1.Entity)({ name: 'users' }),
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])
103
+ __metadata("design:paramtypes", [String, String, String, String, String, String, String, String, String, String, String, Boolean, String, Number, String])
164
104
  ], User);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {