flykup_model_production 1.0.11 → 1.0.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
|
@@ -17,6 +17,10 @@ const orderSchema = new mongoose.Schema(
|
|
|
17
17
|
required: true,
|
|
18
18
|
index: true
|
|
19
19
|
},
|
|
20
|
+
notificationSent: {
|
|
21
|
+
orderPlaced: { type: Boolean, default: false },
|
|
22
|
+
orderConfirmed: { type: Boolean, default: false }
|
|
23
|
+
},
|
|
20
24
|
products: [{
|
|
21
25
|
productId: {
|
|
22
26
|
type: mongoose.Schema.Types.ObjectId,
|
|
@@ -80,8 +80,8 @@ const paymentSchema = new mongoose.Schema({
|
|
|
80
80
|
|
|
81
81
|
// Create indexes for better performance
|
|
82
82
|
paymentSchema.index({ razorpayOrderId: 1 });
|
|
83
|
-
paymentSchema.index({ cfOrderId: 1 });
|
|
84
|
-
paymentSchema.index({ orderId: 1 });
|
|
83
|
+
// paymentSchema.index({ cfOrderId: 1 });
|
|
84
|
+
// paymentSchema.index({ orderId: 1 });
|
|
85
85
|
|
|
86
86
|
// ❌ The pre-save middleware is no longer needed and should be removed.
|
|
87
87
|
|