Add playlist, video and ad skeleton
This commit is contained in:
parent
e87c4bb146
commit
5f73ec72bc
20 changed files with 414 additions and 65 deletions
16
backend/app/models/subjectTarget.model.js
Normal file
16
backend/app/models/subjectTarget.model.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
module.exports = mongoose => {
|
||||
let schema = mongoose.Schema({
|
||||
name: String,
|
||||
keywords: []
|
||||
},
|
||||
{ timestamps: true }
|
||||
);
|
||||
|
||||
schema.method("toJSON", function() {
|
||||
const { __v, _id, ...object } = this.toObject();
|
||||
object.id = _id;
|
||||
return object;
|
||||
});
|
||||
|
||||
return mongoose.model("subjectTarget", schema);
|
||||
};
|
||||
Reference in a new issue