Update: add default values
This commit is contained in:
parent
29673c992a
commit
eb1e73193b
1 changed files with 8 additions and 2 deletions
|
|
@ -1,9 +1,15 @@
|
||||||
module.exports = mongoose => {
|
module.exports = mongoose => {
|
||||||
let schema = mongoose.Schema({
|
let schema = mongoose.Schema({
|
||||||
userId: String,
|
userId: String,
|
||||||
videoIds: Array,
|
videoIds: {
|
||||||
|
type: Array,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
name: String,
|
name: String,
|
||||||
isActive: Boolean
|
isActive: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ timestamps: true }
|
{ timestamps: true }
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Reference in a new issue