turf-common 1.0.16-beta.22 → 1.0.16-beta.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.
@@ -4,8 +4,8 @@ import { ITurfModel } from "../interface/turf-model.interface";
4
4
  import { IOrganizationEntity, IOrganizationRel } from "../types/entity/organization-entity.type";
5
5
  import { IPitchEntity } from "../types/entity/pitch-entity.type";
6
6
  import { ISubscriptionPitchMappingEntity } from "../types/entity/subscription-pitch-mapping.type";
7
- import { ITurfEntity } from "../types/entity/turf-entity.type";
8
- import { IUserEntity } from "../types/entity/user-entity.type";
7
+ import { ITurfEntity, ITurfEntityRel } from "../types/entity/turf-entity.type";
8
+ import { IUserEntityRel } from "../types/entity/user-entity.type";
9
9
  export declare class TurfModel implements ITurfModel {
10
10
  id: number;
11
11
  turfName: string;
@@ -19,7 +19,7 @@ export declare class TurfModel implements ITurfModel {
19
19
  updatedBy: number;
20
20
  pitches: IPitchEntity[];
21
21
  organization: IOrganizationEntity & IOrganizationRel;
22
- Users: IUserEntity[];
22
+ Users: IUserEntityRel[];
23
23
  constructor(data: ITurfEntity);
24
24
  getPitchStatusCount(): IPitchStatus;
25
25
  getModifiedTurfEntity(): ITurf;
@@ -30,5 +30,5 @@ export declare class TurfModel implements ITurfModel {
30
30
  [key: number]: ITurfEntity;
31
31
  };
32
32
  static fromEntity(data: ITurfEntity): ITurfModel;
33
- static filterBySubscriptionPitchMapping(turfEntities: ITurfModel[], subscriptionPitchMappingEntities: ISubscriptionPitchMappingEntity[], pitchStatusSet: Set<string>): ITurfModel[];
33
+ static filterBySubscriptionPitchMapping(turfEntities: ITurfEntityRel[], subscriptionPitchMappingEntities: ISubscriptionPitchMappingEntity[], pitchStatusSet: Set<string>): ITurfEntityRel[];
34
34
  }
@@ -1,7 +1,7 @@
1
1
  import { UserStatus } from "../enums/user-status.enum";
2
2
  import { UserType } from "../enums/valid-type.enum";
3
3
  import { IUserModel } from "../interface/user-model.interface";
4
- import { ITurfEntity } from "../types/entity/turf-entity.type";
4
+ import { ITurfEntityRel } from "../types/entity/turf-entity.type";
5
5
  import { IUserEntity } from "../types/entity/user-entity.type";
6
6
  export declare class UserModel implements IUserModel {
7
7
  id: number;
@@ -23,7 +23,7 @@ export declare class UserModel implements IUserModel {
23
23
  updatedBy: number;
24
24
  registrationId: number;
25
25
  comments: string;
26
- turf: ITurfEntity[];
26
+ turf: ITurfEntityRel[];
27
27
  constructor(data: IUserModel);
28
28
  static toMap(userEntities: IUserEntity[]): {
29
29
  [key: number]: IUserEntity;
@@ -5,6 +5,6 @@ export type ICouponEntity = IEntityAuditColumn & {
5
5
  code: string;
6
6
  org_id: number;
7
7
  };
8
- export type ICouponRel = {
8
+ export type ICouponEntityRel = ICouponEntity & {
9
9
  organization: IOrganizationEntity;
10
10
  };
@@ -1,7 +1,7 @@
1
1
  import { OrganizationStatus } from "../../enums/organization-status.enum";
2
- import { ITurfModel } from "../../interface/turf-model.interface";
3
- import { ICouponEntity } from "./coupon.entity.type";
2
+ import { ICouponEntityRel } from "./coupon.entity.type";
4
3
  import { IEntityAuditColumn } from "./entity-audit-column.type";
4
+ import { ITurfEntityRel } from "./turf-entity.type";
5
5
  export type IOrganizationEntity = IEntityAuditColumn & {
6
6
  id: number;
7
7
  name: string;
@@ -17,7 +17,7 @@ export type IOrganizationEntity = IEntityAuditColumn & {
17
17
  status: OrganizationStatus;
18
18
  registrationId: number;
19
19
  };
20
- export type IOrganizationRel = {
21
- turfs: ITurfModel[];
22
- coupon: ICouponEntity[];
20
+ export type IOrganizationRel = IOrganizationEntity & {
21
+ turfs: ITurfEntityRel[];
22
+ coupon: ICouponEntityRel[];
23
23
  };
@@ -1,7 +1,7 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- import { ITurfEntity } from "./turf-entity.type";
2
+ import { ITurfEntityRel } from "./turf-entity.type";
3
3
  export type IPitchEntity = IEntityAuditColumn & {
4
- turf: ITurfEntity;
4
+ turf: ITurfEntityRel;
5
5
  number: number;
6
6
  name: string;
7
7
  status: string;
@@ -1,7 +1,7 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- import { IOrganizationEntity } from "./organization-entity.type";
2
+ import { IOrganizationRel as IOrganizationEntityRel } from "./organization-entity.type";
3
3
  import { IPitchEntity } from "./pitch-entity.type";
4
- import { IUserEntity } from "./user-entity.type";
4
+ import { IUserEntityRel } from "./user-entity.type";
5
5
  export type ITurfEntity = IEntityAuditColumn & {
6
6
  id: number;
7
7
  turfName: string;
@@ -10,8 +10,8 @@ export type ITurfEntity = IEntityAuditColumn & {
10
10
  org_id: number;
11
11
  adhocRefund: boolean;
12
12
  };
13
- export type ITurfEntityRel = {
13
+ export type ITurfEntityRel = ITurfEntity & {
14
14
  pitches: IPitchEntity[];
15
- organization: IOrganizationEntity;
16
- Users: IUserEntity[];
15
+ organization: IOrganizationEntityRel;
16
+ Users: IUserEntityRel[];
17
17
  };
@@ -1,7 +1,7 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
2
  import { UserStatus } from "../../enums/user-status.enum";
3
3
  import { UserType } from "../../enums/valid-type.enum";
4
- import { ITurfEntity } from "./turf-entity.type";
4
+ import { ITurfEntityRel } from "./turf-entity.type";
5
5
  export interface IUserEntity extends IEntityAuditColumn {
6
6
  id: number;
7
7
  firstname: string;
@@ -19,6 +19,6 @@ export interface IUserEntity extends IEntityAuditColumn {
19
19
  registrationId: number;
20
20
  comments: string;
21
21
  }
22
- export interface IUserEntityRel {
23
- turf: ITurfEntity[];
22
+ export interface IUserEntityRel extends IUserEntity {
23
+ turf: ITurfEntityRel[];
24
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turf-common",
3
- "version": "1.0.16-beta.22",
3
+ "version": "1.0.16-beta.24",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",