flykup_model_development 3.1.60 → 3.1.62

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.
@@ -72,6 +72,29 @@ const liveFlashSaleSchema = new Schema({
72
72
  default: Date.now
73
73
  }
74
74
  });
75
+ const bundleSaleSchema = new Schema({
76
+ _id: false,
77
+ bundleSaleId: {
78
+ type: Schema.Types.ObjectId,
79
+ ref: "bundlesales",
80
+ required: true
81
+ },
82
+ bundleOwnerSellerId: {
83
+ type: Schema.Types.ObjectId,
84
+ ref: 'sellers',
85
+ required: function() {
86
+ return this.bundleSaleId != null;
87
+ }
88
+ },
89
+ bundleTitle: { type: String }, // Quick reference title
90
+ bundleMRP: { type: Number, min: 0, default: null }, // Original MRP
91
+ sellingPrice: { type: Number, min: 0, default: null }, // Actual selling price
92
+ bundleImage: { // Bundle thumbnail image
93
+ key: { type: String, default: null },
94
+ url: { type: String, default: null }
95
+ },
96
+ createdAt: { type: Date, default: Date.now }
97
+ });
75
98
 
76
99
  // Show Schema with FIXED validation
77
100
  const showSchema = new Schema(
@@ -192,6 +215,10 @@ const showSchema = new Schema(
192
215
  message: 'productOwnerSellerId is required when productId is provided'
193
216
  }
194
217
  },
218
+ bundleSales: {
219
+ type: [bundleSaleSchema],
220
+ default: []
221
+ },
195
222
 
196
223
  auctionProducts: {
197
224
  type: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flykup_model_development",
3
- "version": "3.1.60",
3
+ "version": "3.1.62",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "private": false,