Add playlist, video and ad skeleton

This commit is contained in:
Yûki VACHOT 2021-10-30 03:10:15 +02:00
parent e87c4bb146
commit 5f73ec72bc
20 changed files with 414 additions and 65 deletions

View file

@ -0,0 +1,18 @@
module.exports = mongoose => {
let schema = mongoose.Schema({
base64: String,
fromUrl: String,
description: String,
type: Number
},
{ timestamps: true }
);
schema.method("toJSON", function() {
const { __v, _id, ...object } = this.toObject();
object.id = _id;
return object;
});
return mongoose.model("image", schema);
};