Ajout initial des fichiers du projet
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
var mongoose = require('mongoose');
|
||||
|
||||
var QcmChoiceSchema = new mongoose.Schema({
|
||||
index: String,
|
||||
libelle: String,
|
||||
correct: Boolean
|
||||
}, {timestamps: true, toJSON: {virtuals: true}});
|
||||
|
||||
QcmChoiceSchema.methods.toJSONFor = function() {
|
||||
return {
|
||||
index: this.index,
|
||||
libelle: this.libelle,
|
||||
correct: this.correct
|
||||
};
|
||||
};
|
||||
|
||||
mongoose.model('QcmChoice', QcmChoiceSchema);
|
||||
Reference in New Issue
Block a user