flykup_model_development 3.1.66 → 3.1.68
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/shows.model.js +7 -1
- package/package.json +1 -1
package/models/shows.model.js
CHANGED
|
@@ -177,6 +177,12 @@ const showSchema = new Schema(
|
|
|
177
177
|
enum: ['created', 'live', 'cancelled', 'ended'],
|
|
178
178
|
default: 'created'
|
|
179
179
|
},
|
|
180
|
+
viewerCount: {
|
|
181
|
+
type: Number,
|
|
182
|
+
default: 0,
|
|
183
|
+
min: 0
|
|
184
|
+
},
|
|
185
|
+
|
|
180
186
|
likes: {
|
|
181
187
|
type: Number,
|
|
182
188
|
default: 0,
|
|
@@ -333,7 +339,7 @@ showSchema.pre('validate', function(next) {
|
|
|
333
339
|
next();
|
|
334
340
|
});
|
|
335
341
|
|
|
336
|
-
const Show = mongoose.models.
|
|
342
|
+
const Show = mongoose.models.shows || mongoose.model("shows", showSchema);
|
|
337
343
|
export default Show;
|
|
338
344
|
|
|
339
345
|
|