@lyxa.ai/core 1.0.67-debug.1 → 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.
- package/dist/libraries/mongo/models/embedded/courier-order-finance.model.d.ts +2 -0
- package/dist/libraries/mongo/models/embedded/courier-order-finance.model.js +6 -0
- package/dist/libraries/mongo/models/embedded/courier-order-finance.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/order-finance.model.d.ts +0 -2
- package/dist/libraries/mongo/models/embedded/order-finance.model.js +0 -6
- package/dist/libraries/mongo/models/embedded/order-finance.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/order-pricing.model.d.ts +10 -8
- package/dist/libraries/mongo/models/embedded/order-pricing.model.js +30 -27
- package/dist/libraries/mongo/models/embedded/order-pricing.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/regular-order-finance.model.d.ts +2 -0
- package/dist/libraries/mongo/models/embedded/regular-order-finance.model.js +6 -0
- package/dist/libraries/mongo/models/embedded/regular-order-finance.model.js.map +1 -1
- package/dist/libraries/mongo/models/order.model.d.ts +1 -0
- package/dist/libraries/mongo/models/order.model.js +5 -0
- package/dist/libraries/mongo/models/order.model.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { OrderFinance } from './order-finance.model';
|
|
2
2
|
import { CourierOrderProfit } from '../embedded/profit.model';
|
|
3
|
+
import { OrderPricing } from './order-pricing.model';
|
|
3
4
|
export declare class CourierOrderFinance extends OrderFinance {
|
|
5
|
+
pricing?: OrderPricing;
|
|
4
6
|
companyProfit?: CourierOrderProfit;
|
|
5
7
|
}
|
|
@@ -13,10 +13,16 @@ exports.CourierOrderFinance = void 0;
|
|
|
13
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
14
|
const order_finance_model_1 = require("./order-finance.model");
|
|
15
15
|
const profit_model_1 = require("../embedded/profit.model");
|
|
16
|
+
const order_pricing_model_1 = require("./order-pricing.model");
|
|
16
17
|
class CourierOrderFinance extends order_finance_model_1.OrderFinance {
|
|
18
|
+
pricing;
|
|
17
19
|
companyProfit;
|
|
18
20
|
}
|
|
19
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);
|
|
20
26
|
__decorate([
|
|
21
27
|
(0, typegoose_1.prop)({ type: () => profit_model_1.CourierOrderProfit }),
|
|
22
28
|
__metadata("design:type", profit_model_1.CourierOrderProfit)
|
|
@@ -1 +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;
|
|
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"]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
2
|
-
import { OrderPricing } from './order-pricing.model';
|
|
3
2
|
import { PaymentInformation } from './payment-infromation.model';
|
|
4
3
|
import { PaymentMethod } from '../../../../utilities/enum';
|
|
5
4
|
import { RiderProfit } from './profit.model';
|
|
@@ -7,7 +6,6 @@ export declare class OrderFinance extends TimeStamps {
|
|
|
7
6
|
exchangeRate?: number;
|
|
8
7
|
paymentMethod?: PaymentMethod;
|
|
9
8
|
paymentInformation?: PaymentInformation;
|
|
10
|
-
pricing?: OrderPricing;
|
|
11
9
|
riderProfit?: RiderProfit;
|
|
12
10
|
processedAt?: Date;
|
|
13
11
|
}
|
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.OrderFinance = void 0;
|
|
13
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
14
|
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
|
-
const order_pricing_model_1 = require("./order-pricing.model");
|
|
16
15
|
const payment_infromation_model_1 = require("./payment-infromation.model");
|
|
17
16
|
const enum_1 = require("../../../../utilities/enum");
|
|
18
17
|
const profit_model_1 = require("./profit.model");
|
|
@@ -20,7 +19,6 @@ class OrderFinance extends defaultClasses_1.TimeStamps {
|
|
|
20
19
|
exchangeRate;
|
|
21
20
|
paymentMethod;
|
|
22
21
|
paymentInformation;
|
|
23
|
-
pricing;
|
|
24
22
|
riderProfit;
|
|
25
23
|
processedAt;
|
|
26
24
|
}
|
|
@@ -37,10 +35,6 @@ __decorate([
|
|
|
37
35
|
(0, typegoose_1.prop)({ type: () => payment_infromation_model_1.PaymentInformation }),
|
|
38
36
|
__metadata("design:type", payment_infromation_model_1.PaymentInformation)
|
|
39
37
|
], OrderFinance.prototype, "paymentInformation", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typegoose_1.prop)({ type: () => order_pricing_model_1.OrderPricing }),
|
|
42
|
-
__metadata("design:type", order_pricing_model_1.OrderPricing)
|
|
43
|
-
], OrderFinance.prototype, "pricing", void 0);
|
|
44
38
|
__decorate([
|
|
45
39
|
(0, typegoose_1.prop)({ type: () => profit_model_1.RiderProfit }),
|
|
46
40
|
__metadata("design:type", profit_model_1.RiderProfit)
|
|
@@ -1 +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
|
|
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, "
|
|
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, "
|
|
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, "
|
|
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, "
|
|
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, "
|
|
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, "
|
|
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, "
|
|
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, "
|
|
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, "
|
|
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, "
|
|
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
|
-
],
|
|
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
|
-
],
|
|
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
|
-
],
|
|
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
|
-
],
|
|
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
|
-
],
|
|
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
|
-
],
|
|
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
|
-
],
|
|
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
|
-
],
|
|
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,
|
|
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,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;8CACjB;AAGlB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CA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AwBC;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"]}
|
|
@@ -2,7 +2,9 @@ import { OrderFinance } from './order-finance.model';
|
|
|
2
2
|
import { RegularOrderProfit } from '../embedded/profit.model';
|
|
3
3
|
import { Vat } from '../embedded/vat.model';
|
|
4
4
|
import { CouponDetails, LoyaltyPoint, MarketingCut } from '../embedded/marketing-cut.model';
|
|
5
|
+
import { RegularOrderPricing } from './order-pricing.model';
|
|
5
6
|
export declare class RegularOrderFinance extends OrderFinance {
|
|
7
|
+
pricing?: RegularOrderPricing;
|
|
6
8
|
companyProfit?: RegularOrderProfit;
|
|
7
9
|
shopProfit?: RegularOrderProfit;
|
|
8
10
|
vat?: Vat;
|
|
@@ -15,7 +15,9 @@ const order_finance_model_1 = require("./order-finance.model");
|
|
|
15
15
|
const profit_model_1 = require("../embedded/profit.model");
|
|
16
16
|
const vat_model_1 = require("../embedded/vat.model");
|
|
17
17
|
const marketing_cut_model_1 = require("../embedded/marketing-cut.model");
|
|
18
|
+
const order_pricing_model_1 = require("./order-pricing.model");
|
|
18
19
|
class RegularOrderFinance extends order_finance_model_1.OrderFinance {
|
|
20
|
+
pricing;
|
|
19
21
|
companyProfit;
|
|
20
22
|
shopProfit;
|
|
21
23
|
vat;
|
|
@@ -28,6 +30,10 @@ class RegularOrderFinance extends order_finance_model_1.OrderFinance {
|
|
|
28
30
|
endorseLoss;
|
|
29
31
|
}
|
|
30
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);
|
|
31
37
|
__decorate([
|
|
32
38
|
(0, typegoose_1.prop)({ type: () => profit_model_1.RegularOrderProfit }),
|
|
33
39
|
__metadata("design:type", profit_model_1.RegularOrderProfit)
|
|
@@ -1 +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;
|
|
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,IA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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"]}
|
|
@@ -21,6 +21,7 @@ let Order = class Order extends defaultClasses_1.TimeStamps {
|
|
|
21
21
|
orderType;
|
|
22
22
|
user;
|
|
23
23
|
rider;
|
|
24
|
+
deliveredTimeInMinutes;
|
|
24
25
|
instruction;
|
|
25
26
|
note;
|
|
26
27
|
scheduledFor;
|
|
@@ -45,6 +46,10 @@ __decorate([
|
|
|
45
46
|
(0, typegoose_1.prop)({ ref: () => rider_model_1.Rider, index: true }),
|
|
46
47
|
__metadata("design:type", Object)
|
|
47
48
|
], Order.prototype, "rider", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typegoose_1.prop)({ type: Number }),
|
|
51
|
+
__metadata("design:type", Number)
|
|
52
|
+
], Order.prototype, "deliveredTimeInMinutes", void 0);
|
|
48
53
|
__decorate([
|
|
49
54
|
(0, typegoose_1.prop)({ type: String }),
|
|
50
55
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,kDAAoD;AACpD,sEAA4D;AAC5D,6CAAoC;AACpC,+CAAsC;AAe/B,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,2BAAU;IAE7B,OAAO,CAAS;IAGhB,SAAS,CAAa;IAGtB,IAAI,CAAY;IAGhB,KAAK,CAAc;IAGnB,WAAW,CAAU;IAGrB,IAAI,CAAU;IAGd,YAAY,CAAQ;IAGpB,WAAW,CAAe;IAG1B,WAAW,CAAW;IAGtB,aAAa,CAAW;CAC/B,CAAA;
|
|
1
|
+
{"version":3,"file":"order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,kDAAoD;AACpD,sEAA4D;AAC5D,6CAAoC;AACpC,+CAAsC;AAe/B,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,2BAAU;IAE7B,OAAO,CAAS;IAGhB,SAAS,CAAa;IAGtB,IAAI,CAAY;IAGhB,KAAK,CAAc;IAGnB,sBAAsB,CAAS;IAG/B,WAAW,CAAU;IAGrB,IAAI,CAAU;IAGd,YAAY,CAAQ;IAGpB,WAAW,CAAe;IAG1B,WAAW,CAAW;IAGtB,aAAa,CAAW;CAC/B,CAAA;AAjCY,sBAAK;AAEV;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;sCAC9B;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,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,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IACxB,IAAA,iBAAK,EAAC,EAAE,WAAW,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IACxC,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IACjC,IAAA,iBAAK,EAAC,EAAE,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC;GACvB,KAAK,CAiCjB","sourcesContent":["import { prop, Ref, modelOptions, index, Severity } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { OrderType } from '../../../utilities/enum';\nimport { OrderCancel } from './embedded/order-cancel.model';\nimport { User } from './user.model';\nimport { Rider } from './rider.model';\n\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'orders',\n\t\tdiscriminatorKey: 'orderType',\n\t\ttoJSON: { virtuals: true },\n\t\ttoObject: { virtuals: true },\n\t},\n\toptions: { allowMixed: Severity.ALLOW },\n})\n@index({ createdAt: -1 })\n@index({ orderStatus: 1, createdAt: -1 })\n@index({ user: 1, createdAt: -1 })\n@index({ rider: 1, orderStatus: 1 })\nexport class Order extends TimeStamps {\n\t@prop({ required: true, type: String, unique: true })\n\tpublic orderId: string;\n\n\t@prop({ type: String, enum: OrderType, default: OrderType.REGULAR })\n\tpublic orderType?: OrderType;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user: Ref<User>;\n\n\t@prop({ ref: () => Rider, index: true })\n\tpublic rider?: Ref<Rider>;\n\n\t@prop({ type: Number })\n\tpublic deliveredTimeInMinutes: number;\n\t\n\t@prop({ type: String })\n\tpublic instruction?: string;\n\n\t@prop({ type: String })\n\tpublic note?: string;\n\n\t@prop({ type: Date })\n\tpublic scheduledFor?: Date;\n\n\t@prop({ type: () => OrderCancel })\n\tpublic orderCancel?: OrderCancel;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLateOrder?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isUrgentOrder?: boolean;\n}\n"]}
|
package/package.json
CHANGED