This commit is contained in:
Yûki VACHOT 2021-11-12 15:00:49 +01:00
parent 80b0ea401b
commit c620e19449
23 changed files with 919 additions and 0 deletions

View 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);
};