@lyxa.ai/core 1.0.66 → 1.0.67-debug.2

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 (56) hide show
  1. package/dist/libraries/mongo/models/app-screen-setting.model.d.ts +9 -0
  2. package/dist/libraries/mongo/models/app-screen-setting.model.js +72 -0
  3. package/dist/libraries/mongo/models/app-screen-setting.model.js.map +1 -0
  4. package/dist/libraries/mongo/models/embedded/cash-settlement.model.d.ts +8 -0
  5. package/dist/libraries/mongo/models/embedded/cash-settlement.model.js +47 -0
  6. package/dist/libraries/mongo/models/embedded/cash-settlement.model.js.map +1 -0
  7. package/dist/libraries/mongo/models/embedded/courier-order-finance.model.d.ts +7 -0
  8. package/dist/libraries/mongo/models/embedded/courier-order-finance.model.js +30 -0
  9. package/dist/libraries/mongo/models/embedded/courier-order-finance.model.js.map +1 -0
  10. package/dist/libraries/mongo/models/embedded/order-finance.model.d.ts +11 -0
  11. package/dist/libraries/mongo/models/embedded/order-finance.model.js +46 -0
  12. package/dist/libraries/mongo/models/embedded/order-finance.model.js.map +1 -0
  13. package/dist/libraries/mongo/models/embedded/order-pricing.model.d.ts +10 -8
  14. package/dist/libraries/mongo/models/embedded/order-pricing.model.js +30 -27
  15. package/dist/libraries/mongo/models/embedded/order-pricing.model.js.map +1 -1
  16. package/dist/libraries/mongo/models/embedded/regular-order-finance.model.d.ts +18 -0
  17. package/dist/libraries/mongo/models/embedded/regular-order-finance.model.js +77 -0
  18. package/dist/libraries/mongo/models/embedded/regular-order-finance.model.js.map +1 -0
  19. package/dist/libraries/mongo/models/embedded/rider-assignment-model.d.ts +8 -0
  20. package/dist/libraries/mongo/models/embedded/rider-assignment-model.js +44 -0
  21. package/dist/libraries/mongo/models/embedded/rider-assignment-model.js.map +1 -0
  22. package/dist/libraries/mongo/models/embedded/trip-leg.mode.d.ts +25 -0
  23. package/dist/libraries/mongo/models/embedded/trip-leg.mode.js +121 -0
  24. package/dist/libraries/mongo/models/embedded/trip-leg.mode.js.map +1 -0
  25. package/dist/libraries/mongo/models/index.d.ts +2 -9
  26. package/dist/libraries/mongo/models/index.js +3 -10
  27. package/dist/libraries/mongo/models/index.js.map +1 -1
  28. package/dist/libraries/mongo/models/order-delivery.model.d.ts +5 -30
  29. package/dist/libraries/mongo/models/order-delivery.model.js +15 -136
  30. package/dist/libraries/mongo/models/order-delivery.model.js.map +1 -1
  31. package/dist/libraries/mongo/models/order-finance.model.d.ts +2 -0
  32. package/dist/libraries/mongo/models/order-finance.model.js +6 -0
  33. package/dist/libraries/mongo/models/order-finance.model.js.map +1 -1
  34. package/dist/libraries/mongo/models/order-payment.model.d.ts +17 -0
  35. package/dist/libraries/mongo/models/order-payment.model.js +84 -0
  36. package/dist/libraries/mongo/models/order-payment.model.js.map +1 -0
  37. package/dist/libraries/mongo/models/order.model.d.ts +3 -0
  38. package/dist/libraries/mongo/models/order.model.js +11 -1
  39. package/dist/libraries/mongo/models/order.model.js.map +1 -1
  40. package/dist/libraries/mongo/models/providers/courier-order.model.d.ts +2 -0
  41. package/dist/libraries/mongo/models/providers/courier-order.model.js +6 -0
  42. package/dist/libraries/mongo/models/providers/courier-order.model.js.map +1 -1
  43. package/dist/libraries/mongo/models/providers/regular-order.model.d.ts +2 -0
  44. package/dist/libraries/mongo/models/providers/regular-order.model.js +6 -0
  45. package/dist/libraries/mongo/models/providers/regular-order.model.js.map +1 -1
  46. package/dist/libraries/mongo/models/rider.model.js +1 -1
  47. package/dist/libraries/mongo/models/rider.model.js.map +1 -1
  48. package/dist/libraries/mongo/models/shop.model.js.map +1 -1
  49. package/dist/libraries/mongo/models/zone.model.d.ts +2 -0
  50. package/dist/libraries/mongo/models/zone.model.js +10 -0
  51. package/dist/libraries/mongo/models/zone.model.js.map +1 -1
  52. package/dist/utilities/validation/common-validation.d.ts +146 -146
  53. package/dist/utilities/validation/global-validation.d.ts +2 -6
  54. package/dist/utilities/validation/global-validation.js +1 -19
  55. package/dist/utilities/validation/global-validation.js.map +1 -1
  56. package/package.json +1 -1
@@ -0,0 +1,9 @@
1
+ import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
2
+ import { ItemType, SectionType, Status } from '../../../utilities/enum';
3
+ export declare class AppScreenSetting extends TimeStamps {
4
+ itemType: ItemType;
5
+ section: SectionType;
6
+ alias: string;
7
+ status?: Status;
8
+ sortingOrder?: number;
9
+ }
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.AppScreenSetting = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
15
+ const enum_1 = require("../../../utilities/enum");
16
+ const _1 = require(".");
17
+ let AppScreenSetting = class AppScreenSetting extends defaultClasses_1.TimeStamps {
18
+ itemType;
19
+ section;
20
+ alias;
21
+ status;
22
+ sortingOrder;
23
+ };
24
+ exports.AppScreenSetting = AppScreenSetting;
25
+ __decorate([
26
+ (0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ItemType }),
27
+ __metadata("design:type", String)
28
+ ], AppScreenSetting.prototype, "itemType", void 0);
29
+ __decorate([
30
+ (0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.SectionType }),
31
+ __metadata("design:type", String)
32
+ ], AppScreenSetting.prototype, "section", void 0);
33
+ __decorate([
34
+ (0, typegoose_1.prop)({ required: true, type: String }),
35
+ __metadata("design:type", String)
36
+ ], AppScreenSetting.prototype, "alias", void 0);
37
+ __decorate([
38
+ (0, typegoose_1.prop)({ type: String, enum: enum_1.Status, default: enum_1.Status.ACTIVE }),
39
+ __metadata("design:type", String)
40
+ ], AppScreenSetting.prototype, "status", void 0);
41
+ __decorate([
42
+ (0, typegoose_1.prop)({ type: Number }),
43
+ __metadata("design:type", Number)
44
+ ], AppScreenSetting.prototype, "sortingOrder", void 0);
45
+ exports.AppScreenSetting = AppScreenSetting = __decorate([
46
+ (0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'appScreenSettings' } }),
47
+ (0, typegoose_1.pre)('save', async function (next) {
48
+ if (this.isNew || typeof this.sortingOrder === 'undefined') {
49
+ try {
50
+ const maxSortingOrder = await _1.AppScreenSettingModel.aggregate([
51
+ {
52
+ $match: {
53
+ deletedAt: null,
54
+ },
55
+ },
56
+ {
57
+ $group: {
58
+ _id: null,
59
+ maxSortingOrder: { $max: '$sortingOrder' },
60
+ },
61
+ },
62
+ ]).exec();
63
+ this.sortingOrder = (maxSortingOrder[0]?.maxSortingOrder ?? -1) + 1;
64
+ }
65
+ catch (error) {
66
+ return next(error);
67
+ }
68
+ }
69
+ next();
70
+ })
71
+ ], AppScreenSetting);
72
+ //# sourceMappingURL=app-screen-setting.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-screen-setting.model.js","sourceRoot":"/","sources":["libraries/mongo/models/app-screen-setting.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,4EAAqE;AACrE,kDAAwE;AACxE,wBAA0C;AA8BnC,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,2BAAU;IAExC,QAAQ,CAAY;IAGpB,OAAO,CAAe;IAGtB,KAAK,CAAU;IAGf,MAAM,CAAU;IAGhB,YAAY,CAAU;CAC7B,CAAA;AA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,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,OAAO,IAAI,CAAC,KAAc,CAAC,CAAC;YAC7B,CAAC;QACF,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,gBAAgB,CAe5B","sourcesContent":["import { modelOptions, pre, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ItemType, SectionType, Status } from '../../../utilities/enum';\nimport { AppScreenSettingModel } from '.';\n\n@modelOptions({ schemaOptions: { collection: 'appScreenSettings' } })\n@pre<AppScreenSetting>('save', async function (next) {\n\t// Only set sortingOrder if it's a new document or sortingOrder is not set\n\tif (this.isNew || typeof this.sortingOrder === 'undefined') {\n\t\ttry {\n\t\t\t// Find the maximum sortingOrder that aren't deleted\n\t\t\tconst maxSortingOrder = await AppScreenSettingModel.aggregate<{ maxSortingOrder: number }>([\n\t\t\t\t{\n\t\t\t\t\t$match: {\n\t\t\t\t\t\tdeletedAt: null,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t$group: {\n\t\t\t\t\t\t_id: null,\n\t\t\t\t\t\tmaxSortingOrder: { $max: '$sortingOrder' },\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t]).exec();\n\n\t\t\t// Set the new sortingOrder to max + 1 (or 0 if no items found)\n\t\t\tthis.sortingOrder = (maxSortingOrder[0]?.maxSortingOrder ?? -1) + 1;\n\t\t} catch (error) {\n\t\t\treturn next(error as Error);\n\t\t}\n\t}\n\tnext();\n})\nexport class AppScreenSetting extends TimeStamps {\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ required: true, type: String, enum: SectionType })\n\tpublic section!: SectionType;\n\n\t@prop({ required: true, type: String })\n\tpublic alias!: string;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n}\n"]}
@@ -0,0 +1,8 @@
1
+ export declare class CashSettlement {
2
+ settlementAmount?: number;
3
+ secondarySettlementAmount?: number;
4
+ receivedAmount?: number;
5
+ secondaryReceivedAmount?: number;
6
+ returnedAmount?: number;
7
+ secondaryReturnedAmount?: number;
8
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CashSettlement = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ class CashSettlement {
15
+ settlementAmount;
16
+ secondarySettlementAmount;
17
+ receivedAmount;
18
+ secondaryReceivedAmount;
19
+ returnedAmount;
20
+ secondaryReturnedAmount;
21
+ }
22
+ exports.CashSettlement = CashSettlement;
23
+ __decorate([
24
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
25
+ __metadata("design:type", Number)
26
+ ], CashSettlement.prototype, "settlementAmount", void 0);
27
+ __decorate([
28
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
29
+ __metadata("design:type", Number)
30
+ ], CashSettlement.prototype, "secondarySettlementAmount", void 0);
31
+ __decorate([
32
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
33
+ __metadata("design:type", Number)
34
+ ], CashSettlement.prototype, "receivedAmount", void 0);
35
+ __decorate([
36
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
37
+ __metadata("design:type", Number)
38
+ ], CashSettlement.prototype, "secondaryReceivedAmount", void 0);
39
+ __decorate([
40
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
41
+ __metadata("design:type", Number)
42
+ ], CashSettlement.prototype, "returnedAmount", void 0);
43
+ __decorate([
44
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
45
+ __metadata("design:type", Number)
46
+ ], CashSettlement.prototype, "secondaryReturnedAmount", void 0);
47
+ //# sourceMappingURL=cash-settlement.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cash-settlement.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/cash-settlement.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,cAAc;IAE1B,gBAAgB,CAAU;IAG1B,yBAAyB,CAAU;IAGnC,cAAc,CAAU;IAGxB,uBAAuB,CAAU;IAGjC,cAAc,CAAU;IAGxB,uBAAuB,CAAU;CACjC;AAlBD,wCAkBC;AAhBA;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;wDACT;AAG1B;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;iEACA;AAGnC;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;sDACX;AAGxB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+DACF;AAGjC;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;sDACX;AAGxB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+DACF","sourcesContent":["import { prop } from '@typegoose/typegoose';\n\nexport class CashSettlement {\n\t@prop({ type: Number, default: 0 })\n\tsettlementAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondarySettlementAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\treceivedAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryReceivedAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\treturnedAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryReturnedAmount?: number;\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import { OrderFinance } from './order-finance.model';
2
+ import { CourierOrderProfit } from '../embedded/profit.model';
3
+ import { OrderPricing } from './order-pricing.model';
4
+ export declare class CourierOrderFinance extends OrderFinance {
5
+ pricing?: OrderPricing;
6
+ companyProfit?: CourierOrderProfit;
7
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CourierOrderFinance = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ const order_finance_model_1 = require("./order-finance.model");
15
+ const profit_model_1 = require("../embedded/profit.model");
16
+ const order_pricing_model_1 = require("./order-pricing.model");
17
+ class CourierOrderFinance extends order_finance_model_1.OrderFinance {
18
+ pricing;
19
+ companyProfit;
20
+ }
21
+ exports.CourierOrderFinance = CourierOrderFinance;
22
+ __decorate([
23
+ (0, typegoose_1.prop)({ type: () => order_pricing_model_1.OrderPricing }),
24
+ __metadata("design:type", order_pricing_model_1.OrderPricing)
25
+ ], CourierOrderFinance.prototype, "pricing", void 0);
26
+ __decorate([
27
+ (0, typegoose_1.prop)({ type: () => profit_model_1.CourierOrderProfit }),
28
+ __metadata("design:type", profit_model_1.CourierOrderProfit)
29
+ ], CourierOrderFinance.prototype, "companyProfit", void 0);
30
+ //# sourceMappingURL=courier-order-finance.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"courier-order-finance.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/courier-order-finance.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,+DAAqD;AACrD,2DAA8D;AAC9D,+DAAqD;AAErD,MAAa,mBAAoB,SAAQ,kCAAY;IAE7C,OAAO,CAAgB;IAGvB,aAAa,CAAsB;CAC1C;AAND,kDAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;8BAClB,kCAAY;oDAAC;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,iCAAkB,EAAE,CAAC;8BAClB,iCAAkB;0DAAC","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { OrderFinance } from './order-finance.model';\nimport { CourierOrderProfit } from '../embedded/profit.model';\nimport { OrderPricing } from './order-pricing.model';\n\nexport class CourierOrderFinance extends OrderFinance {\n\t@prop({ type: () => OrderPricing })\n\tpublic pricing?: OrderPricing;\n\n\t@prop({ type: () => CourierOrderProfit })\n\tpublic companyProfit?: CourierOrderProfit;\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
2
+ import { PaymentInformation } from './payment-infromation.model';
3
+ import { PaymentMethod } from '../../../../utilities/enum';
4
+ import { RiderProfit } from './profit.model';
5
+ export declare class OrderFinance extends TimeStamps {
6
+ exchangeRate?: number;
7
+ paymentMethod?: PaymentMethod;
8
+ paymentInformation?: PaymentInformation;
9
+ riderProfit?: RiderProfit;
10
+ processedAt?: Date;
11
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.OrderFinance = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
15
+ const payment_infromation_model_1 = require("./payment-infromation.model");
16
+ const enum_1 = require("../../../../utilities/enum");
17
+ const profit_model_1 = require("./profit.model");
18
+ class OrderFinance extends defaultClasses_1.TimeStamps {
19
+ exchangeRate;
20
+ paymentMethod;
21
+ paymentInformation;
22
+ riderProfit;
23
+ processedAt;
24
+ }
25
+ exports.OrderFinance = OrderFinance;
26
+ __decorate([
27
+ (0, typegoose_1.prop)({ type: Number, default: 1 }),
28
+ __metadata("design:type", Number)
29
+ ], OrderFinance.prototype, "exchangeRate", void 0);
30
+ __decorate([
31
+ (0, typegoose_1.prop)({ type: String, enum: enum_1.PaymentMethod, default: enum_1.PaymentMethod.CASH }),
32
+ __metadata("design:type", String)
33
+ ], OrderFinance.prototype, "paymentMethod", void 0);
34
+ __decorate([
35
+ (0, typegoose_1.prop)({ type: () => payment_infromation_model_1.PaymentInformation }),
36
+ __metadata("design:type", payment_infromation_model_1.PaymentInformation)
37
+ ], OrderFinance.prototype, "paymentInformation", void 0);
38
+ __decorate([
39
+ (0, typegoose_1.prop)({ type: () => profit_model_1.RiderProfit }),
40
+ __metadata("design:type", profit_model_1.RiderProfit)
41
+ ], OrderFinance.prototype, "riderProfit", void 0);
42
+ __decorate([
43
+ (0, typegoose_1.prop)({ type: Date }),
44
+ __metadata("design:type", Date)
45
+ ], OrderFinance.prototype, "processedAt", void 0);
46
+ //# sourceMappingURL=order-finance.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order-finance.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/order-finance.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,4EAAqE;AACrE,2EAAiE;AACjE,qDAA2D;AAC3D,iDAA6C;AAE7C,MAAa,YAAa,SAAQ,2BAAU;IAEpC,YAAY,CAAU;IAGtB,aAAa,CAAiB;IAGrC,kBAAkB,CAAsB;IAGjC,WAAW,CAAe;IAG1B,WAAW,CAAQ;CAC1B;AAfD,oCAeC;AAbO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;kDACN;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAa,EAAE,OAAO,EAAE,oBAAa,CAAC,IAAI,EAAE,CAAC;;mDACpC;AAGrC;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,8CAAkB,EAAE,CAAC;8BACpB,8CAAkB;wDAAC;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,0BAAW,EAAE,CAAC;8BACb,0BAAW;iDAAC;AAG1B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACA,IAAI;iDAAC","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { PaymentInformation } from './payment-infromation.model';\nimport { PaymentMethod } from '../../../../utilities/enum';\nimport { RiderProfit } from './profit.model';\n\nexport class OrderFinance extends TimeStamps {\n\t@prop({ type: Number, default: 1 })\n\tpublic exchangeRate?: number;\n\n\t@prop({ type: String, enum: PaymentMethod, default: PaymentMethod.CASH })\n\tpublic paymentMethod?: PaymentMethod;\n\n\t@prop({ type: () => PaymentInformation })\n\tpaymentInformation?: PaymentInformation;\n\n\t@prop({ type: () => RiderProfit })\n\tpublic riderProfit?: RiderProfit;\n\n\t@prop({ type: Date })\n\tpublic processedAt?: Date;\n}\n"]}
@@ -1,14 +1,6 @@
1
1
  export declare class OrderPricing {
2
2
  subtotal?: number;
3
3
  secondarySubtotal?: number;
4
- discount?: number;
5
- secondaryDiscount?: number;
6
- loyaltyPointDiscount?: number;
7
- secondaryLoyaltyPointDiscount?: number;
8
- couponDiscount?: number;
9
- secondaryCouponDiscount?: number;
10
- punchMarketingDiscount?: number;
11
- secondaryPunchMarketingDiscount?: number;
12
4
  deliveryFee?: number;
13
5
  secondaryDeliveryFee?: number;
14
6
  riderTips?: number;
@@ -20,3 +12,13 @@ export declare class OrderPricing {
20
12
  paidAmount?: number;
21
13
  secondaryPaidAmount?: number;
22
14
  }
15
+ export declare class RegularOrderPricing extends OrderPricing {
16
+ discount?: number;
17
+ secondaryDiscount?: number;
18
+ loyaltyPointDiscount?: number;
19
+ secondaryLoyaltyPointDiscount?: number;
20
+ couponDiscount?: number;
21
+ secondaryCouponDiscount?: number;
22
+ punchMarketingDiscount?: number;
23
+ secondaryPunchMarketingDiscount?: number;
24
+ }
@@ -9,19 +9,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.OrderPricing = void 0;
12
+ exports.RegularOrderPricing = exports.OrderPricing = void 0;
13
13
  const typegoose_1 = require("@typegoose/typegoose");
14
14
  class OrderPricing {
15
15
  subtotal;
16
16
  secondarySubtotal;
17
- discount;
18
- secondaryDiscount;
19
- loyaltyPointDiscount;
20
- secondaryLoyaltyPointDiscount;
21
- couponDiscount;
22
- secondaryCouponDiscount;
23
- punchMarketingDiscount;
24
- secondaryPunchMarketingDiscount;
25
17
  deliveryFee;
26
18
  secondaryDeliveryFee;
27
19
  riderTips;
@@ -45,73 +37,84 @@ __decorate([
45
37
  __decorate([
46
38
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
47
39
  __metadata("design:type", Number)
48
- ], OrderPricing.prototype, "discount", void 0);
40
+ ], OrderPricing.prototype, "deliveryFee", void 0);
49
41
  __decorate([
50
42
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
51
43
  __metadata("design:type", Number)
52
- ], OrderPricing.prototype, "secondaryDiscount", void 0);
44
+ ], OrderPricing.prototype, "secondaryDeliveryFee", void 0);
53
45
  __decorate([
54
46
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
55
47
  __metadata("design:type", Number)
56
- ], OrderPricing.prototype, "loyaltyPointDiscount", void 0);
48
+ ], OrderPricing.prototype, "riderTips", void 0);
57
49
  __decorate([
58
50
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
59
51
  __metadata("design:type", Number)
60
- ], OrderPricing.prototype, "secondaryLoyaltyPointDiscount", void 0);
52
+ ], OrderPricing.prototype, "secondaryRiderTips", void 0);
61
53
  __decorate([
62
54
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
63
55
  __metadata("design:type", Number)
64
- ], OrderPricing.prototype, "couponDiscount", void 0);
56
+ ], OrderPricing.prototype, "total", void 0);
65
57
  __decorate([
66
58
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
67
59
  __metadata("design:type", Number)
68
- ], OrderPricing.prototype, "secondaryCouponDiscount", void 0);
60
+ ], OrderPricing.prototype, "secondaryTotal", void 0);
69
61
  __decorate([
70
62
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
71
63
  __metadata("design:type", Number)
72
- ], OrderPricing.prototype, "punchMarketingDiscount", void 0);
64
+ ], OrderPricing.prototype, "wallet", void 0);
73
65
  __decorate([
74
66
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
75
67
  __metadata("design:type", Number)
76
- ], OrderPricing.prototype, "secondaryPunchMarketingDiscount", void 0);
68
+ ], OrderPricing.prototype, "secondaryWallet", void 0);
77
69
  __decorate([
78
70
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
79
71
  __metadata("design:type", Number)
80
- ], OrderPricing.prototype, "deliveryFee", void 0);
72
+ ], OrderPricing.prototype, "paidAmount", void 0);
81
73
  __decorate([
82
74
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
83
75
  __metadata("design:type", Number)
84
- ], OrderPricing.prototype, "secondaryDeliveryFee", void 0);
76
+ ], OrderPricing.prototype, "secondaryPaidAmount", void 0);
77
+ class RegularOrderPricing extends OrderPricing {
78
+ discount;
79
+ secondaryDiscount;
80
+ loyaltyPointDiscount;
81
+ secondaryLoyaltyPointDiscount;
82
+ couponDiscount;
83
+ secondaryCouponDiscount;
84
+ punchMarketingDiscount;
85
+ secondaryPunchMarketingDiscount;
86
+ }
87
+ exports.RegularOrderPricing = RegularOrderPricing;
85
88
  __decorate([
86
89
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
87
90
  __metadata("design:type", Number)
88
- ], OrderPricing.prototype, "riderTips", void 0);
91
+ ], RegularOrderPricing.prototype, "discount", void 0);
89
92
  __decorate([
90
93
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
91
94
  __metadata("design:type", Number)
92
- ], OrderPricing.prototype, "secondaryRiderTips", void 0);
95
+ ], RegularOrderPricing.prototype, "secondaryDiscount", void 0);
93
96
  __decorate([
94
97
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
95
98
  __metadata("design:type", Number)
96
- ], OrderPricing.prototype, "total", void 0);
99
+ ], RegularOrderPricing.prototype, "loyaltyPointDiscount", void 0);
97
100
  __decorate([
98
101
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
99
102
  __metadata("design:type", Number)
100
- ], OrderPricing.prototype, "secondaryTotal", void 0);
103
+ ], RegularOrderPricing.prototype, "secondaryLoyaltyPointDiscount", void 0);
101
104
  __decorate([
102
105
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
103
106
  __metadata("design:type", Number)
104
- ], OrderPricing.prototype, "wallet", void 0);
107
+ ], RegularOrderPricing.prototype, "couponDiscount", void 0);
105
108
  __decorate([
106
109
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
107
110
  __metadata("design:type", Number)
108
- ], OrderPricing.prototype, "secondaryWallet", void 0);
111
+ ], RegularOrderPricing.prototype, "secondaryCouponDiscount", void 0);
109
112
  __decorate([
110
113
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
111
114
  __metadata("design:type", Number)
112
- ], OrderPricing.prototype, "paidAmount", void 0);
115
+ ], RegularOrderPricing.prototype, "punchMarketingDiscount", void 0);
113
116
  __decorate([
114
117
  (0, typegoose_1.prop)({ type: Number, default: 0 }),
115
118
  __metadata("design:type", Number)
116
- ], OrderPricing.prototype, "secondaryPaidAmount", void 0);
119
+ ], RegularOrderPricing.prototype, "secondaryPunchMarketingDiscount", void 0);
117
120
  //# sourceMappingURL=order-pricing.model.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"order-pricing.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/order-pricing.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,YAAY;IAExB,QAAQ,CAAU;IAGlB,iBAAiB,CAAU;IAG3B,QAAQ,CAAU;IAGlB,iBAAiB,CAAU;IAG3B,oBAAoB,CAAU;IAG9B,6BAA6B,CAA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AE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;qEACM;AAGzC;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;iDACd;AAGrB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;0DACL;AAG9B;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+CAChB;AAGnB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;wDACP;AAG5B;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;2CACpB;AAGf;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;oDACX;AAGxB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;4CACnB;AAGhB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;qDACV;AAGzB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;gDACf;AAGpB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;yDACN","sourcesContent":["import { prop } from '@typegoose/typegoose';\n\nexport class OrderPricing {\n\t@prop({ type: Number, default: 0 })\n\tsubtotal?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondarySubtotal?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tdiscount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryDiscount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tloyaltyPointDiscount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryLoyaltyPointDiscount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tcouponDiscount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryCouponDiscount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpunchMarketingDiscount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryPunchMarketingDiscount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tdeliveryFee?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryDeliveryFee?: number;\n\n\t@prop({ type: Number, default: 0 })\n\triderTips?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryRiderTips?: number;\n\n\t@prop({ type: Number, default: 0 })\n\ttotal?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryTotal?: number;\n\n\t@prop({ type: Number, default: 0 })\n\twallet?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryWallet?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpaidAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryPaidAmount?: number;\n}\n"]}
1
+ {"version":3,"file":"order-pricing.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/order-pricing.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,YAAY;IAExB,QAAQ,CAAU;IAGlB,iBAAiB,CAAU;IAG3B,WAAW,CAAU;IAGrB,oBAAoB,CAAU;IAG9B,SAAS,CAAU;IAGnB,kBAAkB,CAAU;IAG5B,KAAK,CAAU;IAGf,cAAc,CAAU;IAGxB,MAAM,CAAU;IAGhB,eAAe,CAAU;IAGzB,UAAU,CAAU;IAGpB,mBAAmB,CAAU;CAC7B;AApCD,oCAoCC;AAlCA;IADC,IAAA,gBAAI,EA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AAU;IAG3B,oBAAoB,CAAU;IAG9B,6BAA6B,CAAU;IAGvC,cAAc,CAAU;IAGxB,uBAAuB,CAAU;IAGjC,sBAAsB,CAAU;IAGhC,+BAA+B,CAAU;CACzC;AAxBD,kDAwBC;AAtBA;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;qDACjB;AAGlB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;8DACR;AAG3B;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;iEACL;AAG9B;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;0EACI;AAGvC;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;2DACX;AAGxB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;oEACF;AAGjC;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;mEACH;AAGhC;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;4EACM","sourcesContent":["import { prop } from '@typegoose/typegoose';\n\nexport class OrderPricing {\n\t@prop({ type: Number, default: 0 })\n\tsubtotal?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondarySubtotal?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tdeliveryFee?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryDeliveryFee?: number;\n\n\t@prop({ type: Number, default: 0 })\n\triderTips?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryRiderTips?: number;\n\n\t@prop({ type: Number, default: 0 })\n\ttotal?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryTotal?: number;\n\n\t@prop({ type: Number, default: 0 })\n\twallet?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryWallet?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpaidAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryPaidAmount?: number;\n}\n\nexport class RegularOrderPricing extends OrderPricing {\n\t@prop({ type: Number, default: 0 })\n\tdiscount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryDiscount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tloyaltyPointDiscount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryLoyaltyPointDiscount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tcouponDiscount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryCouponDiscount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpunchMarketingDiscount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryPunchMarketingDiscount?: number;\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import { OrderFinance } from './order-finance.model';
2
+ import { RegularOrderProfit } from '../embedded/profit.model';
3
+ import { Vat } from '../embedded/vat.model';
4
+ import { CouponDetails, LoyaltyPoint, MarketingCut } from '../embedded/marketing-cut.model';
5
+ import { RegularOrderPricing } from './order-pricing.model';
6
+ export declare class RegularOrderFinance extends OrderFinance {
7
+ pricing?: RegularOrderPricing;
8
+ companyProfit?: RegularOrderProfit;
9
+ shopProfit?: RegularOrderProfit;
10
+ vat?: Vat;
11
+ discount?: MarketingCut;
12
+ buy1get1?: MarketingCut;
13
+ loyaltyPoint?: LoyaltyPoint;
14
+ coupon?: CouponDetails;
15
+ freeDelivery?: MarketingCut;
16
+ replacementOrder?: MarketingCut;
17
+ endorseLoss?: MarketingCut;
18
+ }
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RegularOrderFinance = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ const order_finance_model_1 = require("./order-finance.model");
15
+ const profit_model_1 = require("../embedded/profit.model");
16
+ const vat_model_1 = require("../embedded/vat.model");
17
+ const marketing_cut_model_1 = require("../embedded/marketing-cut.model");
18
+ const order_pricing_model_1 = require("./order-pricing.model");
19
+ class RegularOrderFinance extends order_finance_model_1.OrderFinance {
20
+ pricing;
21
+ companyProfit;
22
+ shopProfit;
23
+ vat;
24
+ discount;
25
+ buy1get1;
26
+ loyaltyPoint;
27
+ coupon;
28
+ freeDelivery;
29
+ replacementOrder;
30
+ endorseLoss;
31
+ }
32
+ exports.RegularOrderFinance = RegularOrderFinance;
33
+ __decorate([
34
+ (0, typegoose_1.prop)({ type: () => order_pricing_model_1.RegularOrderPricing }),
35
+ __metadata("design:type", order_pricing_model_1.RegularOrderPricing)
36
+ ], RegularOrderFinance.prototype, "pricing", void 0);
37
+ __decorate([
38
+ (0, typegoose_1.prop)({ type: () => profit_model_1.RegularOrderProfit }),
39
+ __metadata("design:type", profit_model_1.RegularOrderProfit)
40
+ ], RegularOrderFinance.prototype, "companyProfit", void 0);
41
+ __decorate([
42
+ (0, typegoose_1.prop)({ type: () => profit_model_1.RegularOrderProfit }),
43
+ __metadata("design:type", profit_model_1.RegularOrderProfit)
44
+ ], RegularOrderFinance.prototype, "shopProfit", void 0);
45
+ __decorate([
46
+ (0, typegoose_1.prop)({ type: () => vat_model_1.Vat }),
47
+ __metadata("design:type", vat_model_1.Vat)
48
+ ], RegularOrderFinance.prototype, "vat", void 0);
49
+ __decorate([
50
+ (0, typegoose_1.prop)({ type: () => marketing_cut_model_1.MarketingCut }),
51
+ __metadata("design:type", marketing_cut_model_1.MarketingCut)
52
+ ], RegularOrderFinance.prototype, "discount", void 0);
53
+ __decorate([
54
+ (0, typegoose_1.prop)({ type: () => marketing_cut_model_1.MarketingCut }),
55
+ __metadata("design:type", marketing_cut_model_1.MarketingCut)
56
+ ], RegularOrderFinance.prototype, "buy1get1", void 0);
57
+ __decorate([
58
+ (0, typegoose_1.prop)({ type: () => marketing_cut_model_1.LoyaltyPoint }),
59
+ __metadata("design:type", marketing_cut_model_1.LoyaltyPoint)
60
+ ], RegularOrderFinance.prototype, "loyaltyPoint", void 0);
61
+ __decorate([
62
+ (0, typegoose_1.prop)({ type: () => marketing_cut_model_1.CouponDetails }),
63
+ __metadata("design:type", marketing_cut_model_1.CouponDetails)
64
+ ], RegularOrderFinance.prototype, "coupon", void 0);
65
+ __decorate([
66
+ (0, typegoose_1.prop)({ type: () => marketing_cut_model_1.MarketingCut }),
67
+ __metadata("design:type", marketing_cut_model_1.MarketingCut)
68
+ ], RegularOrderFinance.prototype, "freeDelivery", void 0);
69
+ __decorate([
70
+ (0, typegoose_1.prop)({ type: () => marketing_cut_model_1.MarketingCut }),
71
+ __metadata("design:type", marketing_cut_model_1.MarketingCut)
72
+ ], RegularOrderFinance.prototype, "replacementOrder", void 0);
73
+ __decorate([
74
+ (0, typegoose_1.prop)({ type: () => marketing_cut_model_1.MarketingCut }),
75
+ __metadata("design:type", marketing_cut_model_1.MarketingCut)
76
+ ], RegularOrderFinance.prototype, "endorseLoss", void 0);
77
+ //# sourceMappingURL=regular-order-finance.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regular-order-finance.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/regular-order-finance.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,+DAAqD;AACrD,2DAA8D;AAC9D,qDAA4C;AAC5C,yEAA4F;AAC5F,+DAA4D;AAE5D,MAAa,mBAAoB,SAAQ,kCAAY;IAE7C,OAAO,CAAuB;IAG9B,aAAa,CAAsB;IAGnC,UAAU,CAAsB;IAGhC,GAAG,CAAO;IAGV,QAAQ,CAAgB;IAGxB,QAAQ,CAAgB;IAGxB,YAAY,CAAgB;IAG5B,MAAM,CAAiB;IAGvB,YAAY,CAAgB;IAG5B,gBAAgB,CAAgB;IAGhC,WAAW,CAAgB;CAClC;AAjCD,kDAiCC;AA/BO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,yCAAmB,EAAE,CAAC;8BACzB,yCAAmB;oDAAC;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,iCAAkB,EAAE,CAAC;8BAClB,iCAAkB;0DAAC;AAGnC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,iCAAkB,EAAE,CAAC;8BACrB,iCAAkB;uDAAC;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,eAAG,EAAE,CAAC;8BACb,eAAG;gDAAC;AAGV;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;8BACjB,kCAAY;qDAAC;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;8BACjB,kCAAY;qDAAC;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;8BACb,kCAAY;yDAAC;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,mCAAa,EAAE,CAAC;8BACpB,mCAAa;mDAAC;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;8BACb,kCAAY;yDAAC;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;8BACT,kCAAY;6DAAC;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;8BACd,kCAAY;wDAAC","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { OrderFinance } from './order-finance.model';\nimport { RegularOrderProfit } from '../embedded/profit.model';\nimport { Vat } from '../embedded/vat.model';\nimport { CouponDetails, LoyaltyPoint, MarketingCut } from '../embedded/marketing-cut.model';\nimport { RegularOrderPricing } from './order-pricing.model';\n\nexport class RegularOrderFinance extends OrderFinance {\n\t@prop({ type: () => RegularOrderPricing })\n\tpublic pricing?: RegularOrderPricing;\n\t\n\t@prop({ type: () => RegularOrderProfit })\n\tpublic companyProfit?: RegularOrderProfit;\n\n\t@prop({ type: () => RegularOrderProfit })\n\tpublic shopProfit?: RegularOrderProfit;\n\n\t@prop({ type: () => Vat })\n\tpublic vat?: Vat;\n\n\t@prop({ type: () => MarketingCut })\n\tpublic discount?: MarketingCut;\n\n\t@prop({ type: () => MarketingCut })\n\tpublic buy1get1?: MarketingCut;\n\n\t@prop({ type: () => LoyaltyPoint })\n\tpublic loyaltyPoint?: LoyaltyPoint;\n\n\t@prop({ type: () => CouponDetails })\n\tpublic coupon?: CouponDetails;\n\n\t@prop({ type: () => MarketingCut })\n\tpublic freeDelivery?: MarketingCut;\n\n\t@prop({ type: () => MarketingCut })\n\tpublic replacementOrder?: MarketingCut;\n\n\t@prop({ type: () => MarketingCut })\n\tpublic endorseLoss?: MarketingCut;\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import { mongoose } from '@typegoose/typegoose';
2
+ import { RiderAssignmentStatus } from '../../../../utilities/enum';
3
+ export declare class RiderAssignment {
4
+ rider: mongoose.Types.ObjectId;
5
+ status: RiderAssignmentStatus;
6
+ timestamp: Date;
7
+ reason?: string;
8
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RiderAssignment = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ const rider_model_1 = require("../rider.model");
15
+ const enum_1 = require("../../../../utilities/enum");
16
+ class RiderAssignment {
17
+ rider;
18
+ status;
19
+ timestamp;
20
+ reason;
21
+ }
22
+ exports.RiderAssignment = RiderAssignment;
23
+ __decorate([
24
+ (0, typegoose_1.prop)({ ref: () => rider_model_1.Rider, required: true }),
25
+ __metadata("design:type", typegoose_1.mongoose.Types.ObjectId)
26
+ ], RiderAssignment.prototype, "rider", void 0);
27
+ __decorate([
28
+ (0, typegoose_1.prop)({
29
+ type: String,
30
+ enum: enum_1.RiderAssignmentStatus,
31
+ default: enum_1.RiderAssignmentStatus.REQUESTED,
32
+ required: true,
33
+ }),
34
+ __metadata("design:type", String)
35
+ ], RiderAssignment.prototype, "status", void 0);
36
+ __decorate([
37
+ (0, typegoose_1.prop)({ required: true, default: Date.now }),
38
+ __metadata("design:type", Date)
39
+ ], RiderAssignment.prototype, "timestamp", void 0);
40
+ __decorate([
41
+ (0, typegoose_1.prop)(),
42
+ __metadata("design:type", String)
43
+ ], RiderAssignment.prototype, "reason", void 0);
44
+ //# sourceMappingURL=rider-assignment-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rider-assignment-model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/rider-assignment-model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsD;AACtD,gDAAuC;AACvC,qDAAmE;AAEnE,MAAa,eAAe;IAE3B,KAAK,CAA0B;IAQ/B,MAAM,CAAwB;IAG9B,SAAS,CAAO;IAGhB,MAAM,CAAU;CAChB;AAjBD,0CAiBC;AAfA;IADC,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACpC,oBAAQ,CAAC,KAAK,CAAC,QAAQ;8CAAC;AAQ/B;IANC,IAAA,gBAAI,EAAC;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,4BAAqB;QAC3B,OAAO,EAAE,4BAAqB,CAAC,SAAS;QACxC,QAAQ,EAAE,IAAI;KACd,CAAC;;+CAC4B;AAG9B;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;8BACjC,IAAI;kDAAC;AAGhB;IADC,IAAA,gBAAI,GAAE;;+CACS","sourcesContent":["import { prop, mongoose } from '@typegoose/typegoose';\nimport { Rider } from '../rider.model';\nimport { RiderAssignmentStatus } from '../../../../utilities/enum';\n\nexport class RiderAssignment {\n\t@prop({ ref: () => Rider, required: true })\n\trider: mongoose.Types.ObjectId;\n\n\t@prop({\n\t\ttype: String,\n\t\tenum: RiderAssignmentStatus,\n\t\tdefault: RiderAssignmentStatus.REQUESTED,\n\t\trequired: true,\n\t})\n\tstatus: RiderAssignmentStatus;\n\n\t@prop({ required: true, default: Date.now })\n\ttimestamp: Date;\n\n\t@prop()\n\treason?: string;\n}\n"]}
@@ -0,0 +1,25 @@
1
+ import { Ref, mongoose } from '@typegoose/typegoose';
2
+ import { Rider } from '../rider.model';
3
+ import { FaqAccountType, ItemType, DeliveryStatus } from '../../../../utilities/enum';
4
+ import { User } from '../user.model';
5
+ import { Shop } from '../shop.model';
6
+ import { IDistance, IDuration } from '../../../map/interfaces/IMapService';
7
+ export declare class TripLeg {
8
+ name?: string;
9
+ address?: string;
10
+ latitude?: number;
11
+ longitude?: number;
12
+ type?: FaqAccountType;
13
+ rider?: Ref<Rider>;
14
+ orders?: mongoose.Types.ObjectId[];
15
+ user?: Ref<User>;
16
+ shop?: Ref<Shop>;
17
+ shopType?: ItemType;
18
+ status?: DeliveryStatus;
19
+ totalDistance?: IDistance;
20
+ totalDuration?: IDuration;
21
+ totalOverviewPolyline?: number[][];
22
+ distance?: IDistance;
23
+ duration?: IDuration;
24
+ overviewPolyline?: number[][];
25
+ }