turf-common 1.0.16-beta.26 → 1.0.16-beta.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 (44) hide show
  1. package/build/enums/configuration-key.enum.d.ts +8 -0
  2. package/build/enums/configuration-key.enum.js +25 -0
  3. package/build/enums/cron-jobs-name.enum.d.ts +3 -0
  4. package/build/enums/cron-jobs-name.enum.js +7 -0
  5. package/build/enums/cron-jobs-status.enum.d.ts +5 -0
  6. package/build/enums/cron-jobs-status.enum.js +9 -0
  7. package/build/enums/transaction-type.enum.d.ts +7 -0
  8. package/build/enums/transaction-type.enum.js +11 -0
  9. package/build/interface/configuration-model.interface.d.ts +4 -0
  10. package/build/interface/configuration-model.interface.js +2 -0
  11. package/build/models/booking-payment-history-model.d.ts +20 -0
  12. package/build/models/booking-payment-history-model.js +36 -0
  13. package/build/models/configuration-model.d.ts +16 -0
  14. package/build/models/configuration-model.js +17 -0
  15. package/build/models/pricing-plan-model.js +2 -2
  16. package/build/models/turf-model.d.ts +2 -2
  17. package/build/types/date-wise-payment-history-data.types.d.ts +9 -0
  18. package/build/types/date-wise-payment-history-data.types.js +2 -0
  19. package/build/types/entity/bank-details-entity.type.d.ts +2 -2
  20. package/build/types/entity/booking-cancellation-entity.type.d.ts +2 -2
  21. package/build/types/entity/booking-customer-entity.type.d.ts +2 -2
  22. package/build/types/entity/booking-details-entity.type.d.ts +2 -2
  23. package/build/types/entity/booking-payment-history-entity.type.d.ts +13 -0
  24. package/build/types/entity/booking-payment-history-entity.type.js +2 -0
  25. package/build/types/entity/bookings-entity.type.d.ts +2 -2
  26. package/build/types/entity/cancellation-policy-entity.type.d.ts +2 -2
  27. package/build/types/entity/configurations-entity.type.d.ts +8 -0
  28. package/build/types/entity/configurations-entity.type.js +2 -0
  29. package/build/types/entity/coupon.entity.type.d.ts +6 -6
  30. package/build/types/entity/cron-jobs-entity.type.d.ts +12 -0
  31. package/build/types/entity/cron-jobs-entity.type.js +2 -0
  32. package/build/types/entity/entity-audit-column.type.d.ts +2 -2
  33. package/build/types/entity/faqs-entity.type.d.ts +2 -2
  34. package/build/types/entity/organization-entity.type.d.ts +4 -4
  35. package/build/types/entity/pitch-entity.type.d.ts +2 -2
  36. package/build/types/entity/price-entity.type.d.ts +2 -2
  37. package/build/types/entity/price-entity.type.js +1 -0
  38. package/build/types/entity/pricing-plan-entity.d.ts +2 -2
  39. package/build/types/entity/registration-entity.type.d.ts +2 -2
  40. package/build/types/entity/subscription-entity.type.d.ts +2 -2
  41. package/build/types/entity/subscription-pitch-mapping.type.d.ts +2 -2
  42. package/build/types/entity/subscription-pitch-mapping.type.js +1 -0
  43. package/build/types/entity/turf-entity.type.d.ts +3 -3
  44. package/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ import { CronJobsNames } from './cron-jobs-name.enum';
2
+ export declare enum ConfigurationKey {
3
+ SEND_DAILY_COLLECTION = "send_daily_collection"
4
+ }
5
+ export declare namespace ConfigurationKey {
6
+ function CronJobsConfigurationsKeys(key: ConfigurationKey): boolean;
7
+ function getCronJobName(configurationKey: ConfigurationKey): CronJobsNames;
8
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConfigurationKey = void 0;
4
+ var cron_jobs_name_enum_1 = require("./cron-jobs-name.enum");
5
+ var ConfigurationKey;
6
+ (function (ConfigurationKey) {
7
+ ConfigurationKey["SEND_DAILY_COLLECTION"] = "send_daily_collection";
8
+ })(ConfigurationKey || (exports.ConfigurationKey = ConfigurationKey = {}));
9
+ // eslint-disable-next-line @typescript-eslint/no-namespace
10
+ (function (ConfigurationKey) {
11
+ function CronJobsConfigurationsKeys(key) {
12
+ if (getCronJobName(key))
13
+ return true;
14
+ return false;
15
+ }
16
+ ConfigurationKey.CronJobsConfigurationsKeys = CronJobsConfigurationsKeys;
17
+ function getCronJobName(configurationKey) {
18
+ var _a;
19
+ var cronJobConfigurationKeyMapping = (_a = {},
20
+ _a[ConfigurationKey.SEND_DAILY_COLLECTION] = cron_jobs_name_enum_1.CronJobsNames.SEND_DAILY_COLLECTION,
21
+ _a);
22
+ return cronJobConfigurationKeyMapping[configurationKey];
23
+ }
24
+ ConfigurationKey.getCronJobName = getCronJobName;
25
+ })(ConfigurationKey || (exports.ConfigurationKey = ConfigurationKey = {}));
@@ -0,0 +1,3 @@
1
+ export declare enum CronJobsNames {
2
+ SEND_DAILY_COLLECTION = "send_daily_collection"
3
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CronJobsNames = void 0;
4
+ var CronJobsNames;
5
+ (function (CronJobsNames) {
6
+ CronJobsNames["SEND_DAILY_COLLECTION"] = "send_daily_collection";
7
+ })(CronJobsNames || (exports.CronJobsNames = CronJobsNames = {}));
@@ -0,0 +1,5 @@
1
+ export declare enum CronJobsStatus {
2
+ RUNNING = "running",
3
+ FAILED = "failed",
4
+ SUCCESS = "success"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CronJobsStatus = void 0;
4
+ var CronJobsStatus;
5
+ (function (CronJobsStatus) {
6
+ CronJobsStatus["RUNNING"] = "running";
7
+ CronJobsStatus["FAILED"] = "failed";
8
+ CronJobsStatus["SUCCESS"] = "success";
9
+ })(CronJobsStatus || (exports.CronJobsStatus = CronJobsStatus = {}));
@@ -0,0 +1,7 @@
1
+ export declare enum BookingPaymentTransactionType {
2
+ CUSTOMER_PAYMENT = "customer_payment",
3
+ CUSTOMER_REFUND = "customer_refund",
4
+ CUSTOMER_REFUND_INPROCESS = "customer_refund_inprocess",
5
+ CUSTOMER_REFUND_REJECT = "customer_refund_reject",
6
+ CUSTOMER_CANCELLATION = "customer_cancellation"
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BookingPaymentTransactionType = void 0;
4
+ var BookingPaymentTransactionType;
5
+ (function (BookingPaymentTransactionType) {
6
+ BookingPaymentTransactionType["CUSTOMER_PAYMENT"] = "customer_payment";
7
+ BookingPaymentTransactionType["CUSTOMER_REFUND"] = "customer_refund";
8
+ BookingPaymentTransactionType["CUSTOMER_REFUND_INPROCESS"] = "customer_refund_inprocess";
9
+ BookingPaymentTransactionType["CUSTOMER_REFUND_REJECT"] = "customer_refund_reject";
10
+ BookingPaymentTransactionType["CUSTOMER_CANCELLATION"] = "customer_cancellation";
11
+ })(BookingPaymentTransactionType || (exports.BookingPaymentTransactionType = BookingPaymentTransactionType = {}));
@@ -0,0 +1,4 @@
1
+ import { IConfigurationsEntity } from "../types/entity/configurations-entity.type";
2
+ export interface IConfigurationsModel extends IConfigurationsEntity {
3
+ isCronJobKey(): boolean;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ import { PaymentMode } from "../enums/payment-mode.enum";
2
+ import { BookingPaymentTransactionType } from "../enums/transaction-type.enum";
3
+ import { IDateWisePaymentHistoryData } from "../types/date-wise-payment-history-data.types";
4
+ import { IBookingPaymentHistoryEntity } from "../types/entity/booking-payment-history-entity.type";
5
+ export declare class BookingPaymentHistoryModel implements IBookingPaymentHistoryEntity {
6
+ id: number;
7
+ bookingDetailsId: number;
8
+ turfId: number;
9
+ pitchId: number;
10
+ type: PaymentMode | null;
11
+ transactionType: BookingPaymentTransactionType;
12
+ amount: number;
13
+ bookingHistoryId: number;
14
+ createdOn: Date;
15
+ updatedOn: Date;
16
+ createdBy: number;
17
+ updatedBy: number;
18
+ constructor(data: IBookingPaymentHistoryEntity);
19
+ static dateCodeAndTurfIdWiseData(bookingPaymentHistoryEntities: IBookingPaymentHistoryEntity[]): IDateWisePaymentHistoryData;
20
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BookingPaymentHistoryModel = void 0;
4
+ var payment_mode_enum_1 = require("../enums/payment-mode.enum");
5
+ var booking_code_model_1 = require("./booking-code-model");
6
+ var BookingPaymentHistoryModel = /** @class */ (function () {
7
+ function BookingPaymentHistoryModel(data) {
8
+ Object.assign(this, data);
9
+ }
10
+ BookingPaymentHistoryModel.dateCodeAndTurfIdWiseData = function (bookingPaymentHistoryEntities) {
11
+ var dateWisePaymentHistoryData = {};
12
+ for (var _i = 0, bookingPaymentHistoryEntities_1 = bookingPaymentHistoryEntities; _i < bookingPaymentHistoryEntities_1.length; _i++) {
13
+ var bookingPaymentHistoryEntity = bookingPaymentHistoryEntities_1[_i];
14
+ var turfId = bookingPaymentHistoryEntity.turfId, amount = bookingPaymentHistoryEntity.amount, type = bookingPaymentHistoryEntity.type, createdOn = bookingPaymentHistoryEntity.createdOn;
15
+ var dateCode = booking_code_model_1.BookingCode.getDateCode(createdOn);
16
+ if (!dateWisePaymentHistoryData[dateCode])
17
+ dateWisePaymentHistoryData[dateCode] = {};
18
+ var turfWisePaymentData = dateWisePaymentHistoryData[dateCode][turfId];
19
+ if (!turfWisePaymentData)
20
+ turfWisePaymentData = dateWisePaymentHistoryData[dateCode][turfId] = {
21
+ cashTotal: 0,
22
+ upiTotal: 0,
23
+ total: 0,
24
+ };
25
+ if (type === payment_mode_enum_1.PaymentMode.CASH)
26
+ turfWisePaymentData.cashTotal += amount;
27
+ else if (type === payment_mode_enum_1.PaymentMode.UPI)
28
+ turfWisePaymentData.upiTotal += amount;
29
+ turfWisePaymentData.total =
30
+ turfWisePaymentData.cashTotal + turfWisePaymentData.upiTotal;
31
+ }
32
+ return dateWisePaymentHistoryData;
33
+ };
34
+ return BookingPaymentHistoryModel;
35
+ }());
36
+ exports.BookingPaymentHistoryModel = BookingPaymentHistoryModel;
@@ -0,0 +1,16 @@
1
+ import { ConfigurationKey } from "../enums/configuration-key.enum";
2
+ import { IConfigurationsModel } from "../interface/configuration-model.interface";
3
+ import { IConfigurationsEntity } from "../types/entity/configurations-entity.type";
4
+ export declare class ConfigurationsModel implements IConfigurationsModel {
5
+ id: number;
6
+ key: ConfigurationKey;
7
+ value: string;
8
+ description: string;
9
+ createdOn: Date;
10
+ updatedOn: Date;
11
+ createdBy: number;
12
+ updatedBy: number;
13
+ constructor(data: IConfigurationsEntity);
14
+ isCronJobKey(): boolean;
15
+ static findByKey(configurationEntities: IConfigurationsEntity[], key: ConfigurationKey): IConfigurationsEntity | undefined;
16
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConfigurationsModel = void 0;
4
+ var configuration_key_enum_1 = require("../enums/configuration-key.enum");
5
+ var ConfigurationsModel = /** @class */ (function () {
6
+ function ConfigurationsModel(data) {
7
+ Object.assign(this, data);
8
+ }
9
+ ConfigurationsModel.prototype.isCronJobKey = function () {
10
+ return configuration_key_enum_1.ConfigurationKey.CronJobsConfigurationsKeys(this.key);
11
+ };
12
+ ConfigurationsModel.findByKey = function (configurationEntities, key) {
13
+ return configurationEntities.find(function (configurationEntity) { return configurationEntity.key === key; });
14
+ };
15
+ return ConfigurationsModel;
16
+ }());
17
+ exports.ConfigurationsModel = ConfigurationsModel;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PricingPlanModel = void 0;
4
- var common_1 = require("@nestjs/common");
5
4
  var pitch_slab_model_1 = require("./pitch-slab-model");
6
5
  var billing_cycle_model_1 = require("./billing-cycle-model");
6
+ var app_badrequest_exception_1 = require("../exceptions/app-badrequest.exception");
7
7
  var PricingPlanModel = /** @class */ (function () {
8
8
  function PricingPlanModel(data) {
9
9
  var _this = this;
@@ -49,7 +49,7 @@ var PricingPlanModel = /** @class */ (function () {
49
49
  };
50
50
  PricingPlanModel.prototype.validateBillingCycleKey = function (billingCycleKey) {
51
51
  if (!this.getBillingCycleKeys().includes(billingCycleKey)) {
52
- throw new common_1.BadRequestException({
52
+ throw new app_badrequest_exception_1.AppBadRequestException({
53
53
  key: "type",
54
54
  message: ["pricing plan type:'".concat(billingCycleKey, "' is not found")],
55
55
  });
@@ -1,7 +1,7 @@
1
1
  import { IPitchStatus } from "../enums/pitch-status.enum";
2
2
  import { ITurf } from "../interface/get-turf-entity.interface";
3
3
  import { ITurfModel } from "../interface/turf-model.interface";
4
- import { IOrganizationEntity, IOrganizationRel } from "../types/entity/organization-entity.type";
4
+ import { IOrganizationEntity, IOrganizationEntityRel } 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
7
  import { ITurfEntity, ITurfEntityRel } from "../types/entity/turf-entity.type";
@@ -18,7 +18,7 @@ export declare class TurfModel implements ITurfModel {
18
18
  createdBy: number;
19
19
  updatedBy: number;
20
20
  pitches: IPitchEntity[];
21
- organization: IOrganizationEntity & IOrganizationRel;
21
+ organization: IOrganizationEntity & IOrganizationEntityRel;
22
22
  Users: IUserEntityRel[];
23
23
  constructor(data: ITurfEntity);
24
24
  getPitchStatusCount(): IPitchStatus;
@@ -0,0 +1,9 @@
1
+ export type IDateWisePaymentHistoryData = {
2
+ [dateCode: string]: {
3
+ [turfId: number]: {
4
+ cashTotal: number;
5
+ upiTotal: number;
6
+ total: number;
7
+ };
8
+ };
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,5 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- export type IBankDetailsEntity = IEntityAuditColumn & {
2
+ export interface IBankDetailsEntity extends IEntityAuditColumn {
3
3
  id: number;
4
4
  bankName: string;
5
5
  accountNo: string;
@@ -9,4 +9,4 @@ export type IBankDetailsEntity = IEntityAuditColumn & {
9
9
  bankAddress: string;
10
10
  branch: string;
11
11
  accountName: string;
12
- };
12
+ }
@@ -1,7 +1,7 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
2
  import { BookingHistoryOperationType } from "../../enums/booking-history-operation-type.enum";
3
3
  import { PaymentMode } from "../../enums/payment-mode.enum";
4
- export type IBookingCancellationEntity = IEntityAuditColumn & {
4
+ export interface IBookingCancellationEntity extends IEntityAuditColumn {
5
5
  id: number;
6
6
  bookingDetailsId: number;
7
7
  turfId: number;
@@ -29,4 +29,4 @@ export type IBookingCancellationEntity = IEntityAuditColumn & {
29
29
  netTotal: number;
30
30
  amountPayable: number;
31
31
  refundPayable: number;
32
- };
32
+ }
@@ -1,8 +1,8 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- export type IBookingCustomerEntity = IEntityAuditColumn & {
2
+ export interface IBookingCustomerEntity extends IEntityAuditColumn {
3
3
  contactNo: string;
4
4
  turfId: number;
5
5
  name: string;
6
6
  email: string;
7
7
  pitchNo: number;
8
- };
8
+ }
@@ -1,6 +1,6 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
2
  import { BookingDetailsStatus } from "../../enums/booking-details-status.enum";
3
- export type IBookingDetailsEntity = IEntityAuditColumn & {
3
+ export interface IBookingDetailsEntity extends IEntityAuditColumn {
4
4
  id: number;
5
5
  turfId: number;
6
6
  pitchId: number;
@@ -24,4 +24,4 @@ export type IBookingDetailsEntity = IEntityAuditColumn & {
24
24
  amountPayable: number;
25
25
  refundPayable: number;
26
26
  totalRefundedAmount: number;
27
- };
27
+ }
@@ -0,0 +1,13 @@
1
+ import { PaymentMode } from "../../enums/payment-mode.enum";
2
+ import { BookingPaymentTransactionType } from "../../enums/transaction-type.enum";
3
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
4
+ export interface IBookingPaymentHistoryEntity extends IEntityAuditColumn {
5
+ id: number;
6
+ bookingDetailsId: number;
7
+ turfId: number;
8
+ pitchId: number;
9
+ type: PaymentMode | null;
10
+ transactionType: BookingPaymentTransactionType;
11
+ amount: number;
12
+ bookingHistoryId: number;
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,6 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- export type IBookingsEntity = IEntityAuditColumn & {
2
+ export interface IBookingsEntity extends IEntityAuditColumn {
3
3
  bookingDetailsId: number;
4
4
  code: string;
5
5
  cost: string;
6
- };
6
+ }
@@ -1,8 +1,8 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- export type ICancellationPolicyEntity = IEntityAuditColumn & {
2
+ export interface ICancellationPolicyEntity extends IEntityAuditColumn {
3
3
  id: number;
4
4
  turfId: number;
5
5
  from: number;
6
6
  to: number;
7
7
  charges: string;
8
- };
8
+ }
@@ -0,0 +1,8 @@
1
+ import { ConfigurationKey } from "../../enums/configuration-key.enum";
2
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
3
+ export interface IConfigurationsEntity extends IEntityAuditColumn {
4
+ id: number;
5
+ key: ConfigurationKey;
6
+ value: string;
7
+ description: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +1,10 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- import { IOrganizationRel } from "./organization-entity.type";
3
- export type ICouponEntity = IEntityAuditColumn & {
2
+ import { IOrganizationEntityRel } from "./organization-entity.type";
3
+ export interface ICouponEntity extends IEntityAuditColumn {
4
4
  id: number;
5
5
  code: string;
6
6
  org_id: number;
7
- };
8
- export type ICouponEntityRel = ICouponEntity & {
9
- organization: IOrganizationRel;
10
- };
7
+ }
8
+ export interface ICouponEntityRel extends ICouponEntity {
9
+ organization: IOrganizationEntityRel;
10
+ }
@@ -0,0 +1,12 @@
1
+ import { CronJobsNames } from '../../enums/cron-jobs-name.enum';
2
+ import { CronJobsStatus } from '../../enums/cron-jobs-status.enum';
3
+ export interface ICronJobsEntity {
4
+ id: number;
5
+ job: CronJobsNames;
6
+ startTime: Date;
7
+ endTime: Date;
8
+ message: string;
9
+ error: string;
10
+ data: string;
11
+ status: CronJobsStatus;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +1,9 @@
1
- export type IEntityAuditColumn = {
1
+ export interface IEntityAuditColumn {
2
2
  createdOn: Date;
3
3
  updatedOn: Date;
4
4
  createdBy: number;
5
5
  updatedBy: number;
6
- };
6
+ }
7
7
  export declare class EntityAuditColumnModel implements IEntityAuditColumn {
8
8
  createdOn: Date;
9
9
  updatedOn: Date;
@@ -1,10 +1,10 @@
1
1
  import { FaqsStatus } from "../../enums/faqs-status.enum";
2
2
  import { IEntityAuditColumn } from "./entity-audit-column.type";
3
- export type IFaqsEntity = IEntityAuditColumn & {
3
+ export interface IFaqsEntity extends IEntityAuditColumn {
4
4
  id: number;
5
5
  index: number;
6
6
  status: FaqsStatus;
7
7
  module: string;
8
8
  question: string;
9
9
  steps: string;
10
- };
10
+ }
@@ -2,7 +2,7 @@ import { OrganizationStatus } from "../../enums/organization-status.enum";
2
2
  import { ICouponEntityRel } from "./coupon.entity.type";
3
3
  import { IEntityAuditColumn } from "./entity-audit-column.type";
4
4
  import { ITurfEntityRel } from "./turf-entity.type";
5
- export type IOrganizationEntity = IEntityAuditColumn & {
5
+ export interface IOrganizationEntity extends IEntityAuditColumn {
6
6
  id: number;
7
7
  name: string;
8
8
  email: string;
@@ -16,8 +16,8 @@ export type IOrganizationEntity = IEntityAuditColumn & {
16
16
  deed_file_path: string;
17
17
  status: OrganizationStatus;
18
18
  registrationId: number;
19
- };
20
- export type IOrganizationRel = IOrganizationEntity & {
19
+ }
20
+ export interface IOrganizationEntityRel extends IOrganizationEntity {
21
21
  turfs: ITurfEntityRel[];
22
22
  coupon: ICouponEntityRel[];
23
- };
23
+ }
@@ -1,9 +1,9 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
2
  import { ITurfEntityRel } from "./turf-entity.type";
3
- export type IPitchEntity = IEntityAuditColumn & {
3
+ export interface IPitchEntity extends IEntityAuditColumn {
4
4
  turf: ITurfEntityRel;
5
5
  number: number;
6
6
  name: string;
7
7
  status: string;
8
8
  sports: string;
9
- };
9
+ }
@@ -1,5 +1,5 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- export type IPriceEntity = IEntityAuditColumn & {
2
+ export interface IPriceEntity extends IEntityAuditColumn {
3
3
  id: string;
4
4
  price: number;
5
- };
5
+ }
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
@@ -1,6 +1,6 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
2
  import { PricingPlanStatus } from "../../enums/pricing-plan-status.enum copy";
3
- export type IPricingPlanEntity = IEntityAuditColumn & {
3
+ export interface IPricingPlanEntity extends IEntityAuditColumn {
4
4
  id: number;
5
5
  effectiveFrom: Date;
6
6
  effectiveTo: Date;
@@ -13,4 +13,4 @@ export type IPricingPlanEntity = IEntityAuditColumn & {
13
13
  basePrice: number;
14
14
  billingCycle: string;
15
15
  unit: string;
16
- };
16
+ }
@@ -1,6 +1,6 @@
1
1
  import { RegistrationStatus } from "../../enums/registration-status-enum";
2
2
  import { IEntityAuditColumn } from "./entity-audit-column.type";
3
- export type IRegistrationEntity = IEntityAuditColumn & {
3
+ export interface IRegistrationEntity extends IEntityAuditColumn {
4
4
  id: number;
5
5
  name: string;
6
6
  contact: string;
@@ -9,4 +9,4 @@ export type IRegistrationEntity = IEntityAuditColumn & {
9
9
  status: RegistrationStatus;
10
10
  comments: string;
11
11
  token: string;
12
- };
12
+ }
@@ -1,6 +1,6 @@
1
1
  import { SubscriptionStatus } from "../../interface/subscription-status.interface";
2
2
  import { IEntityAuditColumn } from "./entity-audit-column.type";
3
- export type ISubscriptionEntity = IEntityAuditColumn & {
3
+ export interface ISubscriptionEntity extends IEntityAuditColumn {
4
4
  id: number;
5
5
  organizationId: number;
6
6
  from: Date;
@@ -16,5 +16,5 @@ export type ISubscriptionEntity = IEntityAuditColumn & {
16
16
  registrationId: number;
17
17
  pricingPlanId: number;
18
18
  previousSubscriptionIds: string;
19
- };
19
+ }
20
20
  export type ISubscriptionModel = ISubscriptionEntity;
@@ -1,7 +1,7 @@
1
- export type ISubscriptionPitchMappingEntity = {
1
+ export interface ISubscriptionPitchMappingEntity {
2
2
  pitchId: number;
3
3
  turfId: number;
4
4
  subscriptionId: number;
5
5
  status: string;
6
6
  organizationId: number;
7
- };
7
+ }
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
@@ -1,15 +1,15 @@
1
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
2
- import { IOrganizationRel as IOrganizationEntityRel } from "./organization-entity.type";
2
+ import { IOrganizationEntityRel as IOrganizationEntityRel } from "./organization-entity.type";
3
3
  import { IPitchEntity } from "./pitch-entity.type";
4
4
  import { IUserEntityRel } from "./user-entity.type";
5
- export type ITurfEntity = IEntityAuditColumn & {
5
+ export interface ITurfEntity extends IEntityAuditColumn {
6
6
  id: number;
7
7
  turfName: string;
8
8
  numberOfPitches: number;
9
9
  address: string;
10
10
  org_id: number;
11
11
  adhocRefund: boolean;
12
- };
12
+ }
13
13
  export type ITurfEntityRel = ITurfEntity & {
14
14
  pitches: IPitchEntity[];
15
15
  organization: IOrganizationEntityRel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turf-common",
3
- "version": "1.0.16-beta.26",
3
+ "version": "1.0.16-beta.28",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",