@lyxa.ai/core 1.0.99 → 1.0.101
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/loyaltyPoint.model.d.ts +16 -0
- package/dist/libraries/mongo/models/embedded/loyaltyPoint.model.js +61 -0
- package/dist/libraries/mongo/models/embedded/loyaltyPoint.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/order-cancel.model.d.ts +1 -1
- package/dist/libraries/mongo/models/embedded/order-cancel.model.js +1 -1
- package/dist/libraries/mongo/models/embedded/order-cancel.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/order-finance.model.d.ts +0 -1
- package/dist/libraries/mongo/models/embedded/order-finance.model.js +0 -5
- package/dist/libraries/mongo/models/embedded/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 +7 -2
- package/dist/libraries/mongo/models/order.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/courier-order-finance.model.d.ts +7 -0
- package/dist/libraries/mongo/models/providers/courier-order-finance.model.js +26 -0
- package/dist/libraries/mongo/models/providers/courier-order-finance.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/regular-order-finance.model.d.ts +25 -0
- package/dist/libraries/mongo/models/providers/regular-order-finance.model.js +95 -0
- package/dist/libraries/mongo/models/providers/regular-order-finance.model.js.map +1 -0
- package/dist/libraries/mongo/models/rider.model.d.ts +1 -1
- package/dist/libraries/mongo/models/rider.model.js +2 -2
- package/dist/libraries/mongo/models/rider.model.js.map +1 -1
- package/dist/utilities/validation/common-validation.d.ts +7 -7
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Ref } from '@typegoose/typegoose';
|
|
2
|
+
import { Shop } from '../shop.model';
|
|
3
|
+
import { Order } from '../order.model';
|
|
4
|
+
declare class UsedPoint {
|
|
5
|
+
amountUsed: number;
|
|
6
|
+
dateUsed: Date;
|
|
7
|
+
}
|
|
8
|
+
export declare class LoyaltyPoint {
|
|
9
|
+
points: number;
|
|
10
|
+
dateGenerated: Date;
|
|
11
|
+
dateExpiry: Date;
|
|
12
|
+
shop?: Ref<Shop>;
|
|
13
|
+
order?: Ref<Order>;
|
|
14
|
+
usedPoints: UsedPoint[];
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
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.LoyaltyPoint = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const shop_model_1 = require("../shop.model");
|
|
15
|
+
const order_model_1 = require("../order.model");
|
|
16
|
+
class UsedPoint {
|
|
17
|
+
amountUsed;
|
|
18
|
+
dateUsed;
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typegoose_1.prop)({ required: true }),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], UsedPoint.prototype, "amountUsed", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typegoose_1.prop)({ required: true }),
|
|
26
|
+
__metadata("design:type", Date)
|
|
27
|
+
], UsedPoint.prototype, "dateUsed", void 0);
|
|
28
|
+
class LoyaltyPoint {
|
|
29
|
+
points;
|
|
30
|
+
dateGenerated;
|
|
31
|
+
dateExpiry;
|
|
32
|
+
shop;
|
|
33
|
+
order;
|
|
34
|
+
usedPoints;
|
|
35
|
+
}
|
|
36
|
+
exports.LoyaltyPoint = LoyaltyPoint;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typegoose_1.prop)({ required: true }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], LoyaltyPoint.prototype, "points", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typegoose_1.prop)({ required: true }),
|
|
43
|
+
__metadata("design:type", Date)
|
|
44
|
+
], LoyaltyPoint.prototype, "dateGenerated", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typegoose_1.prop)({ required: true }),
|
|
47
|
+
__metadata("design:type", Date)
|
|
48
|
+
], LoyaltyPoint.prototype, "dateExpiry", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typegoose_1.prop)({ ref: () => shop_model_1.Shop, required: true }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], LoyaltyPoint.prototype, "shop", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typegoose_1.prop)({ ref: () => order_model_1.Order, required: true }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], LoyaltyPoint.prototype, "order", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typegoose_1.prop)({ type: () => [UsedPoint], default: [] }),
|
|
59
|
+
__metadata("design:type", Array)
|
|
60
|
+
], LoyaltyPoint.prototype, "usedPoints", void 0);
|
|
61
|
+
//# sourceMappingURL=loyaltyPoint.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loyaltyPoint.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/loyaltyPoint.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,oDAAiD;AACjD,8CAAqC;AACrC,gDAAuC;AAEvC,MAAM,SAAS;IAEP,UAAU,CAAU;IAGpB,QAAQ,CAAQ;CACvB;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACE;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACP,IAAI;2CAAC;AAGxB,MAAa,YAAY;IAEjB,MAAM,CAAU;IAGhB,aAAa,CAAQ;IAGrB,UAAU,CAAQ;IAGlB,IAAI,CAAa;IAGjB,KAAK,CAAc;IAEnB,UAAU,CAAe;CAChC;AAjBD,oCAiBC;AAfO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACF;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACF,IAAI;mDAAC;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACL,IAAI;gDAAC;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CAClB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACjB;AAEnB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;gDACf","sourcesContent":["// loyaltyPoint.model.ts\nimport { prop, Ref } from '@typegoose/typegoose';\nimport { Shop } from '../shop.model';\nimport { Order } from '../order.model';\n\nclass UsedPoint {\n\t@prop({ required: true })\n\tpublic amountUsed!: number;\n\n\t@prop({ required: true })\n\tpublic dateUsed!: Date;\n}\n\nexport class LoyaltyPoint {\n\t@prop({ required: true })\n\tpublic points!: number;\n\n\t@prop({ required: true })\n\tpublic dateGenerated!: Date;\n\n\t@prop({ required: true })\n\tpublic dateExpiry!: Date;\n\n\t@prop({ ref: () => Shop, required: true })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ ref: () => Order, required: true })\n\tpublic order?: Ref<Order>;\n\t@prop({ type: () => [UsedPoint], default: [] })\n\tpublic usedPoints!: UsedPoint[];\n}\n"]}
|
|
@@ -9,7 +9,7 @@ export declare class OrderCancel {
|
|
|
9
9
|
cancelReason?: string;
|
|
10
10
|
}
|
|
11
11
|
export declare class EndorseLoss {
|
|
12
|
-
selectedLineItems
|
|
12
|
+
selectedLineItems: Ref<LineItem>[];
|
|
13
13
|
deliveryFeeIncludedInEndorsement?: Boolean;
|
|
14
14
|
endorseLossByShopForItems: number;
|
|
15
15
|
secondaryEndorseLossByShopForItems: number;
|
|
@@ -57,7 +57,7 @@ class EndorseLoss {
|
|
|
57
57
|
}
|
|
58
58
|
exports.EndorseLoss = EndorseLoss;
|
|
59
59
|
__decorate([
|
|
60
|
-
(0, typegoose_1.prop)({ ref: () => line_item_model_1.LineItem, default: [] }),
|
|
60
|
+
(0, typegoose_1.prop)({ required: true, ref: () => line_item_model_1.LineItem, default: [] }),
|
|
61
61
|
__metadata("design:type", Array)
|
|
62
62
|
], EndorseLoss.prototype, "selectedLineItems", void 0);
|
|
63
63
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-cancel.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/order-cancel.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAAoE;AACpE,gDAAuC;AACvC,wDAA8C;AAG9C,MAAa,WAAW;IAMvB,QAAQ,CAAa;IAGrB,UAAU,CAAS;IAGnB,KAAK,CAAc;IAGnB,YAAY,CAAU;CACtB;AAhBD,kCAgBC;AAVA;IALC,IAAA,gBAAI,EAAC;QACL,IAAI,EAAE,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,cAAO;QACb,OAAO,EAAE,EAAE;KACX,CAAC;;6CACmB;AAGrB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAa,EAAE,CAAC;;+CACzB;AAGnB;IADC,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;0CACR;AAGnB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACD;AAGvB,MAAa,WAAW;IAEvB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"order-cancel.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/order-cancel.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAAoE;AACpE,gDAAuC;AACvC,wDAA8C;AAG9C,MAAa,WAAW;IAMvB,QAAQ,CAAa;IAGrB,UAAU,CAAS;IAGnB,KAAK,CAAc;IAGnB,YAAY,CAAU;CACtB;AAhBD,kCAgBC;AAVA;IALC,IAAA,gBAAI,EAAC;QACL,IAAI,EAAE,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,cAAO;QACb,OAAO,EAAE,EAAE;KACX,CAAC;;6CACmB;AAGrB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAa,EAAE,CAAC;;+CACzB;AAGnB;IADC,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;0CACR;AAGnB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACD;AAGvB,MAAa,WAAW;IAEvB,iBAAiB,CAAkB;IAGnC,gCAAgC,CAAW;IAG3C,yBAAyB,CAAU;IAGnC,kCAAkC,CAAU;IAG5C,4BAA4B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AAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;oEACV;AAGzC;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;6EACD;AAGlD;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;gDAC9B;AAGrB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;yDACrB","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { LogUser, OrderCancelBy } from '../../../../utilities/enum';\nimport { Admin } from '../admin.model';\nimport { LineItem } from '../line-item.model';\n\n\nexport class OrderCancel {\n\t@prop({\n\t\ttype: [String],\n\t\tenum: LogUser,\n\t\tdefault: [],\n\t})\n\tlogusers!: LogUser[];\n\n\t@prop({ type: String, enum: OrderCancelBy })\n\tcanceledBy: string;\n\n\t@prop({ ref: () => Admin })\n\tadmin?: Ref<Admin>;\n\n\t@prop({ type: String })\n\tcancelReason?: string;\n}\n\nexport class EndorseLoss {\n\t@prop({ required: true, ref: () => LineItem, default: [] })\n\tselectedLineItems: Ref<LineItem>[];\n\n\t@prop({ type: Boolean, default: false })\n\tdeliveryFeeIncludedInEndorsement?: Boolean;\n\n\t@prop({ type: Number, required: true, default: 0 })\n\tendorseLossByShopForItems!: number;\n\n\t@prop({ type: Number, required: true, default: 0 })\n\tsecondaryEndorseLossByShopForItems!: number;\n\n\t@prop({ type: Number, required: true, default: 0 })\n\tendorseLossByShopForDelivery!: number;\n\n\t@prop({ type: Number, required: true, default: 0 })\n\tsecondaryEndorseLossByShopForDelivery!: number;\n\n\t@prop({ type: Number, required: true, default: 0 })\n\tendorseLossByCompanyForItems!: number;\n\n\t@prop({ type: Number, required: true, default: 0 })\n\tsecondaryEndorseLossByCompanyForItems!: number;\n\n\t@prop({ type: Number, required: true, default: 0 })\n\tendorseLossByCompanyForDelivery!: number;\n\n\t@prop({ type: Number, required: true, default: 0 })\n\tsecondaryEndorseLossByCompanyForDelivery!: number;\n\n\t@prop({ type: Number, required: true, default: 0 })\n\ttotalAmount!: number;\n\n\t@prop({ type: Number, required: true, default: 0 })\n\tsecondaryTotalAmount!: number;\n}\n"]}
|
|
@@ -22,7 +22,6 @@ class OrderFinance extends defaultClasses_1.TimeStamps {
|
|
|
22
22
|
paymentInformation;
|
|
23
23
|
riderProfit;
|
|
24
24
|
cashSettlement;
|
|
25
|
-
processedAt;
|
|
26
25
|
}
|
|
27
26
|
exports.OrderFinance = OrderFinance;
|
|
28
27
|
__decorate([
|
|
@@ -45,8 +44,4 @@ __decorate([
|
|
|
45
44
|
(0, typegoose_1.prop)({ type: () => cash_settlement_model_1.CashSettlement }),
|
|
46
45
|
__metadata("design:type", cash_settlement_model_1.CashSettlement)
|
|
47
46
|
], OrderFinance.prototype, "cashSettlement", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, typegoose_1.prop)({ type: Date }),
|
|
50
|
-
__metadata("design:type", Date)
|
|
51
|
-
], OrderFinance.prototype, "processedAt", void 0);
|
|
52
47
|
//# sourceMappingURL=order-finance.model.js.map
|
|
@@ -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,2EAAiE;AACjE,qDAA2D;AAC3D,iDAA6C;AAC7C,mEAAyD;AAEzD,MAAa,YAAa,SAAQ,2BAAU;IAEpC,YAAY,CAAU;IAGtB,aAAa,CAAiB;IAGrC,kBAAkB,CAAsB;IAGjC,WAAW,CAAe;IAG1B,cAAc,CAAkB;
|
|
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;AAC7C,mEAAyD;AAEzD,MAAa,YAAa,SAAQ,2BAAU;IAEpC,YAAY,CAAU;IAGtB,aAAa,CAAiB;IAGrC,kBAAkB,CAAsB;IAGjC,WAAW,CAAe;IAG1B,cAAc,CAAkB;CACvC;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,GAAG,EAAE,CAAC,sCAAc,EAAE,CAAC;8BACb,sCAAc;oDAAC","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';\nimport { CashSettlement } from './cash-settlement.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: () => CashSettlement })\n\tpublic cashSettlement?: CashSettlement;\n}\n"]}
|
|
@@ -28,6 +28,7 @@ let Order = class Order extends defaultClasses_1.TimeStamps {
|
|
|
28
28
|
orderCancel;
|
|
29
29
|
isLateOrder;
|
|
30
30
|
isUrgentOrder;
|
|
31
|
+
processedAt;
|
|
31
32
|
};
|
|
32
33
|
exports.Order = Order;
|
|
33
34
|
__decorate([
|
|
@@ -74,6 +75,10 @@ __decorate([
|
|
|
74
75
|
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
75
76
|
__metadata("design:type", Boolean)
|
|
76
77
|
], Order.prototype, "isUrgentOrder", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typegoose_1.prop)({ type: Date }),
|
|
80
|
+
__metadata("design:type", Date)
|
|
81
|
+
], Order.prototype, "processedAt", void 0);
|
|
77
82
|
exports.Order = Order = __decorate([
|
|
78
83
|
(0, typegoose_1.modelOptions)({
|
|
79
84
|
schemaOptions: {
|
|
@@ -93,7 +98,7 @@ exports.Order = Order = __decorate([
|
|
|
93
98
|
'statusTimeline.timestamp': 1,
|
|
94
99
|
deletedAt: 1,
|
|
95
100
|
}),
|
|
96
|
-
(0, typegoose_1.Index)({ shop: 1, orderType: 1, status: 1,
|
|
101
|
+
(0, typegoose_1.Index)({ shop: 1, orderType: 1, status: 1, processedAt: 1, deletedAt: 1 }),
|
|
97
102
|
(0, typegoose_1.Index)({ shop: 1, orderType: 1, status: 1, 'deliveryAddress.location': 1, deletedAt: 1 }),
|
|
98
103
|
(0, typegoose_1.Index)({ shop: 1, orderType: 1, status: 1, deletedAt: 1 }),
|
|
99
104
|
(0, typegoose_1.Index)({
|
|
@@ -104,6 +109,6 @@ exports.Order = Order = __decorate([
|
|
|
104
109
|
'statusTimeline.timestamp': 1,
|
|
105
110
|
deletedAt: 1,
|
|
106
111
|
}),
|
|
107
|
-
(0, typegoose_1.Index)({ parent: 1, orderType: 1, status: 1,
|
|
112
|
+
(0, typegoose_1.Index)({ parent: 1, orderType: 1, status: 1, processedAt: 1, deletedAt: 1 })
|
|
108
113
|
], Order);
|
|
109
114
|
//# sourceMappingURL=order.model.js.map
|
|
@@ -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;AAgC/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;
|
|
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;AAgC/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;IAGxB,WAAW,CAAQ;CAC1B,CAAA;AApCY,sBAAK;AAEV;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IA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CAAC,EAAE,CAAC;GAC/D,KAAK,CAoCjB","sourcesContent":["import { prop, Ref, modelOptions, Severity, Index } 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({ 'deliveryAddress.location': '2dsphere' })\n@Index({\n\tshop: 1,\n\torderType: 1,\n\tstatus: 1,\n\t'statusTimeline.status': 1,\n\t'statusTimeline.timestamp': 1,\n\tdeletedAt: 1,\n})\n@Index({ shop: 1, orderType: 1, status: 1, processedAt: 1, deletedAt: 1 })\n@Index({ shop: 1, orderType: 1, status: 1, 'deliveryAddress.location': 1, deletedAt: 1 })\n@Index({ shop: 1, orderType: 1, status: 1, deletedAt: 1 })\n@Index({\n\tparent: 1,\n\torderType: 1,\n\tstatus: 1,\n\t'statusTimeline.status': 1,\n\t'statusTimeline.timestamp': 1,\n\tdeletedAt: 1,\n})\n@Index({ parent: 1, orderType: 1, status: 1, processedAt: 1, deletedAt: 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\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\t@prop({ type: Date })\n\tpublic processedAt?: Date;\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OrderFinance } from '../order-finance.model';
|
|
2
|
+
import { OrderType } from '../../../../utilities/enum';
|
|
3
|
+
import { CourierOrderProfit } from '../embedded/profit.model';
|
|
4
|
+
export declare class CourierOrderFinance extends OrderFinance {
|
|
5
|
+
orderType: OrderType.COURIER;
|
|
6
|
+
companyProfit?: CourierOrderProfit;
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 enum_1 = require("../../../../utilities/enum");
|
|
16
|
+
const profit_model_1 = require("../embedded/profit.model");
|
|
17
|
+
class CourierOrderFinance extends order_finance_model_1.OrderFinance {
|
|
18
|
+
orderType = enum_1.OrderType.COURIER;
|
|
19
|
+
companyProfit;
|
|
20
|
+
}
|
|
21
|
+
exports.CourierOrderFinance = CourierOrderFinance;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typegoose_1.prop)({ type: () => profit_model_1.CourierOrderProfit }),
|
|
24
|
+
__metadata("design:type", profit_model_1.CourierOrderProfit)
|
|
25
|
+
], CourierOrderFinance.prototype, "companyProfit", void 0);
|
|
26
|
+
//# sourceMappingURL=courier-order-finance.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"courier-order-finance.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/courier-order-finance.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,gEAAsD;AACtD,qDAAuD;AACvD,2DAA8D;AAE9D,MAAa,mBAAoB,SAAQ,kCAAY;IAC7C,SAAS,GAAG,gBAAS,CAAC,OAAgB,CAAC;IAGvC,aAAa,CAAsB;CAC1C;AALD,kDAKC;AADO;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 { OrderType } from '../../../../utilities/enum';\nimport { CourierOrderProfit } from '../embedded/profit.model';\n\nexport class CourierOrderFinance extends OrderFinance {\n\tpublic orderType = OrderType.COURIER as const;\n\n\t@prop({ type: () => CourierOrderProfit })\n\tpublic companyProfit?: CourierOrderProfit;\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Ref } from '@typegoose/typegoose';
|
|
2
|
+
import { OrderFinance } from '../order-finance.model';
|
|
3
|
+
import { ItemType, OrderType } from '../../../../utilities/enum';
|
|
4
|
+
import { RegularOrderProfit } from '../embedded/profit.model';
|
|
5
|
+
import { Vat } from '../embedded/vat.model';
|
|
6
|
+
import { CouponDetails, LoyaltyPoint, MarketingCut } from '../embedded/marketing-cut.model';
|
|
7
|
+
import { Parent } from '../parent.model';
|
|
8
|
+
import { Shop } from '../shop.model';
|
|
9
|
+
export declare class RegularOrderFinance extends OrderFinance {
|
|
10
|
+
orderType: OrderType.REGULAR;
|
|
11
|
+
parent: Ref<Parent>;
|
|
12
|
+
shop: Ref<Shop>;
|
|
13
|
+
itemType: ItemType;
|
|
14
|
+
isShopDelivery?: boolean;
|
|
15
|
+
companyProfit?: RegularOrderProfit;
|
|
16
|
+
shopProfit?: RegularOrderProfit;
|
|
17
|
+
vat?: Vat;
|
|
18
|
+
discount?: MarketingCut;
|
|
19
|
+
buy1get1?: MarketingCut;
|
|
20
|
+
loyaltyPoint?: LoyaltyPoint;
|
|
21
|
+
coupon?: CouponDetails;
|
|
22
|
+
freeDelivery?: MarketingCut;
|
|
23
|
+
replacementOrder?: MarketingCut;
|
|
24
|
+
endorseLoss?: MarketingCut;
|
|
25
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
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 enum_1 = require("../../../../utilities/enum");
|
|
16
|
+
const profit_model_1 = require("../embedded/profit.model");
|
|
17
|
+
const vat_model_1 = require("../embedded/vat.model");
|
|
18
|
+
const marketing_cut_model_1 = require("../embedded/marketing-cut.model");
|
|
19
|
+
const parent_model_1 = require("../parent.model");
|
|
20
|
+
const shop_model_1 = require("../shop.model");
|
|
21
|
+
class RegularOrderFinance extends order_finance_model_1.OrderFinance {
|
|
22
|
+
orderType = enum_1.OrderType.REGULAR;
|
|
23
|
+
parent;
|
|
24
|
+
shop;
|
|
25
|
+
itemType;
|
|
26
|
+
isShopDelivery;
|
|
27
|
+
companyProfit;
|
|
28
|
+
shopProfit;
|
|
29
|
+
vat;
|
|
30
|
+
discount;
|
|
31
|
+
buy1get1;
|
|
32
|
+
loyaltyPoint;
|
|
33
|
+
coupon;
|
|
34
|
+
freeDelivery;
|
|
35
|
+
replacementOrder;
|
|
36
|
+
endorseLoss;
|
|
37
|
+
}
|
|
38
|
+
exports.RegularOrderFinance = RegularOrderFinance;
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typegoose_1.prop)({ required: true, ref: () => parent_model_1.Parent, index: true }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], RegularOrderFinance.prototype, "parent", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typegoose_1.prop)({ required: true, ref: () => shop_model_1.Shop, index: true }),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], RegularOrderFinance.prototype, "shop", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ItemType, index: true }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], RegularOrderFinance.prototype, "itemType", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
53
|
+
__metadata("design:type", Boolean)
|
|
54
|
+
], RegularOrderFinance.prototype, "isShopDelivery", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typegoose_1.prop)({ type: () => profit_model_1.RegularOrderProfit }),
|
|
57
|
+
__metadata("design:type", profit_model_1.RegularOrderProfit)
|
|
58
|
+
], RegularOrderFinance.prototype, "companyProfit", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typegoose_1.prop)({ type: () => profit_model_1.RegularOrderProfit }),
|
|
61
|
+
__metadata("design:type", profit_model_1.RegularOrderProfit)
|
|
62
|
+
], RegularOrderFinance.prototype, "shopProfit", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typegoose_1.prop)({ type: () => vat_model_1.Vat }),
|
|
65
|
+
__metadata("design:type", vat_model_1.Vat)
|
|
66
|
+
], RegularOrderFinance.prototype, "vat", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typegoose_1.prop)({ type: () => marketing_cut_model_1.MarketingCut }),
|
|
69
|
+
__metadata("design:type", marketing_cut_model_1.MarketingCut)
|
|
70
|
+
], RegularOrderFinance.prototype, "discount", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typegoose_1.prop)({ type: () => marketing_cut_model_1.MarketingCut }),
|
|
73
|
+
__metadata("design:type", marketing_cut_model_1.MarketingCut)
|
|
74
|
+
], RegularOrderFinance.prototype, "buy1get1", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typegoose_1.prop)({ type: () => marketing_cut_model_1.LoyaltyPoint }),
|
|
77
|
+
__metadata("design:type", marketing_cut_model_1.LoyaltyPoint)
|
|
78
|
+
], RegularOrderFinance.prototype, "loyaltyPoint", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typegoose_1.prop)({ type: () => marketing_cut_model_1.CouponDetails }),
|
|
81
|
+
__metadata("design:type", marketing_cut_model_1.CouponDetails)
|
|
82
|
+
], RegularOrderFinance.prototype, "coupon", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typegoose_1.prop)({ type: () => marketing_cut_model_1.MarketingCut }),
|
|
85
|
+
__metadata("design:type", marketing_cut_model_1.MarketingCut)
|
|
86
|
+
], RegularOrderFinance.prototype, "freeDelivery", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typegoose_1.prop)({ type: () => marketing_cut_model_1.MarketingCut }),
|
|
89
|
+
__metadata("design:type", marketing_cut_model_1.MarketingCut)
|
|
90
|
+
], RegularOrderFinance.prototype, "replacementOrder", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typegoose_1.prop)({ type: () => marketing_cut_model_1.MarketingCut }),
|
|
93
|
+
__metadata("design:type", marketing_cut_model_1.MarketingCut)
|
|
94
|
+
], RegularOrderFinance.prototype, "endorseLoss", void 0);
|
|
95
|
+
//# sourceMappingURL=regular-order-finance.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regular-order-finance.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/regular-order-finance.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,gEAAsD;AACtD,qDAAiE;AACjE,2DAA8D;AAC9D,qDAA4C;AAC5C,yEAA4F;AAC5F,kDAAyC;AACzC,8CAAqC;AAErC,MAAa,mBAAoB,SAAQ,kCAAY;IAC7C,SAAS,GAAG,gBAAS,CAAC,OAAgB,CAAC;IAGvC,MAAM,CAAe;IAGrB,IAAI,CAAa;IAGjB,QAAQ,CAAY;IAGpB,cAAc,CAAW;IAGzB,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;AA5CD,kDA4CC;AAxCO;IADN,IAA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E,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, Ref } from '@typegoose/typegoose';\nimport { OrderFinance } from '../order-finance.model';\nimport { ItemType, OrderType } from '../../../../utilities/enum';\nimport { RegularOrderProfit } from '../embedded/profit.model';\nimport { Vat } from '../embedded/vat.model';\nimport { CouponDetails, LoyaltyPoint, MarketingCut } from '../embedded/marketing-cut.model';\nimport { Parent } from '../parent.model';\nimport { Shop } from '../shop.model';\n\nexport class RegularOrderFinance extends OrderFinance {\n\tpublic orderType = OrderType.REGULAR as const;\n\n\t@prop({ required: true, ref: () => Parent, index: true })\n\tpublic parent!: Ref<Parent>;\n\n\t@prop({ required: true, ref: () => Shop, index: true })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, type: String, enum: ItemType, index: true })\n\tpublic itemType!: ItemType;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isShopDelivery?: boolean;\n\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"]}
|
|
@@ -49,7 +49,7 @@ let Rider = class Rider extends defaultClasses_1.TimeStamps {
|
|
|
49
49
|
isLogin;
|
|
50
50
|
lastLoginDeviceId;
|
|
51
51
|
reviews;
|
|
52
|
-
|
|
52
|
+
avgRating;
|
|
53
53
|
shift;
|
|
54
54
|
zone;
|
|
55
55
|
riderType;
|
|
@@ -183,7 +183,7 @@ __decorate([
|
|
|
183
183
|
__decorate([
|
|
184
184
|
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
185
185
|
__metadata("design:type", Number)
|
|
186
|
-
], Rider.prototype, "
|
|
186
|
+
], Rider.prototype, "avgRating", void 0);
|
|
187
187
|
__decorate([
|
|
188
188
|
(0, typegoose_1.prop)({ type: String, enum: enum_1.ShiftType, default: enum_1.ShiftType.DAY }),
|
|
189
189
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rider.model.js","sourceRoot":"/","sources":["libraries/mongo/models/rider.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAE3E,4EAAqE;AACrE,oEAA0D;AAC1D,6DAAmD;AACnD,6CAAoC;AACpC,6CAAoC;AACpC,kDAAsH;AACtH,4EAAkE;AAElE,iEAAkE;AAmB3D,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,2BAAU;IAE7B,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,KAAK,CAAU;IAGf,QAAQ,CAAU;IAGlB,MAAM,CAAU;IAGhB,WAAW,CAAU;IAGrB,QAAQ,CAAY;IAGpB,MAAM,CAAU;IAGhB,MAAM,CAAU;IAGhB,GAAG,CAAQ;IAGX,UA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MAAM,IAAA,uBAAY,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACtD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IAED,IAAA,iBAAK,EAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAC/B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;GAC/D,KAAK,CA8HjB","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport bcrypt from 'bcryptjs';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { GeoLocation } from './shared/geo-location.model';\nimport { RiderReview } from './rider-review.model';\nimport { Zone } from './zone.model';\nimport { Shop } from './shop.model';\nimport { CreatedBy, Language, LiveStatus, RiderBagSize, RiderType, ShiftType, Status } from '../../../utilities/enum';\nimport { RiderEquipment } from './embedded/rider-equipment.model';\nimport { Query } from 'mongoose';\nimport { hashPassword } from '../../../utilities/common/password';\n\n@pre<Rider>('save', async function (next) {\n\tif (this.isModified('password')) {\n\t\tthis.password = await hashPassword(this.password);\n\t}\n\tnext();\n})\n@pre<Query<any, Rider>>('findOneAndUpdate', async function (next) {\n\tconst update = this.getUpdate() as Record<string, any>;\n\tif (update?.password) {\n\t\tupdate.password = await hashPassword(update.password);\n\t\tthis.setUpdate(update);\n\t}\n\tnext();\n})\n\n@index({ location: '2dsphere' })\n@modelOptions({ schemaOptions: { collection: 'riders', timestamps: true } })\nexport class Rider extends TimeStamps {\n\t@prop({ type: String, required: true })\n\tpublic name!: string;\n\n\t@prop({ type: String })\n\tpublic image?: string;\n\n\t@prop({ type: String, required: true })\n\tpublic email!: string;\n\n\t@prop({ type: String })\n\tpublic password!: string;\n\n\t@prop({ type: String })\n\tpublic gender?: string;\n\n\t@prop({ type: String })\n\tpublic countryCode?: string;\n\n\t@prop({ type: String, enum: Language, default: Language.EN })\n\tpublic language?: Language;\n\n\t@prop({ type: String })\n\tpublic number?: string;\n\n\t@prop({ type: String, enum: Status, default: Status.INACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Date })\n\tpublic dob?: Date;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic totalOrder?: number;\n\n\t@prop({ type: String, enum: LiveStatus, default: LiveStatus.OFFLINE })\n\tpublic liveStatus?: LiveStatus;\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic fcmToken?: string[];\n\n\t@prop({ type: Date, default: Date.now })\n\tpublic lastLogin?: Date;\n\n\t@prop({ type: Date, default: Date.now })\n\tpublic lastOnline?: Date;\n\n\t@prop({ type: String })\n\tpublic nationalIdDocument?: string;\n\n\t@prop({ type: String })\n\tpublic vehicleRegistrationDocument?: string;\n\n\t@prop({ type: String })\n\tpublic vehicleType?: string;\n\n\t@prop({ type: String })\n\tpublic vehicleNumber?: string;\n\n\t@prop({ type: String })\n\tpublic address?: string;\n\n\t@prop({ type: GeoLocation })\n\tpublic location?: GeoLocation;\n\n\t@prop({ type: String })\n\tpublic forgetToken?: string;\n\n\t@prop({ type: Date })\n\tpublic forgetExpired?: Date;\n\n\t@prop({ type: Date })\n\tpublic lastLocationUpdateAt?: Date;\n\n\t@prop({ type: String })\n\tpublic contractImage?: string;\n\n\t@prop({ type: String, enum: CreatedBy, default: CreatedBy.ADMIN })\n\tpublic createdBy?: CreatedBy;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLogin?: boolean;\n\n\t@prop({ type: String })\n\tpublic lastLoginDeviceId?: string;\n\n\t@prop({ type: () => [String], ref: () => RiderReview, default: [] })\n\tpublic reviews?: Ref<RiderReview>[];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic avgRating?: number;\n\n\t@prop({ type: String, enum: ShiftType, default: ShiftType.DAY })\n\tpublic shift?: ShiftType;\n\n\t@prop({ ref: () => Zone })\n\tpublic zone?: Ref<Zone>;\n\n\t@prop({ type: String, enum: RiderType, default: RiderType.LYXA_RIDER })\n\tpublic riderType?: RiderType;\n\n\t@prop({ type: String, enum: RiderBagSize, default: RiderBagSize.REGULAR })\n\tpublic bagSize?: RiderBagSize;\n\n\t@prop({ type: String, ref: () => Shop })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ type: String })\n\tpublic riderNationality?: string;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isCashSettlementLimitReached?: boolean;\n\n\t@prop({ type: Date, default: null })\n\tpublic firstActiveAt?: Date | null;\n\n\t@prop({ type: () => [RiderEquipment], default: [] })\n\tpublic riderEquipments?: RiderEquipment[];\n\n\t@prop({ type: String })\n\tpublic insurance?: string;\n\n\t@prop({ type: String })\n\tpublic powerOfAttorney?: string;\n\n\t@prop({ type: String })\n\tpublic proofOfResidence?: string;\n}\n"]}
|
|
@@ -196,7 +196,7 @@ export declare const AddressSchema: z.ZodObject<{
|
|
|
196
196
|
zone?: string | import("mongoose").Types.ObjectId | undefined;
|
|
197
197
|
}>;
|
|
198
198
|
export type AddressDTO = DTO<typeof AddressSchema>;
|
|
199
|
-
export declare const UserAddressSchema: z.ZodObject<{
|
|
199
|
+
export declare const UserAddressSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
200
200
|
address: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
201
201
|
description: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
202
202
|
city: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
@@ -215,13 +215,13 @@ export declare const UserAddressSchema: z.ZodObject<{
|
|
|
215
215
|
latitude: z.ZodNumber;
|
|
216
216
|
longitude: z.ZodNumber;
|
|
217
217
|
zone: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
218
|
-
}
|
|
218
|
+
}, {
|
|
219
219
|
addressLabel: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
220
220
|
apartment: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
221
221
|
buildingName: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
222
222
|
deliveryOption: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
223
223
|
instructions: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
224
|
-
}
|
|
224
|
+
}>, "strip", z.ZodTypeAny, {
|
|
225
225
|
location: {
|
|
226
226
|
type: GeoLocationType;
|
|
227
227
|
coordinates: [number, number];
|
|
@@ -259,7 +259,7 @@ export declare const UserAddressSchema: z.ZodObject<{
|
|
|
259
259
|
instructions?: string | undefined;
|
|
260
260
|
}>;
|
|
261
261
|
export type UserAddressDTO = DTO<typeof UserAddressSchema>;
|
|
262
|
-
export declare const CourierAddressSchema: z.ZodObject<{
|
|
262
|
+
export declare const CourierAddressSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
263
263
|
address: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
264
264
|
description: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
265
265
|
city: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
@@ -278,16 +278,16 @@ export declare const CourierAddressSchema: z.ZodObject<{
|
|
|
278
278
|
latitude: z.ZodNumber;
|
|
279
279
|
longitude: z.ZodNumber;
|
|
280
280
|
zone: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
281
|
-
}
|
|
281
|
+
}, {
|
|
282
282
|
addressLabel: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
283
283
|
apartment: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
284
284
|
buildingName: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
285
285
|
deliveryOption: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
286
286
|
instructions: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
287
|
-
}
|
|
287
|
+
}>, {
|
|
288
288
|
name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
289
289
|
phoneNumber: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
290
|
-
}
|
|
290
|
+
}>, "strip", z.ZodTypeAny, {
|
|
291
291
|
name: string;
|
|
292
292
|
location: {
|
|
293
293
|
type: GeoLocationType;
|