flykup_model_development 3.1.10 → 3.1.12
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/models/order.modal.js
CHANGED
|
@@ -48,7 +48,15 @@ const orderSchema = new mongoose.Schema(
|
|
|
48
48
|
type: String,
|
|
49
49
|
enum: ['CGST+SGST', 'IGST',"NON-GST"],
|
|
50
50
|
required: true
|
|
51
|
-
}
|
|
51
|
+
},
|
|
52
|
+
isFlashSale: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: false
|
|
55
|
+
},
|
|
56
|
+
flashPrice: {
|
|
57
|
+
type: Number,
|
|
58
|
+
default: null // Store the specific flash price used for this item
|
|
59
|
+
}
|
|
52
60
|
}],
|
|
53
61
|
totalBaseAmount: {
|
|
54
62
|
type: Number,
|
|
@@ -17,6 +17,7 @@ const ProductListingSchema = new Schema(
|
|
|
17
17
|
endsAt: { type: Date, default: null },
|
|
18
18
|
startsAt: { type: Date, default: null }
|
|
19
19
|
},
|
|
20
|
+
|
|
20
21
|
images: [
|
|
21
22
|
{
|
|
22
23
|
key: { type: String, maxLength: 255, default: null },
|
|
@@ -132,6 +133,8 @@ totalReviews: { type: Number, default: 0 }
|
|
|
132
133
|
},
|
|
133
134
|
{ timestamps: true }
|
|
134
135
|
);
|
|
136
|
+
ProductListingSchema.index({ title: 'text', description: 'text', category: 'text' });
|
|
137
|
+
|
|
135
138
|
|
|
136
139
|
// Safe export to prevent OverwriteModelError
|
|
137
140
|
const ProductListing = mongoose.models.productlistings || mongoose.model("productlistings", ProductListingSchema);
|