flykup_model_development 3.0.6 → 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 +15 -1
- package/models/productListing.model.js +9 -9
- package/models/shows.model.js +15 -2
- package/package.json +1 -1
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 }
|
package/models/shows.model.js
CHANGED
|
@@ -107,6 +107,11 @@ const giveawayProductSchema = new Schema({
|
|
|
107
107
|
enum: ['preparing', 'ready', 'active', 'ended', 'failed'],
|
|
108
108
|
default: 'preparing'
|
|
109
109
|
},
|
|
110
|
+
requireAutoFollow: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: false
|
|
113
|
+
},
|
|
114
|
+
|
|
110
115
|
activatedAt: { type: Date, default: null },
|
|
111
116
|
createdAt: { type: Date, default: Date.now }
|
|
112
117
|
});
|
|
@@ -284,6 +289,13 @@ const showSchema = new Schema(
|
|
|
284
289
|
type: [giveawayProductSchema],
|
|
285
290
|
default: []
|
|
286
291
|
},
|
|
292
|
+
|
|
293
|
+
enabledProductTypes: {
|
|
294
|
+
buyNow: { type: Boolean, default: false },
|
|
295
|
+
auction: { type: Boolean, default: false },
|
|
296
|
+
giveaway: { type: Boolean, default: false }
|
|
297
|
+
}
|
|
298
|
+
,
|
|
287
299
|
notes: {
|
|
288
300
|
type: String,
|
|
289
301
|
default: ''
|
|
@@ -310,5 +322,6 @@ showSchema.pre('save', function (next) {
|
|
|
310
322
|
next();
|
|
311
323
|
});
|
|
312
324
|
|
|
313
|
-
const Show = mongoose.
|
|
314
|
-
|
|
325
|
+
const Show = mongoose.model("shows", showSchema);
|
|
326
|
+
|
|
327
|
+
export default Show;
|