law-common 10.40.1-beta.5 → 10.40.1-beta.7

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,4 +1,4 @@
1
1
  "use strict";
2
- // import { IEntityCreateDto, IStateEntity } from "../../entities";
2
+ // import { IEntityCreateDto } from "../../entities";
3
3
  // export type IStateCreateExclude = "status";
4
4
  // export interface IStateCreateDto extends Omit<IEntityCreateDto<IStateEntity>, IStateCreateExclude> {}
@@ -4,4 +4,5 @@
4
4
  // id: number;
5
5
  // name: string;
6
6
  // status: StateStatusEnum;
7
+ // code: string;
7
8
  // }
@@ -3,5 +3,6 @@ import { IEntityAuditColumn } from "./entity-audit-columns.interface";
3
3
  export interface IStateEntity extends IEntityAuditColumn {
4
4
  id: number;
5
5
  name: string;
6
+ code: string;
6
7
  status: StateStatusEnum;
7
8
  }
@@ -40,4 +40,5 @@ export declare class EntityModelRelationHelper {
40
40
  updateEntityModel<T extends EntityEnum | VirtualEntityEnum>(entityModel: BaseEntityModel<T>, config?: {
41
41
  populateRelations?: boolean;
42
42
  }): EntityModelRelationHelper;
43
+ deleteById(entityEnum: EntityEnum, id: number): EntityModelRelationHelper;
43
44
  }
@@ -223,5 +223,11 @@ class EntityModelRelationHelper {
223
223
  }
224
224
  return EntityModelRelationHelper.getClone(this);
225
225
  }
226
+ deleteById(entityEnum, id) {
227
+ if (this.entityModelIndexMap[entityEnum]) {
228
+ delete this.entityModelIndexMap[entityEnum][id];
229
+ }
230
+ return EntityModelRelationHelper.getClone(this);
231
+ }
226
232
  }
227
233
  exports.EntityModelRelationHelper = EntityModelRelationHelper;
@@ -5,6 +5,7 @@ import { BaseEntityModel } from "./base.entity.model";
5
5
  export declare class StateEntityModel extends BaseEntityModel<EntityEnum.STATE> implements IStateEntity {
6
6
  id: number;
7
7
  name: string;
8
+ code: string;
8
9
  status: StateStatusEnum;
9
10
  createdOn: number;
10
11
  updatedOn: number;
@@ -9,6 +9,7 @@ class StateEntityModel extends base_entity_model_1.BaseEntityModel {
9
9
  super(...arguments);
10
10
  this.id = 0;
11
11
  this.name = "";
12
+ this.code = "";
12
13
  this.status = state_status_enum_1.StateStatusEnum.ACTIVE;
13
14
  this.createdOn = 0;
14
15
  this.updatedOn = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "10.40.1-beta.5",
3
+ "version": "10.40.1-beta.7",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [