@lyxa.ai/core 1.0.31 → 1.0.33
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/activity-log.model.js +6 -1
- package/dist/libraries/mongo/models/activity-log.model.js.map +1 -1
- package/dist/libraries/mongo/models/brand.model.js +3 -2
- package/dist/libraries/mongo/models/brand.model.js.map +1 -1
- package/dist/libraries/mongo/models/parent.model.d.ts +1 -0
- package/dist/libraries/mongo/models/parent.model.js +18 -1
- package/dist/libraries/mongo/models/parent.model.js.map +1 -1
- package/dist/libraries/mongo/models/product.model.js +1 -1
- package/dist/libraries/mongo/models/product.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/courier-order.model.d.ts +2 -2
- package/dist/libraries/mongo/models/providers/courier-order.model.js +4 -4
- package/dist/libraries/mongo/models/providers/courier-order.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/regular-order.model.d.ts +2 -2
- package/dist/libraries/mongo/models/providers/regular-order.model.js +4 -4
- package/dist/libraries/mongo/models/providers/regular-order.model.js.map +1 -1
- package/dist/libraries/mongo/models/rider-review.model.js +6 -1
- package/dist/libraries/mongo/models/rider-review.model.js.map +1 -1
- package/dist/libraries/mongo/models/tag.model.js +2 -1
- package/dist/libraries/mongo/models/tag.model.js.map +1 -1
- package/package.json +1 -1
|
@@ -38,6 +38,11 @@ __decorate([
|
|
|
38
38
|
__metadata("design:type", Object)
|
|
39
39
|
], ActivityLog.prototype, "newDocument", void 0);
|
|
40
40
|
exports.ActivityLog = ActivityLog = __decorate([
|
|
41
|
-
(0, typegoose_1.modelOptions)({
|
|
41
|
+
(0, typegoose_1.modelOptions)({
|
|
42
|
+
schemaOptions: { collection: 'activityLogs' },
|
|
43
|
+
options: {
|
|
44
|
+
allowMixed: typegoose_1.Severity.ALLOW,
|
|
45
|
+
},
|
|
46
|
+
})
|
|
42
47
|
], ActivityLog);
|
|
43
48
|
//# sourceMappingURL=activity-log.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-log.model.js","sourceRoot":"/","sources":["libraries/mongo/models/activity-log.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"activity-log.model.js","sourceRoot":"/","sources":["libraries/mongo/models/activity-log.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmF;AACnF,4EAAqE;AACrE,kDAAuD;AACvD,+CAAsC;AAQ/B,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,2BAAU;IAEnC,KAAK,CAAc;IAGnB,YAAY,CAAgB;IAG5B,WAAW,CAAO;IAGlB,WAAW,CAAO;CACzB,CAAA;AAZY,kCAAW;AAEhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;0CACjB;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAY,EAAE,CAAC;;iDACxB;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,oBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;;gDACnC;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,oBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;;gDACnC;sBAXb,WAAW;IANvB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE;QAC7C,OAAO,EAAE;YACR,UAAU,EAAE,oBAAQ,CAAC,KAAK;SAC1B;KACD,CAAC;GACW,WAAW,CAYvB","sourcesContent":["import { modelOptions, prop, Severity, mongoose, Ref } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { UpdatedField } from '../../../utilities/enum';\r\nimport { Admin } from './admin.model';\r\n\r\n@modelOptions({\r\n\tschemaOptions: { collection: 'activityLogs' },\r\n\toptions: {\r\n\t\tallowMixed: Severity.ALLOW,\r\n\t},\r\n})\r\nexport class ActivityLog extends TimeStamps {\r\n\t@prop({ required: true, ref: () => Admin })\r\n\tpublic admin!: Ref<Admin>;\r\n\r\n\t@prop({ required: true, type: String, enum: UpdatedField })\r\n\tpublic updatedField!: UpdatedField;\r\n\r\n\t@prop({ required: true, type: mongoose.Schema.Types.Mixed })\r\n\tpublic oldDocument!: any;\r\n\r\n\t@prop({ required: true, type: mongoose.Schema.Types.Mixed })\r\n\tpublic newDocument!: any;\r\n}\r\n"]}
|
|
@@ -18,7 +18,7 @@ let Brand = class Brand extends defaultClasses_1.TimeStamps {
|
|
|
18
18
|
};
|
|
19
19
|
exports.Brand = Brand;
|
|
20
20
|
__decorate([
|
|
21
|
-
(0, typegoose_1.prop)({ required: true,
|
|
21
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
22
22
|
__metadata("design:type", String)
|
|
23
23
|
], Brand.prototype, "name", void 0);
|
|
24
24
|
__decorate([
|
|
@@ -26,6 +26,7 @@ __decorate([
|
|
|
26
26
|
__metadata("design:type", String)
|
|
27
27
|
], Brand.prototype, "description", void 0);
|
|
28
28
|
exports.Brand = Brand = __decorate([
|
|
29
|
-
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'brands' } })
|
|
29
|
+
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'brands' } }),
|
|
30
|
+
(0, typegoose_1.Index)({ name: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })
|
|
30
31
|
], Brand);
|
|
31
32
|
//# sourceMappingURL=brand.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand.model.js","sourceRoot":"/","sources":["libraries/mongo/models/brand.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"brand.model.js","sourceRoot":"/","sources":["libraries/mongo/models/brand.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiE;AACjE,4EAAqE;AAI9D,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,2BAAU;IAE7B,IAAI,CAAU;IAGd,WAAW,CAAU;CAC5B,CAAA;AANY,sBAAK;AAEV;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mCAClB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0CACK;gBALhB,KAAK;IAFjB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,CAAC;IACzD,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;GACtE,KAAK,CAMjB","sourcesContent":["import { Index, modelOptions, prop } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'brands' } })\r\n@Index({ name: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\r\nexport class Brand extends TimeStamps {\r\n\t@prop({ required: true, type: String })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic description?: string;\r\n}\r\n"]}
|
|
@@ -18,6 +18,7 @@ const charge_model_1 = require("./embedded/charge.model");
|
|
|
18
18
|
const parent_document_model_1 = require("./embedded/parent-document.model");
|
|
19
19
|
const address_model_1 = require("./shared/address.model");
|
|
20
20
|
const duration_model_1 = require("./shared/duration.model");
|
|
21
|
+
const shop_model_1 = require("./shop.model");
|
|
21
22
|
let Parent = class Parent extends defaultClasses_1.TimeStamps {
|
|
22
23
|
name;
|
|
23
24
|
email;
|
|
@@ -32,6 +33,7 @@ let Parent = class Parent extends defaultClasses_1.TimeStamps {
|
|
|
32
33
|
status;
|
|
33
34
|
profilePhoto;
|
|
34
35
|
document;
|
|
36
|
+
shopCount;
|
|
35
37
|
};
|
|
36
38
|
exports.Parent = Parent;
|
|
37
39
|
__decorate([
|
|
@@ -86,7 +88,22 @@ __decorate([
|
|
|
86
88
|
(0, typegoose_1.prop)({ required: true, type: parent_document_model_1.ParentDocument }),
|
|
87
89
|
__metadata("design:type", parent_document_model_1.ParentDocument)
|
|
88
90
|
], Parent.prototype, "document", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typegoose_1.prop)({
|
|
93
|
+
ref: () => shop_model_1.Shop,
|
|
94
|
+
foreignField: 'parent',
|
|
95
|
+
localField: '_id',
|
|
96
|
+
count: true,
|
|
97
|
+
match: { deletedAt: null },
|
|
98
|
+
}),
|
|
99
|
+
__metadata("design:type", Number)
|
|
100
|
+
], Parent.prototype, "shopCount", void 0);
|
|
89
101
|
exports.Parent = Parent = __decorate([
|
|
90
|
-
(0, typegoose_1.modelOptions)({
|
|
102
|
+
(0, typegoose_1.modelOptions)({
|
|
103
|
+
schemaOptions: { collection: 'parents', toJSON: { virtuals: true }, toObject: { virtuals: true } },
|
|
104
|
+
options: {
|
|
105
|
+
allowMixed: typegoose_1.Severity.ALLOW,
|
|
106
|
+
},
|
|
107
|
+
})
|
|
91
108
|
], Parent);
|
|
92
109
|
//# sourceMappingURL=parent.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parent.model.js","sourceRoot":"/","sources":["libraries/mongo/models/parent.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"parent.model.js","sourceRoot":"/","sources":["libraries/mongo/models/parent.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,kDAAuE;AACv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AgDlB","sourcesContent":["import { index, modelOptions, prop, Ref, Severity } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { ChargeType, ItemType, Status } from '../../../utilities/enum';\r\nimport { Admin } from './admin.model';\r\nimport { Charge } from './embedded/charge.model';\r\nimport { ParentDocument } from './embedded/parent-document.model';\r\nimport { Address } from './shared/address.model';\r\nimport { Duration } from './shared/duration.model';\r\nimport { Shop } from './shop.model';\r\n\r\n@modelOptions({\r\n\tschemaOptions: { collection: 'parents', toJSON: { virtuals: true }, toObject: { virtuals: true } },\r\n\toptions: {\r\n\t\tallowMixed: Severity.ALLOW,\r\n\t},\r\n})\r\nexport class Parent extends TimeStamps {\r\n\t@prop({ required: true, type: String, maxlength: 50 })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic email!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic phoneNumber!: string;\r\n\r\n\t@prop({ required: true, type: Address })\r\n\tpublic address!: Address;\r\n\r\n\t@prop({ required: true, type: String, enum: ChargeType, default: ChargeType.CUSTOM })\r\n\tpublic chargeType!: ChargeType;\r\n\r\n\t@prop({ required: true, type: Charge })\r\n\tpublic charge!: Charge;\r\n\r\n\t@prop({ required: true, type: Duration })\r\n\tpublic commissionDuration!: Duration;\r\n\r\n\t@prop({ required: true, type: String, enum: ItemType })\r\n\tpublic itemType!: ItemType;\r\n\r\n\t@prop({ required: true, type: Boolean, default: true })\r\n\tpublic isServiceFeeCharged!: boolean;\r\n\r\n\t@prop({ ref: () => Admin })\r\n\tpublic businessDevExecutive?: Ref<Admin>;\r\n\r\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\r\n\tpublic status?: Status;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic profilePhoto!: string;\r\n\r\n\t@prop({ required: true, type: ParentDocument })\r\n\tpublic document!: ParentDocument;\r\n\r\n\t@prop({\r\n\t\tref: () => Shop,\r\n\t\tforeignField: 'parent',\r\n\t\tlocalField: '_id',\r\n\t\tcount: true,\r\n\t\tmatch: { deletedAt: null },\r\n\t})\r\n\tpublic shopCount?: number;\r\n}\r\n"]}
|
|
@@ -85,7 +85,7 @@ __decorate([
|
|
|
85
85
|
__metadata("design:type", String)
|
|
86
86
|
], Product.prototype, "priceOption", void 0);
|
|
87
87
|
__decorate([
|
|
88
|
-
(0, typegoose_1.prop)({ required: true, type: [price_breakdown_model_1.PriceBreakdown]
|
|
88
|
+
(0, typegoose_1.prop)({ required: true, type: [price_breakdown_model_1.PriceBreakdown] }),
|
|
89
89
|
__metadata("design:type", Array)
|
|
90
90
|
], Product.prototype, "priceBreakdowns", void 0);
|
|
91
91
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.model.js","sourceRoot":"/","sources":["libraries/mongo/models/product.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,kDAAyG;AACzG,gFAAsE;AACtE,6CAAoC;AACpC,4EAAkE;AAClE,wEAA8D;AAC9D,+DAAqD;AAW9C,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,2BAAU;IAE/B,IAAI,CAAa;IAGjB,IAAI,CAAU;IAGd,OAAO,CAAU;IAGjB,YAAY,CAAqB;IAGjC,QAAQ,CAAY;IAGpB,WAAW,CAAe;IAG1B,IAAI,CAAU;IAGd,MAAM,CAAY;IAGlB,WAAW,CAAe;IAG1B,eAAe,CAAoB;IAGnC,WAAW,CAAU;IAGrB,aAAa,CAAkB;IAG/B,MAAM,CAAkB;IAGxB,iBAAiB,CAAU;IAG3B,qBAAqB,CAAU;IAG/B,oBAAoB,CAAU;IAG9B,iBAAiB,CAAU;IAG3B,UAAU,CAAsB;IAGhC,YAAY,CAAwB;IAGpC,iBAAiB,CAAU;IAG3B,cAAc,CAAW;IAGzB,aAAa,CAAU;IAGvB,eAAe,CAAW;IAG1B,kBAAkB,CAAU;IAG5B,IAAI,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CAAC,MAAM,EAAE,CAAC;;uCACtC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;6CACN;kBAhFjB,OAAO;IATnB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,CAAC;IAC3D,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;IAC3F,IAAA,iBAAK,EACL,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EACvB;QACC,MAAM,EAAE,IAAI;QACZ,uBAAuB,EAAE,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;KACjG,CACD;GACY,OAAO,CAiFnB","sourcesContent":["import { Index, modelOptions, prop, Ref } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { ProductType, ItemType, ProductDietaryType, Status, PriceOption } from '../../../utilities/enum';\r\nimport { ProductNutrition } from './embedded/product-nutrition.model';\r\nimport { Shop } from './shop.model';\r\nimport { PriceBreakdown } from './embedded/price-breakdown.model';\r\nimport { AttributeMap } from './embedded/attribute-map.model';\r\nimport { ShopCategory } from './shop-category.model';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'products' } })\r\n@Index({ name: 1, shop: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\r\n@Index(\r\n\t{ barcode: 1, shop: 1 },\r\n\t{\r\n\t\tunique: true,\r\n\t\tpartialFilterExpression: { barcode: { $exists: true, $nin: [null, '0000000'] }, deletedAt: null },\r\n\t}\r\n)\r\nexport class Product extends TimeStamps {\r\n\t@prop({ required: true, ref: () => Shop })\r\n\tpublic shop!: Ref<Shop>;\r\n\r\n\t@prop({ required: true, type: String, maxlength: 50 })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ type: String, default: '0000000' })\r\n\tpublic barcode?: string;\r\n\r\n\t@prop({ required: true, ref: () => ShopCategory })\r\n\tpublic shopCategory!: Ref<ShopCategory>;\r\n\r\n\t@prop({ required: true, type: String, enum: ItemType })\r\n\tpublic itemType!: ItemType;\r\n\r\n\t@prop({ type: String, enum: ProductType, default: ProductType.OTHER })\r\n\tpublic productType?: ProductType;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic logo!: string;\r\n\r\n\t@prop({ required: true, type: [String] })\r\n\tpublic images!: string[];\r\n\r\n\t@prop({ type: String, enum: PriceOption, default: PriceOption.SINGLE_PRICE })\r\n\tpublic priceOption?: PriceOption;\r\n\r\n\t@prop({ required: true, type: [PriceBreakdown] })\r\n\tpublic priceBreakdowns?: PriceBreakdown[];\r\n\r\n\t@prop({ type: String, maxlength: 250 })\r\n\tpublic description?: string;\r\n\r\n\t@prop({ type: [AttributeMap], default: [] })\r\n\tpublic attributeMaps?: AttributeMap[];\r\n\r\n\t@prop({ ref: () => Product, default: [] })\r\n\tpublic addons?: Ref<Product>[];\r\n\r\n\t@prop({ type: Number, min: 0 })\r\n\tpublic nutritionPackSize?: number;\r\n\r\n\t@prop({ type: String })\r\n\tpublic nutritionPackSizeUnit?: string;\r\n\r\n\t@prop({ type: Number, min: 0 })\r\n\tpublic nutritionServingSize?: number;\r\n\r\n\t@prop({ type: Number, min: 0 })\r\n\tpublic nutritionCalories?: number;\r\n\r\n\t@prop({ type: [ProductNutrition], default: [] })\r\n\tpublic nutritions?: ProductNutrition[];\r\n\r\n\t@prop({ type: [String], enum: ProductDietaryType, default: [] })\r\n\tpublic dietaryTypes?: ProductDietaryType[];\r\n\r\n\t@prop({ type: Number, max: 999999999 })\r\n\tpublic storedTemperature?: number;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isStockEnabled?: boolean;\r\n\r\n\t@prop({ type: Number })\r\n\tpublic stockQuantity?: number;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isDrinkIncluded?: boolean;\r\n\r\n\t@prop({ type: Number, default: Infinity, min: 0, max: 999999999 })\r\n\tpublic orderQuantityLimit?: number;\r\n\r\n\t@prop({ type: String })\r\n\tpublic note?: string;\r\n\r\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\r\n\tpublic status?: Status;\r\n\r\n\t@prop({ type: Number, default: 0 })\r\n\tpublic sortingOrder?: number;\r\n}\r\n"]}
|
|
@@ -16,8 +16,8 @@ export declare class CourierOrder extends Order {
|
|
|
16
16
|
status?: CourierOrderStatus;
|
|
17
17
|
statusTimeline: CourierOrderStatusTimeline[];
|
|
18
18
|
courierType: CourierServiceType;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
pickupAddress: CourierAddress;
|
|
20
|
+
deliveryAddress: CourierAddress;
|
|
21
21
|
items?: CourierItem[];
|
|
22
22
|
}
|
|
23
23
|
export {};
|
|
@@ -57,8 +57,8 @@ class CourierOrder extends order_model_1.Order {
|
|
|
57
57
|
status;
|
|
58
58
|
statusTimeline;
|
|
59
59
|
courierType;
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
pickupAddress;
|
|
61
|
+
deliveryAddress;
|
|
62
62
|
items;
|
|
63
63
|
}
|
|
64
64
|
exports.CourierOrder = CourierOrder;
|
|
@@ -77,11 +77,11 @@ __decorate([
|
|
|
77
77
|
__decorate([
|
|
78
78
|
(0, typegoose_1.prop)({ required: true, type: () => address_model_1.CourierAddress }),
|
|
79
79
|
__metadata("design:type", address_model_1.CourierAddress)
|
|
80
|
-
], CourierOrder.prototype, "
|
|
80
|
+
], CourierOrder.prototype, "pickupAddress", void 0);
|
|
81
81
|
__decorate([
|
|
82
82
|
(0, typegoose_1.prop)({ required: true, type: address_model_1.CourierAddress }),
|
|
83
83
|
__metadata("design:type", address_model_1.CourierAddress)
|
|
84
|
-
], CourierOrder.prototype, "
|
|
84
|
+
], CourierOrder.prototype, "deliveryAddress", void 0);
|
|
85
85
|
__decorate([
|
|
86
86
|
(0, typegoose_1.prop)({ type: () => [CourierItem], default: [] }),
|
|
87
87
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"courier-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/courier-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,gDAAuC;AACvC,qDAA+F;AAC/F,2DAAyD;AACzD,6EAA+E;AAE/E,MAAM,WAAW;IAEhB,WAAW,CAAS;IAGpB,YAAY,CAAU;IAGtB,QAAQ,CAAS;IAGjB,SAAS,CAAU;IAGnB,kBAAkB,CAAU;IAG5B,UAAU,CAAU;IAGpB,mBAAmB,CAAU;CAC7B;AAnBA;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACL;AAGpB;IADC,IAAA,gBAAI,GAAE;;iDACe;AAGtB;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;6CAChB;AAGjB;IADC,IAAA,gBAAI,GAAE;;8CACY;AAGnB;IADC,IAAA,gBAAI,GAAE;;uDACqB;AAG5B;IADC,IAAA,gBAAI,GAAE;;+CACa;AAGpB;IADC,IAAA,gBAAI,GAAE;;wDACsB;AAG9B,MAAa,YAAa,SAAQ,mBAAK;IAC/B,SAAS,GAAG,gBAAS,CAAC,OAAgB,CAAC;IAGvC,MAAM,CAAsB;IAG5B,cAAc,CAA+B;IAGpD,WAAW,CAAsB;IAGjC,
|
|
1
|
+
{"version":3,"file":"courier-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/courier-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,gDAAuC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,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,8BAAc,EAAE,CAAC;8BACrC,8BAAc;mDAAC;AAG/B;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,8BAAc,EAAE,CAAC;8BAC7B,8BAAc;qDAAC;AAGjC;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;2CAC3B","sourcesContent":["import { prop } from '@typegoose/typegoose';\r\nimport { Order } from '../order.model';\r\nimport { CourierOrderStatus, CourierServiceType, OrderType } from '../../../../utilities/enum';\r\nimport { CourierAddress } from '../shared/address.model';\r\nimport { CourierOrderStatusTimeline } from '../embedded/status-timeline.model';\r\n\r\nclass CourierItem {\r\n\t@prop({ required: true })\r\n\tproductName: string;\r\n\r\n\t@prop()\r\n\tproductImage?: string;\r\n\r\n\t@prop({ required: true, min: 1 })\r\n\tquantity: number;\r\n\r\n\t@prop()\r\n\tunitPrice?: number;\r\n\r\n\t@prop()\r\n\tsecondaryUnitPrice?: number;\r\n\r\n\t@prop()\r\n\ttotalPrice?: number;\r\n\r\n\t@prop()\r\n\tsecondaryTotalPrice?: number;\r\n}\r\n\r\nexport class CourierOrder extends Order {\r\n\tpublic orderType = OrderType.COURIER as const;\r\n\r\n\t@prop({ type: String, enum: CourierOrderStatus, default: CourierOrderStatus.PLACED })\r\n\tpublic status?: CourierOrderStatus;\r\n\r\n\t@prop({ type: () => [CourierOrderStatusTimeline], default: [] })\r\n\tpublic statusTimeline: CourierOrderStatusTimeline[];\r\n\r\n\t@prop({ required: true, type: String, enum: CourierServiceType })\r\n\tcourierType!: CourierServiceType;\r\n\r\n\t@prop({ required: true, type: () => CourierAddress })\r\n\tpickupAddress!: CourierAddress;\r\n\r\n\t@prop({ required: true, type: CourierAddress })\r\n\tdeliveryAddress!: CourierAddress;\r\n\r\n\t@prop({ type: () => [CourierItem], default: [] })\r\n\titems?: CourierItem[];\r\n}\r\n"]}
|
|
@@ -11,8 +11,8 @@ export declare class RegularOrder extends Order {
|
|
|
11
11
|
status?: string;
|
|
12
12
|
statusTimeline: RegularOrderStatusTimeline[];
|
|
13
13
|
itemType?: string;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
pickupAddress: Address;
|
|
15
|
+
deliveryAddress: UserAddress;
|
|
16
16
|
parent?: Ref<Parent>;
|
|
17
17
|
shop?: Ref<Shop>;
|
|
18
18
|
cart?: Ref<Cart>;
|
|
@@ -23,8 +23,8 @@ class RegularOrder extends order_model_1.Order {
|
|
|
23
23
|
status;
|
|
24
24
|
statusTimeline;
|
|
25
25
|
itemType;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
pickupAddress;
|
|
27
|
+
deliveryAddress;
|
|
28
28
|
parent;
|
|
29
29
|
shop;
|
|
30
30
|
cart;
|
|
@@ -49,11 +49,11 @@ __decorate([
|
|
|
49
49
|
__decorate([
|
|
50
50
|
(0, typegoose_1.prop)({ required: true, type: address_model_1.Address }),
|
|
51
51
|
__metadata("design:type", address_model_1.Address)
|
|
52
|
-
], RegularOrder.prototype, "
|
|
52
|
+
], RegularOrder.prototype, "pickupAddress", void 0);
|
|
53
53
|
__decorate([
|
|
54
54
|
(0, typegoose_1.prop)({ required: true, type: address_model_1.UserAddress }),
|
|
55
55
|
__metadata("design:type", address_model_1.UserAddress)
|
|
56
|
-
], RegularOrder.prototype, "
|
|
56
|
+
], RegularOrder.prototype, "deliveryAddress", void 0);
|
|
57
57
|
__decorate([
|
|
58
58
|
(0, typegoose_1.prop)({ ref: () => parent_model_1.Parent }),
|
|
59
59
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regular-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/regular-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AAC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;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,uBAAO,EAAE,CAAC;8BACzB,uBAAO;mDAAC;AAGvB;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,2BAAW,EAAE,CAAC;8BAC3B,2BAAW;qDAAC;AAG7B;IADC,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,CAAC;;4CACP;AAGrB;IADC,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;0CACT;AAGjB;IADC,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;0CACT;AAGV;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;oDACR;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;4DACI;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;wDACJ;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;iEACqB","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\r\nimport { Order } from '../order.model';\r\nimport { ItemType, OrderType, RegularOrderStatus } from '../../../../utilities/enum';\r\nimport { Parent } from '../parent.model';\r\nimport { Shop } from '../shop.model';\r\nimport { Cart } from '../cart.model';\r\nimport { Address, UserAddress } from '../shared/address.model';\r\nimport { RegularOrderStatusTimeline } from '../embedded/status-timeline.model';\r\n\r\nexport class RegularOrder extends Order {\r\n\tpublic orderType = OrderType.REGULAR as const;\r\n\r\n\t@prop({ type: String, enum: RegularOrderStatus, default: RegularOrderStatus.PLACED })\r\n\tpublic status?: string;\r\n\r\n\t@prop({ type: () => [RegularOrderStatusTimeline], default: [] })\r\n\tpublic statusTimeline: RegularOrderStatusTimeline[];\r\n\r\n\t@prop({ type: String, enum: ItemType, default: ItemType.FOOD })\r\n\titemType?: string;\r\n\r\n\t@prop({ required: true, type: Address })\r\n\tpickupAddress: Address;\r\n\r\n\t@prop({ required: true, type: UserAddress })\r\n\tdeliveryAddress: UserAddress;\r\n\r\n\t@prop({ ref: () => Parent })\r\n\tparent?: Ref<Parent>;\r\n\r\n\t@prop({ ref: () => Shop })\r\n\tshop?: Ref<Shop>;\r\n\r\n\t@prop({ ref: () => Cart })\r\n\tcart?: Ref<Cart>;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isShopDelivery?: boolean;\r\n\r\n\t@prop({ type: Number, default: 0 })\r\n\tpublic preparingTimeInMinutes?: number;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isReplacementOrder?: boolean;\r\n\r\n\t@prop({ ref: () => Order })\r\n\tpublic originalOrderForReplacement?: Ref<Order>;\r\n}\r\n"]}
|
|
@@ -22,6 +22,11 @@ __decorate([
|
|
|
22
22
|
__metadata("design:type", Object)
|
|
23
23
|
], RiderReview.prototype, "rider", void 0);
|
|
24
24
|
exports.RiderReview = RiderReview = __decorate([
|
|
25
|
-
(0, typegoose_1.modelOptions)({
|
|
25
|
+
(0, typegoose_1.modelOptions)({
|
|
26
|
+
schemaOptions: { collection: 'riderReviews' },
|
|
27
|
+
options: {
|
|
28
|
+
allowMixed: typegoose_1.Severity.ALLOW,
|
|
29
|
+
},
|
|
30
|
+
})
|
|
26
31
|
], RiderReview);
|
|
27
32
|
//# sourceMappingURL=rider-review.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rider-review.model.js","sourceRoot":"/","sources":["libraries/mongo/models/rider-review.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"rider-review.model.js","sourceRoot":"/","sources":["libraries/mongo/models/rider-review.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAyE;AACzE,gEAAsD;AACtD,+CAAsC;AAQ/B,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,8BAAU;IAEnC,KAAK,CAAc;CAC1B,CAAA;AAHY,kCAAW;AAEhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;0CACnB;sBAFd,WAAW;IANvB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE;QAC7C,OAAO,EAAE;YACR,UAAU,EAAE,oBAAQ,CAAC,KAAK;SAC1B;KACD,CAAC;GACW,WAAW,CAGvB","sourcesContent":["import { modelOptions, Severity, prop, Ref } from '@typegoose/typegoose';\r\nimport { BaseReview } from './base/base-review.model';\r\nimport { Rider } from './rider.model';\r\n\r\n@modelOptions({\r\n\tschemaOptions: { collection: 'riderReviews' },\r\n\toptions: {\r\n\t\tallowMixed: Severity.ALLOW,\r\n\t},\r\n})\r\nexport class RiderReview extends BaseReview {\r\n\t@prop({ required: true, Rider: () => Rider })\r\n\tpublic rider!: Ref<Rider>;\r\n}\r\n"]}
|
|
@@ -46,6 +46,7 @@ __decorate([
|
|
|
46
46
|
__metadata("design:type", Number)
|
|
47
47
|
], Tag.prototype, "sortingOrder", void 0);
|
|
48
48
|
exports.Tag = Tag = __decorate([
|
|
49
|
-
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'tags' } })
|
|
49
|
+
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'tags' } }),
|
|
50
|
+
(0, typegoose_1.Index)({ name: 1, itemType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })
|
|
50
51
|
], Tag);
|
|
51
52
|
//# sourceMappingURL=tag.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.model.js","sourceRoot":"/","sources":["libraries/mongo/models/tag.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"tag.model.js","sourceRoot":"/","sources":["libraries/mongo/models/tag.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiE;AACjE,kDAA2D;AAIpD,IAAM,GAAG,GAAT,MAAM,GAAG;IAER,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,QAAQ,CAAY;IAGpB,MAAM,CAAU;IAGhB,SAAS,CAAW;IAGpB,YAAY,CAAU;CAC7B,CAAA;AAlBY,kBAAG;AAER;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iCAClB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kCACD;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAQ,EAAE,CAAC;;qCAC5B;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAM,EAAE,OAAO,EAAE,aAAM,CAAC,MAAM,EAAE,CAAC;;mCACtC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;sCACZ;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;yCACN;cAjBjB,GAAG;IAFf,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC;IACvD,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;GACnF,GAAG,CAkBf","sourcesContent":["import { Index, modelOptions, prop } from '@typegoose/typegoose';\r\nimport { ItemType, Status } from '../../../utilities/enum';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'tags' } })\r\n@Index({ name: 1, itemType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\r\nexport class Tag {\r\n\t@prop({ required: true, type: String })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic image?: string;\r\n\r\n\t@prop({ required: true, type: String, enum: ItemType })\r\n\tpublic itemType?: ItemType;\r\n\r\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\r\n\tpublic status?: Status;\r\n\r\n\t@prop({ type: Boolean, default: true })\r\n\tpublic isVisible?: boolean;\r\n\r\n\t@prop({ type: Number, default: 0 })\r\n\tpublic sortingOrder?: number;\r\n}\r\n"]}
|