turf-common 1.0.16-beta.2 → 1.0.16-beta.21

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 (115) hide show
  1. package/build/enums/booking-details-status.enum.d.ts +4 -0
  2. package/build/enums/booking-details-status.enum.js +8 -0
  3. package/build/enums/booking-history-operation-type.enum.d.ts +10 -0
  4. package/build/enums/booking-history-operation-type.enum.js +18 -0
  5. package/build/enums/faqs-status.enum.d.ts +3 -0
  6. package/build/enums/faqs-status.enum.js +7 -0
  7. package/build/enums/organization-status.enum.d.ts +15 -0
  8. package/build/enums/organization-status.enum.js +31 -0
  9. package/build/enums/payment-mode.enum.d.ts +4 -0
  10. package/build/enums/payment-mode.enum.js +8 -0
  11. package/build/enums/pricing-plan-status.enum copy.d.ts +4 -0
  12. package/build/enums/pricing-plan-status.enum copy.js +8 -0
  13. package/build/enums/pricing-plan-status.enum.d.ts +4 -0
  14. package/build/enums/pricing-plan-status.enum.js +8 -0
  15. package/build/enums/registration-status-enum.d.ts +12 -0
  16. package/build/enums/registration-status-enum.js +16 -0
  17. package/build/enums/user-status.enum.d.ts +11 -0
  18. package/build/enums/user-status.enum.js +15 -0
  19. package/build/enums/valid-type.enum.d.ts +6 -0
  20. package/build/enums/valid-type.enum.js +10 -0
  21. package/build/index.d.ts +0 -1
  22. package/build/index.js +1 -1
  23. package/build/interface/billing-cycle.interface.d.ts +7 -0
  24. package/build/interface/billing-cycle.interface.js +2 -0
  25. package/build/interface/booking-details-model.interface.d.ts +5 -0
  26. package/build/interface/booking-details-model.interface.js +2 -0
  27. package/build/interface/booking-entity-model.interface.d.ts +8 -0
  28. package/build/interface/booking-entity-model.interface.js +2 -0
  29. package/build/interface/cancellation-policy-model.interface.d.ts +4 -0
  30. package/build/interface/cancellation-policy-model.interface.js +2 -0
  31. package/build/interface/get-pricing-plan-by-date-response.interface copy.d.ts +23 -0
  32. package/build/interface/get-pricing-plan-by-date-response.interface copy.js +2 -0
  33. package/build/interface/get-pricing-plan-by-date-response.interface.d.ts +23 -0
  34. package/build/interface/get-pricing-plan-by-date-response.interface.js +2 -0
  35. package/build/interface/get-turf-entity.interface.d.ts +9 -2
  36. package/build/interface/pitch-slab.interface copy.d.ts +5 -0
  37. package/build/interface/pitch-slab.interface copy.js +2 -0
  38. package/build/interface/pitch-slab.interface.d.ts +5 -0
  39. package/build/interface/pitch-slab.interface.js +2 -0
  40. package/build/interface/price-model.interface.d.ts +3 -0
  41. package/build/interface/price-model.interface.js +2 -0
  42. package/build/interface/pricing-plan-entity-model.interface.d.ts +13 -0
  43. package/build/interface/pricing-plan-entity-model.interface.js +2 -0
  44. package/build/interface/pricing-plan-model.interface.d.ts +15 -0
  45. package/build/interface/pricing-plan-model.interface.js +2 -0
  46. package/build/interface/pricing-plan.interface.d.ts +15 -0
  47. package/build/interface/pricing-plan.interface.js +2 -0
  48. package/build/interface/subscription-status.interface.d.ts +20 -0
  49. package/build/interface/subscription-status.interface.js +24 -0
  50. package/build/interface/turf-model.interface.d.ts +7 -0
  51. package/build/interface/turf-model.interface.js +2 -0
  52. package/build/interface/user-model.interface.d.ts +3 -0
  53. package/build/interface/user-model.interface.js +2 -0
  54. package/build/models/billing-cycle-model.d.ts +10 -0
  55. package/build/models/billing-cycle-model.js +20 -0
  56. package/build/models/booking-details-model.d.ts +39 -0
  57. package/build/models/booking-details-model.js +69 -0
  58. package/build/models/booking-entity-model.d.ts +21 -0
  59. package/build/models/booking-entity-model.js +47 -0
  60. package/build/models/cancellation-policy-model.d.ts +18 -0
  61. package/build/models/cancellation-policy-model.js +32 -0
  62. package/build/models/pitch-slab-model.d.ts +9 -0
  63. package/build/models/pitch-slab-model.js +21 -0
  64. package/build/models/price-model.d.ts +11 -0
  65. package/build/models/price-model.js +15 -0
  66. package/build/models/pricing-plan-entity-model.d.ts +47 -0
  67. package/build/models/pricing-plan-entity-model.js +128 -0
  68. package/build/models/pricing-plan-model.d.ts +24 -0
  69. package/build/models/pricing-plan-model.js +67 -0
  70. package/build/models/subscribed-pricing-plan-model.d.ts +26 -0
  71. package/build/models/subscribed-pricing-plan-model.js +88 -0
  72. package/build/models/subscription-model.d.ts +30 -0
  73. package/build/models/subscription-model.js +51 -0
  74. package/build/models/turf-model.d.ts +34 -0
  75. package/build/models/turf-model.js +88 -0
  76. package/build/models/user-model.d.ts +31 -0
  77. package/build/models/user-model.js +19 -0
  78. package/build/types/bookingdetails-with-booking.type.d.ts +34 -0
  79. package/build/types/bookingdetails-with-booking.type.js +2 -0
  80. package/build/types/entity/bank-details-entity.type.d.ts +12 -0
  81. package/build/types/entity/bank-details-entity.type.js +2 -0
  82. package/build/types/entity/booking-cancellation-entity.type.d.ts +32 -0
  83. package/build/types/entity/booking-cancellation-entity.type.js +2 -0
  84. package/build/types/entity/booking-customer-entity.type.d.ts +8 -0
  85. package/build/types/entity/booking-customer-entity.type.js +2 -0
  86. package/build/types/entity/booking-details-entity.type.d.ts +27 -0
  87. package/build/types/entity/booking-details-entity.type.js +2 -0
  88. package/build/types/entity/bookings-entity.type.d.ts +6 -0
  89. package/build/types/entity/bookings-entity.type.js +2 -0
  90. package/build/types/entity/cancellation-policy-entity.type.d.ts +8 -0
  91. package/build/types/entity/cancellation-policy-entity.type.js +2 -0
  92. package/build/types/entity/coupon.entity.type.d.ts +10 -0
  93. package/build/types/entity/coupon.entity.type.js +2 -0
  94. package/build/types/entity/entity-audit-column.type.d.ts +6 -0
  95. package/build/types/entity/entity-audit-column.type.js +7 -0
  96. package/build/types/entity/faqs-entity.type.d.ts +10 -0
  97. package/build/types/entity/faqs-entity.type.js +2 -0
  98. package/build/types/entity/organization-entity.type.d.ts +23 -0
  99. package/build/types/entity/organization-entity.type.js +2 -0
  100. package/build/types/entity/pitch-entity.type.d.ts +9 -0
  101. package/build/types/entity/pitch-entity.type.js +2 -0
  102. package/build/types/entity/price-entity.type.d.ts +5 -0
  103. package/build/types/entity/price-entity.type.js +2 -0
  104. package/build/types/entity/pricing-plan-entity.d.ts +16 -0
  105. package/build/types/entity/pricing-plan-entity.js +2 -0
  106. package/build/types/entity/registration-entity.type.d.ts +12 -0
  107. package/build/types/entity/registration-entity.type.js +2 -0
  108. package/build/types/entity/subscription-entity.type.d.ts +20 -0
  109. package/build/types/entity/subscription-entity.type.js +2 -0
  110. package/build/types/entity/subscription-pitch-mapping.type.d.ts +7 -0
  111. package/build/types/entity/subscription-pitch-mapping.type.js +2 -0
  112. package/build/types/entity/turf-entity.type.d.ts +10 -12
  113. package/build/types/entity/user-entity.type.d.ts +24 -0
  114. package/build/types/entity/user-entity.type.js +2 -0
  115. package/package.json +2 -1
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionModel = void 0;
4
+ var subscription_status_interface_1 = require("../interface/subscription-status.interface");
5
+ var SubscriptionModel = /** @class */ (function () {
6
+ function SubscriptionModel(data) {
7
+ Object.assign(this, data);
8
+ }
9
+ SubscriptionModel.prototype.remainingSubscriptionDays = function () {
10
+ var oneDay = 24 * 60 * 60 * 1000;
11
+ var dayDifference = Math.ceil((this.to.getTime() - new Date().getTime()) / oneDay);
12
+ return dayDifference - 1; //minus 1 day
13
+ };
14
+ SubscriptionModel.updateStatus = function (subscriptionEntities, status, userId) {
15
+ return subscriptionEntities.map(function (subscriptionEntity) {
16
+ subscriptionEntity.status = status;
17
+ subscriptionEntity.updatedBy = userId;
18
+ subscriptionEntity.updatedOn = new Date();
19
+ return subscriptionEntity;
20
+ });
21
+ };
22
+ SubscriptionModel.prototype.remainingAmount = function () {
23
+ return this.netAmount - this.amountPaid;
24
+ };
25
+ SubscriptionModel.prototype.isAmountFullyPaid = function () {
26
+ if (this.netAmount === this.amountPaid) {
27
+ return true;
28
+ }
29
+ return false;
30
+ };
31
+ SubscriptionModel.prototype.isAmountPaidGreater = function () {
32
+ if (this.amountPaid > this.netAmount) {
33
+ return true;
34
+ }
35
+ return false;
36
+ };
37
+ SubscriptionModel.prototype.updateStatusIfPaymentDone = function () {
38
+ if (this.isAmountFullyPaid()) {
39
+ this.status =
40
+ this.status === subscription_status_interface_1.SubscriptionStatus.UPGRADE_PAYMENT_PENDING
41
+ ? subscription_status_interface_1.SubscriptionStatus.UPGRADE_PAYMENT_DONE
42
+ : this.status === subscription_status_interface_1.SubscriptionStatus.UPGRADE_RENEW_PAYMENT_PENDING
43
+ ? subscription_status_interface_1.SubscriptionStatus.UPGRADE_RENEW_PAYMENT_DONE
44
+ : this.status === subscription_status_interface_1.SubscriptionStatus.PAYMENT_PENDING
45
+ ? subscription_status_interface_1.SubscriptionStatus.PAYMENT_DONE
46
+ : this.status;
47
+ }
48
+ };
49
+ return SubscriptionModel;
50
+ }());
51
+ exports.SubscriptionModel = SubscriptionModel;
@@ -0,0 +1,34 @@
1
+ import { IPitchStatus } from "../enums/pitch-status.enum";
2
+ import { ITurf } from "../interface/get-turf-entity.interface";
3
+ import { ITurfModel } from "../interface/turf-model.interface";
4
+ import { IOrganizationEntity } from "../types/entity/organization-entity.type";
5
+ import { IPitchEntity } from "../types/entity/pitch-entity.type";
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";
9
+ export declare class TurfModel implements ITurfModel {
10
+ id: number;
11
+ turfName: string;
12
+ numberOfPitches: number;
13
+ address: string;
14
+ org_id: number;
15
+ adhocRefund: boolean;
16
+ createdOn: Date;
17
+ updatedOn: Date;
18
+ createdBy: number;
19
+ updatedBy: number;
20
+ pitches: IPitchEntity[];
21
+ organization: IOrganizationEntity;
22
+ Users: IUserEntity[];
23
+ constructor(data: ITurfEntity);
24
+ getPitchStatusCount(): IPitchStatus;
25
+ getModifiedTurfEntity(): ITurf;
26
+ static toMap(turfEntities: ITurfModel[]): {
27
+ [key: number]: ITurf;
28
+ };
29
+ static toKeyValue(turfEntities: ITurfEntity[]): {
30
+ [key: number]: ITurfEntity;
31
+ };
32
+ static fromEntity(data: ITurfEntity): ITurfModel;
33
+ static filterBySubscriptionPitchMapping(turfEntities: ITurfModel[], subscriptionPitchMappingEntities: ISubscriptionPitchMappingEntity[], pitchStatusSet: Set<string>): ITurfModel[];
34
+ }
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TurfModel = void 0;
4
+ var pitch_status_enum_1 = require("../enums/pitch-status.enum");
5
+ var TurfModel = /** @class */ (function () {
6
+ function TurfModel(data) {
7
+ Object.assign(this, data);
8
+ }
9
+ TurfModel.prototype.getPitchStatusCount = function () {
10
+ var statusCount = {};
11
+ for (var _i = 0, _a = Object.values(pitch_status_enum_1.PitchStatus); _i < _a.length; _i++) {
12
+ var status_1 = _a[_i];
13
+ statusCount[status_1] = 0;
14
+ }
15
+ for (var _b = 0, _c = this.pitches; _b < _c.length; _b++) {
16
+ var pitch = _c[_b];
17
+ statusCount[pitch.status] += 1;
18
+ }
19
+ return statusCount;
20
+ };
21
+ TurfModel.prototype.getModifiedTurfEntity = function () {
22
+ return {
23
+ id: this.id,
24
+ turfName: this.turfName,
25
+ numberOfPitches: this.numberOfPitches,
26
+ address: this.address,
27
+ org_id: this.org_id,
28
+ updatedBy: this.updatedBy,
29
+ updatedOn: this.updatedOn,
30
+ createdBy: this.createdBy,
31
+ createdOn: this.createdOn,
32
+ pitches: this.pitches.map(function (_a) {
33
+ var turf = _a.turf, number = _a.number, name = _a.name, status = _a.status, sports = _a.sports, createdBy = _a.createdBy, createdOn = _a.createdOn, updatedBy = _a.updatedBy, updatedOn = _a.updatedOn;
34
+ return ({
35
+ turf: turf.id,
36
+ number: number,
37
+ name: name,
38
+ status: status,
39
+ sports: sports.split(",").map(function (sport) { return ({ name: sport }); }),
40
+ createdBy: createdBy,
41
+ createdOn: createdOn,
42
+ updatedBy: updatedBy,
43
+ updatedOn: updatedOn,
44
+ });
45
+ }),
46
+ };
47
+ };
48
+ TurfModel.toMap = function (turfEntities) {
49
+ var response = {};
50
+ turfEntities.forEach(function (turfEntity) {
51
+ if (!response[turfEntity.id]) {
52
+ response[turfEntity.id] = turfEntity.getModifiedTurfEntity();
53
+ }
54
+ });
55
+ return response;
56
+ };
57
+ TurfModel.toKeyValue = function (turfEntities) {
58
+ var response = {};
59
+ turfEntities.forEach(function (turfEntity) {
60
+ if (!response[turfEntity.id]) {
61
+ response[turfEntity.id] = turfEntity;
62
+ }
63
+ });
64
+ return response;
65
+ };
66
+ TurfModel.fromEntity = function (data) {
67
+ return new TurfModel(data);
68
+ };
69
+ TurfModel.filterBySubscriptionPitchMapping = function (turfEntities, subscriptionPitchMappingEntities, pitchStatusSet) {
70
+ turfEntities.forEach(function (turfEntity) {
71
+ turfEntity.pitches = turfEntity.pitches.filter(function (pitchEntity) {
72
+ var subscriptionPitchMappingEntity = subscriptionPitchMappingEntities.find(function (_a) {
73
+ var turfId = _a.turfId, pitchId = _a.pitchId, status = _a.status;
74
+ return turfId === turfEntity.id &&
75
+ pitchId === pitchEntity.number &&
76
+ pitchStatusSet.has(status);
77
+ });
78
+ if (subscriptionPitchMappingEntity)
79
+ return true;
80
+ else
81
+ false;
82
+ });
83
+ });
84
+ return turfEntities;
85
+ };
86
+ return TurfModel;
87
+ }());
88
+ exports.TurfModel = TurfModel;
@@ -0,0 +1,31 @@
1
+ import { UserStatus } from "../enums/user-status.enum";
2
+ import { UserType } from "../enums/valid-type.enum";
3
+ import { IUserModel } from "../interface/user-model.interface";
4
+ import { ITurfEntity } from "../types/entity/turf-entity.type";
5
+ import { IUserEntity } from "../types/entity/user-entity.type";
6
+ export declare class UserModel implements IUserModel {
7
+ id: number;
8
+ firstname: string;
9
+ lastname: string;
10
+ phone: string;
11
+ password: string;
12
+ email: string;
13
+ status: UserStatus;
14
+ is_email_verified: boolean;
15
+ is_mobile_verified: boolean;
16
+ is_account_verified: boolean;
17
+ require_new_password: boolean;
18
+ organization_id: number;
19
+ type: UserType;
20
+ createdOn: Date;
21
+ updatedOn: Date;
22
+ createdBy: number;
23
+ updatedBy: number;
24
+ registrationId: number;
25
+ comments: string;
26
+ turf: ITurfEntity[];
27
+ constructor(data: IUserModel);
28
+ static toMap(userEntities: IUserEntity[]): {
29
+ [key: number]: IUserEntity;
30
+ };
31
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserModel = void 0;
4
+ var UserModel = /** @class */ (function () {
5
+ function UserModel(data) {
6
+ Object.assign(this, data);
7
+ }
8
+ UserModel.toMap = function (userEntities) {
9
+ var response = {};
10
+ userEntities.forEach(function (userEntity) {
11
+ if (!response[userEntity.id]) {
12
+ response[userEntity.id] = userEntity;
13
+ }
14
+ });
15
+ return response;
16
+ };
17
+ return UserModel;
18
+ }());
19
+ exports.UserModel = UserModel;
@@ -0,0 +1,34 @@
1
+ import { BookingDetailsStatus } from '../enums/booking-details-status.enum';
2
+ export type IBookingDetailsWithBooking = {
3
+ [bookingDetailsId: string]: {
4
+ createdOn: Date;
5
+ updatedOn: Date;
6
+ createdBy: number;
7
+ updatedBy: number;
8
+ id: number;
9
+ turfId: number;
10
+ pitchId: number;
11
+ customerName: string;
12
+ contact: string;
13
+ paymentMode: string;
14
+ couponCode: string;
15
+ totalCost: number;
16
+ discountedCost: number;
17
+ amountPaid: number;
18
+ email: string;
19
+ status: BookingDetailsStatus;
20
+ sport: string;
21
+ remarks: string;
22
+ initialBookingGrossAmount: number;
23
+ additionalBookingGrossAmount: number;
24
+ discountAmount: number;
25
+ cancelledBookingGrossAmount: number;
26
+ totalCancellationCharges: number;
27
+ netTotal: number;
28
+ amountPayable: number;
29
+ refundPayable: number;
30
+ bookings: {
31
+ [code: string]: string;
32
+ };
33
+ };
34
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
2
+ export type IBankDetailsEntity = IEntityAuditColumn & {
3
+ id: number;
4
+ bankName: string;
5
+ accountNo: string;
6
+ ifscCode: string;
7
+ upiId: string;
8
+ qrCode: string;
9
+ bankAddress: string;
10
+ branch: string;
11
+ accountName: string;
12
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,32 @@
1
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
2
+ import { BookingHistoryOperationType } from "../../enums/booking-history-operation-type.enum";
3
+ import { PaymentMode } from "../../enums/payment-mode.enum";
4
+ export type IBookingCancellationEntity = IEntityAuditColumn & {
5
+ id: number;
6
+ bookingDetailsId: number;
7
+ turfId: number;
8
+ pitchId: number;
9
+ customerName: string;
10
+ contact: string;
11
+ paymentMode: string;
12
+ couponCode: string;
13
+ totalCost: number;
14
+ discountedCost: number;
15
+ amountPaid: number;
16
+ operationType: BookingHistoryOperationType;
17
+ email: string;
18
+ bookingCodes: string;
19
+ cancellationAmount: number;
20
+ refundAmount: number;
21
+ refundMode: PaymentMode | null;
22
+ startDateCode: number;
23
+ endDateCode: number;
24
+ initialBookingGrossAmount: number;
25
+ additionalBookingGrossAmount: number;
26
+ discountAmount: number;
27
+ cancelledBookingGrossAmount: number;
28
+ totalCancellationCharges: number;
29
+ netTotal: number;
30
+ amountPayable: number;
31
+ refundPayable: number;
32
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
2
+ export type IBookingCustomerEntity = IEntityAuditColumn & {
3
+ contactNo: string;
4
+ turfId: number;
5
+ name: string;
6
+ email: string;
7
+ pitchNo: number;
8
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,27 @@
1
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
2
+ import { BookingDetailsStatus } from "../../enums/booking-details-status.enum";
3
+ export type IBookingDetailsEntity = IEntityAuditColumn & {
4
+ id: number;
5
+ turfId: number;
6
+ pitchId: number;
7
+ customerName: string;
8
+ contact: string;
9
+ paymentMode: string;
10
+ couponCode: string;
11
+ totalCost: number;
12
+ discountedCost: number;
13
+ amountPaid: number;
14
+ email: string;
15
+ status: BookingDetailsStatus;
16
+ sport: string;
17
+ remarks: string;
18
+ initialBookingGrossAmount: number;
19
+ additionalBookingGrossAmount: number;
20
+ discountAmount: number;
21
+ cancelledBookingGrossAmount: number;
22
+ totalCancellationCharges: number;
23
+ netTotal: number;
24
+ amountPayable: number;
25
+ refundPayable: number;
26
+ totalRefundedAmount: number;
27
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
2
+ export type IBookingsEntity = IEntityAuditColumn & {
3
+ bookingDetailsId: number;
4
+ code: string;
5
+ cost: string;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
2
+ export type ICancellationPolicyEntity = IEntityAuditColumn & {
3
+ id: number;
4
+ turfId: number;
5
+ from: number;
6
+ to: number;
7
+ charges: string;
8
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
2
+ import { IOrganizationEntity } from "./organization-entity.type";
3
+ export type ICouponEntity = IEntityAuditColumn & {
4
+ id: number;
5
+ code: string;
6
+ org_id: number;
7
+ };
8
+ export type ICouponRel = {
9
+ organization: IOrganizationEntity;
10
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,3 +4,9 @@ export type IEntityAuditColumn = {
4
4
  createdBy: number;
5
5
  updatedBy: number;
6
6
  };
7
+ export declare class EntityAuditColumnModel implements IEntityAuditColumn {
8
+ createdOn: Date;
9
+ updatedOn: Date;
10
+ createdBy: number;
11
+ updatedBy: number;
12
+ }
@@ -1,2 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityAuditColumnModel = void 0;
4
+ var EntityAuditColumnModel = /** @class */ (function () {
5
+ function EntityAuditColumnModel() {
6
+ }
7
+ return EntityAuditColumnModel;
8
+ }());
9
+ exports.EntityAuditColumnModel = EntityAuditColumnModel;
@@ -0,0 +1,10 @@
1
+ import { FaqsStatus } from "../../enums/faqs-status.enum";
2
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
3
+ export type IFaqsEntity = IEntityAuditColumn & {
4
+ id: number;
5
+ index: number;
6
+ status: FaqsStatus;
7
+ module: string;
8
+ question: string;
9
+ steps: string;
10
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ import { OrganizationStatus } from "../../enums/organization-status.enum";
2
+ import { ITurfModel } from "../../interface/turf-model.interface";
3
+ import { ICouponEntity } from "./coupon.entity.type";
4
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
5
+ export type IOrganizationEntity = IEntityAuditColumn & {
6
+ id: number;
7
+ name: string;
8
+ email: string;
9
+ contact_no: string;
10
+ type: string;
11
+ pan_no: string;
12
+ pan_file_path: string;
13
+ gst_no: string;
14
+ gst_file_path: string;
15
+ deed: string;
16
+ deed_file_path: string;
17
+ status: OrganizationStatus;
18
+ registrationId: number;
19
+ };
20
+ export type IOrganizationRel = {
21
+ turfs: ITurfModel[];
22
+ coupon: ICouponEntity[];
23
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
2
+ import { ITurfEntity } from "./turf-entity.type";
3
+ export type IPitchEntity = IEntityAuditColumn & {
4
+ turf: ITurfEntity;
5
+ number: number;
6
+ name: string;
7
+ status: string;
8
+ sports: string;
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
2
+ export type IPriceEntity = IEntityAuditColumn & {
3
+ id: string;
4
+ price: number;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
2
+ import { PricingPlanStatus } from "../../enums/pricing-plan-status.enum copy";
3
+ export type IPricingPlanEntity = IEntityAuditColumn & {
4
+ id: number;
5
+ effectiveFrom: Date;
6
+ effectiveTo: Date;
7
+ costCode: string;
8
+ status: PricingPlanStatus;
9
+ createdBy: number;
10
+ createdOn: Date;
11
+ updatedBy: number;
12
+ updatedOn: Date;
13
+ basePrice: number;
14
+ billingCycle: string;
15
+ unit: string;
16
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { RegistrationStatus } from "../../enums/registration-status-enum";
2
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
3
+ export type IRegistrationEntity = IEntityAuditColumn & {
4
+ id: number;
5
+ name: string;
6
+ contact: string;
7
+ email: string;
8
+ pitchPlan: string;
9
+ status: RegistrationStatus;
10
+ comments: string;
11
+ token: string;
12
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ import { SubscriptionStatus } from "../../interface/subscription-status.interface";
2
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
3
+ export type ISubscriptionEntity = IEntityAuditColumn & {
4
+ id: number;
5
+ organizationId: number;
6
+ from: Date;
7
+ to: Date;
8
+ type: string;
9
+ grossAmount: number;
10
+ discount: string;
11
+ netAmount: number;
12
+ amountPaid: number;
13
+ status: SubscriptionStatus;
14
+ noOfPitches: number;
15
+ remarks: string;
16
+ registrationId: number;
17
+ pricingPlanId: number;
18
+ previousSubscriptionIds: string;
19
+ };
20
+ export type ISubscriptionModel = ISubscriptionEntity;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export type ISubscriptionPitchMappingEntity = {
2
+ pitchId: number;
3
+ turfId: number;
4
+ subscriptionId: number;
5
+ status: string;
6
+ organizationId: number;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,19 +1,17 @@
1
- import { IPitchStatus } from "../../enums/pitch-status.enum";
2
- import { ITurf } from "../../interface/get-turf-entity.interface";
3
1
  import { IEntityAuditColumn } from "./entity-audit-column.type";
4
- export type ITurfEntity = {
2
+ import { IOrganizationEntity } from "./organization-entity.type";
3
+ import { IPitchEntity } from "./pitch-entity.type";
4
+ import { IUserEntity } from "./user-entity.type";
5
+ export type ITurfEntity = IEntityAuditColumn & {
5
6
  id: number;
6
7
  turfName: string;
7
8
  numberOfPitches: number;
8
9
  address: string;
9
10
  org_id: number;
10
11
  adhocRefund: boolean;
11
- getPitchStatusCount(): IPitchStatus;
12
- getModifiedTurfEntity(): ITurf;
13
- toMap(turfEntities: ITurfEntity[]): {
14
- [key: number]: ITurf;
15
- };
16
- toKeyValue(turfEntities: ITurfEntity[]): {
17
- [key: number]: ITurfEntity;
18
- };
19
- } & IEntityAuditColumn;
12
+ };
13
+ export type ITurfEntityRel = {
14
+ pitches: IPitchEntity[];
15
+ organization: IOrganizationEntity;
16
+ Users: IUserEntity[];
17
+ };
@@ -0,0 +1,24 @@
1
+ import { IEntityAuditColumn } from "./entity-audit-column.type";
2
+ import { UserStatus } from "../../enums/user-status.enum";
3
+ import { UserType } from "../../enums/valid-type.enum";
4
+ import { ITurfEntity } from "./turf-entity.type";
5
+ export interface IUserEntity extends IEntityAuditColumn {
6
+ id: number;
7
+ firstname: string;
8
+ lastname: string;
9
+ phone: string;
10
+ password: string;
11
+ email: string;
12
+ status: UserStatus;
13
+ is_email_verified: boolean;
14
+ is_mobile_verified: boolean;
15
+ is_account_verified: boolean;
16
+ require_new_password: boolean;
17
+ organization_id: number;
18
+ type: UserType;
19
+ registrationId: number;
20
+ comments: string;
21
+ }
22
+ export interface IUserEntityRel {
23
+ turf: ITurfEntity[];
24
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });