law-common 10.18.1-beta.10 → 10.18.1-beta.11

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.
@@ -1,6 +1,8 @@
1
1
  import { IBankApiEntity } from "../../api";
2
2
  import { BankStatusEnum } from "../enums/bank_status.enum";
3
- export declare class BankEntityModel implements IBankApiEntity {
3
+ import { EntityEnum } from "../interface/entity.utils.interface";
4
+ import { BaseEntityModel } from "./base.entity.model";
5
+ export declare class BankEntityModel extends BaseEntityModel<EntityEnum.BANK> implements IBankApiEntity {
4
6
  id: number;
5
7
  accountName: string;
6
8
  organizationId: number;
@@ -17,4 +19,5 @@ export declare class BankEntityModel implements IBankApiEntity {
17
19
  createdOn: string;
18
20
  updatedOn: string;
19
21
  static fromApiEntity(apiEntity: IBankApiEntity): BankEntityModel;
22
+ getRelationConfigs(): any[];
20
23
  }
@@ -2,8 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BankEntityModel = void 0;
4
4
  const bank_status_enum_1 = require("../enums/bank_status.enum");
5
- class BankEntityModel {
5
+ const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
+ const base_entity_model_1 = require("./base.entity.model");
7
+ class BankEntityModel extends base_entity_model_1.BaseEntityModel {
6
8
  constructor() {
9
+ super(...arguments);
7
10
  this.id = 0;
8
11
  this.accountName = "";
9
12
  this.organizationId = 0;
@@ -19,9 +22,12 @@ class BankEntityModel {
19
22
  this.updatedOn = "";
20
23
  }
21
24
  static fromApiEntity(apiEntity) {
22
- const entity = new BankEntityModel();
25
+ const entity = new BankEntityModel(entity_utils_interface_1.EntityEnum.BANK);
23
26
  Object.assign(entity, apiEntity);
24
27
  return entity;
25
28
  }
29
+ getRelationConfigs() {
30
+ return this.constructor.prototype.constructor.relationConfigs || [];
31
+ }
26
32
  }
27
33
  exports.BankEntityModel = BankEntityModel;
@@ -1,5 +1,7 @@
1
1
  import { IDesignationApiEntity } from "../interface/designation.entity.interface";
2
- export declare class DesignationEntityModel implements IDesignationApiEntity {
2
+ import { EntityEnum } from "../interface/entity.utils.interface";
3
+ import { BaseEntityModel } from "./base.entity.model";
4
+ export declare class DesignationEntityModel extends BaseEntityModel<EntityEnum.DESIGNATION> implements IDesignationApiEntity {
3
5
  id: number;
4
6
  name: string;
5
7
  description?: string;
@@ -8,4 +10,5 @@ export declare class DesignationEntityModel implements IDesignationApiEntity {
8
10
  updatedBy: number;
9
11
  updatedOn: string;
10
12
  static fromApiEntity(apiEntity: IDesignationApiEntity): DesignationEntityModel;
13
+ getRelationConfigs(): any[];
11
14
  }
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DesignationEntityModel = void 0;
4
- class DesignationEntityModel {
4
+ const entity_utils_interface_1 = require("../interface/entity.utils.interface");
5
+ const base_entity_model_1 = require("./base.entity.model");
6
+ class DesignationEntityModel extends base_entity_model_1.BaseEntityModel {
5
7
  constructor() {
8
+ super(...arguments);
6
9
  this.id = 0;
7
10
  this.name = "";
8
11
  this.createdBy = 0;
@@ -20,9 +23,12 @@ class DesignationEntityModel {
20
23
  // this.updatedOn = data.updatedOn;
21
24
  // }
22
25
  static fromApiEntity(apiEntity) {
23
- const entity = new DesignationEntityModel();
26
+ const entity = new DesignationEntityModel(entity_utils_interface_1.EntityEnum.DESIGNATION);
24
27
  Object.assign(entity, apiEntity);
25
28
  return entity;
26
29
  }
30
+ getRelationConfigs() {
31
+ return this.constructor.prototype.constructor.relationConfigs || [];
32
+ }
27
33
  }
28
34
  exports.DesignationEntityModel = DesignationEntityModel;
@@ -1,6 +1,8 @@
1
1
  import { ITaskApiEntity } from "../../api";
2
2
  import { TaskStatusEnum, TaskTypeEnum } from "../enums/task.entity.enum";
3
- export declare class TaskEntityModel implements ITaskApiEntity {
3
+ import { EntityEnum } from "../interface/entity.utils.interface";
4
+ import { BaseEntityModel } from "./base.entity.model";
5
+ export declare class TaskEntityModel extends BaseEntityModel<EntityEnum.TASK> implements ITaskApiEntity {
4
6
  id: number;
5
7
  name: string;
6
8
  description: string;
@@ -11,4 +13,5 @@ export declare class TaskEntityModel implements ITaskApiEntity {
11
13
  createdOn: string;
12
14
  updatedOn: string;
13
15
  static fromApiEntity(apiEntity: ITaskApiEntity): TaskEntityModel;
16
+ getRelationConfigs(): any[];
14
17
  }
@@ -2,8 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TaskEntityModel = void 0;
4
4
  const task_entity_enum_1 = require("../enums/task.entity.enum");
5
- class TaskEntityModel {
5
+ const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
+ const base_entity_model_1 = require("./base.entity.model");
7
+ class TaskEntityModel extends base_entity_model_1.BaseEntityModel {
6
8
  constructor() {
9
+ super(...arguments);
7
10
  this.id = 0;
8
11
  this.name = "";
9
12
  this.description = "";
@@ -15,9 +18,12 @@ class TaskEntityModel {
15
18
  this.updatedOn = "";
16
19
  }
17
20
  static fromApiEntity(apiEntity) {
18
- const entity = new TaskEntityModel();
21
+ const entity = new TaskEntityModel(entity_utils_interface_1.EntityEnum.TASK);
19
22
  Object.assign(entity, apiEntity);
20
23
  return entity;
21
24
  }
25
+ getRelationConfigs() {
26
+ return this.constructor.prototype.constructor.relationConfigs || [];
27
+ }
22
28
  }
23
29
  exports.TaskEntityModel = TaskEntityModel;
@@ -1,6 +1,8 @@
1
1
  import { ITimesheetApiEntity } from "../../api";
2
2
  import { TimesheetStatusEnum } from "../enums/timesheet.status.enum";
3
- export declare class TimesheetEntityModel implements ITimesheetApiEntity {
3
+ import { EntityEnum } from "../interface/entity.utils.interface";
4
+ import { BaseEntityModel } from "./base.entity.model";
5
+ export declare class TimesheetEntityModel extends BaseEntityModel<EntityEnum.TIMESHEET> implements ITimesheetApiEntity {
4
6
  id: number;
5
7
  userId: number;
6
8
  projectId: number;
@@ -15,4 +17,5 @@ export declare class TimesheetEntityModel implements ITimesheetApiEntity {
15
17
  createdOn: string;
16
18
  updatedOn: string;
17
19
  static fromApiEntity(apiEntity: ITimesheetApiEntity): TimesheetEntityModel;
20
+ getRelationConfigs(): any[];
18
21
  }
@@ -2,8 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimesheetEntityModel = void 0;
4
4
  const timesheet_status_enum_1 = require("../enums/timesheet.status.enum");
5
- class TimesheetEntityModel {
5
+ const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
+ const base_entity_model_1 = require("./base.entity.model");
7
+ class TimesheetEntityModel extends base_entity_model_1.BaseEntityModel {
6
8
  constructor() {
9
+ super(...arguments);
7
10
  this.id = 0;
8
11
  this.userId = 0;
9
12
  this.projectId = 0;
@@ -17,9 +20,12 @@ class TimesheetEntityModel {
17
20
  this.updatedOn = "";
18
21
  }
19
22
  static fromApiEntity(apiEntity) {
20
- const entity = new TimesheetEntityModel();
23
+ const entity = new TimesheetEntityModel(entity_utils_interface_1.EntityEnum.TIMESHEET);
21
24
  Object.assign(entity, apiEntity);
22
25
  return entity;
23
26
  }
27
+ getRelationConfigs() {
28
+ return this.constructor.prototype.constructor.relationConfigs || [];
29
+ }
24
30
  }
25
31
  exports.TimesheetEntityModel = TimesheetEntityModel;
@@ -1,6 +1,8 @@
1
1
  import { IUserApiEntity } from "../../api";
2
2
  import { UserRoleEnum, UserStatusEnum } from "../enums/user.entity.enum";
3
- export declare class UserEntityModel implements IUserApiEntity {
3
+ import { EntityEnum } from "../interface/entity.utils.interface";
4
+ import { BaseEntityModel } from "./base.entity.model";
5
+ export declare class UserEntityModel extends BaseEntityModel<EntityEnum.USER> implements IUserApiEntity {
4
6
  id: number;
5
7
  name: string;
6
8
  email: string;
@@ -39,5 +41,6 @@ export declare class UserEntityModel implements IUserApiEntity {
39
41
  updatedBy: number;
40
42
  createdOn: string;
41
43
  updatedOn: string;
44
+ getRelationConfigs(): any[];
42
45
  static fromApiEntity(apiEntity: IUserApiEntity): UserEntityModel;
43
46
  }
@@ -2,8 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UserEntityModel = void 0;
4
4
  const user_entity_enum_1 = require("../enums/user.entity.enum");
5
- class UserEntityModel {
5
+ const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
+ const base_entity_model_1 = require("./base.entity.model");
7
+ class UserEntityModel extends base_entity_model_1.BaseEntityModel {
6
8
  constructor() {
9
+ super(...arguments);
7
10
  this.id = 0;
8
11
  this.name = "";
9
12
  this.email = "";
@@ -21,8 +24,11 @@ class UserEntityModel {
21
24
  this.createdOn = "";
22
25
  this.updatedOn = "";
23
26
  }
27
+ getRelationConfigs() {
28
+ return this.constructor.prototype.constructor.relationConfigs || [];
29
+ }
24
30
  static fromApiEntity(apiEntity) {
25
- const entity = new UserEntityModel();
31
+ const entity = new UserEntityModel(entity_utils_interface_1.EntityEnum.USER);
26
32
  Object.assign(entity, apiEntity);
27
33
  return entity;
28
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "10.18.1-beta.10",
3
+ "version": "10.18.1-beta.11",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [