flykup_model_development 3.0.7 → 3.0.8
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
|
@@ -168,7 +168,7 @@ const orderSchema = new mongoose.Schema(
|
|
|
168
168
|
},
|
|
169
169
|
sourceType: {
|
|
170
170
|
type: String,
|
|
171
|
-
enum: ['static', 'shoppable_video', 'livestream', 'auction'],
|
|
171
|
+
enum: ['static', 'shoppable_video', 'livestream', 'auction','flash_sale'],
|
|
172
172
|
required: true
|
|
173
173
|
},
|
|
174
174
|
sourceRefId: String,
|
|
@@ -254,6 +254,19 @@ cancelSource: {
|
|
|
254
254
|
enum: ['user', 'seller', 'system'],
|
|
255
255
|
default: 'user'
|
|
256
256
|
},
|
|
257
|
+
flashSaleItems: [{
|
|
258
|
+
productId: {
|
|
259
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
260
|
+
ref: 'productlistings'
|
|
261
|
+
},
|
|
262
|
+
flashSaleId: {
|
|
263
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
264
|
+
ref: 'FlashSale'
|
|
265
|
+
},
|
|
266
|
+
quantity: Number,
|
|
267
|
+
flashPrice: Number,
|
|
268
|
+
originalPrice: Number
|
|
269
|
+
}],
|
|
257
270
|
payment: {
|
|
258
271
|
type: mongoose.Schema.Types.ObjectId,
|
|
259
272
|
ref: 'orderPayment'
|
|
@@ -273,6 +286,7 @@ payment: {
|
|
|
273
286
|
},
|
|
274
287
|
invoiceError: String
|
|
275
288
|
},
|
|
289
|
+
|
|
276
290
|
{ timestamps: true }
|
|
277
291
|
);
|
|
278
292
|
|
|
@@ -122,15 +122,15 @@ const ProductListingSchema = new Schema(
|
|
|
122
122
|
5: { type: Number, default: 0 },
|
|
123
123
|
},
|
|
124
124
|
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
125
|
+
flashSale: {
|
|
126
|
+
isActive: { type: Boolean, default: false },
|
|
127
|
+
flashSaleId: { type: mongoose.Schema.Types.ObjectId, ref: 'FlashSale' },
|
|
128
|
+
flashPrice: { type: Number, default: null },
|
|
129
|
+
flashStock: { type: Number, default: 0 },
|
|
130
|
+
originalPrice: { type: Number, default: null },
|
|
131
|
+
endsAt: { type: Date, default: null },
|
|
132
|
+
startsAt: { type: Date, default: null }
|
|
133
|
+
},
|
|
134
134
|
totalReviews: { type: Number, default: 0 },
|
|
135
135
|
},
|
|
136
136
|
{ timestamps: true }
|