This commit is contained in:
@@ -65,6 +65,10 @@ const productVariantSchema = new Schema<IProductVariant>(
|
||||
{ timestamps: true, toObject: { virtuals: true, versionKey: false }, toJSON: { virtuals: true, versionKey: false }, id: false },
|
||||
);
|
||||
|
||||
productVariantSchema.index({ product: 1, deleted: 1 });
|
||||
productVariantSchema.index({ shop: 1, product: 1, deleted: 1 });
|
||||
productVariantSchema.index({ market_status: 1, deleted: 1 });
|
||||
|
||||
productVariantSchema.pre("save", function (next) {
|
||||
if (this.price) {
|
||||
if (this.price.retailPrice) {
|
||||
|
||||
Reference in New Issue
Block a user