Files
2025-08-08 10:47:29 +02:00

17 lines
399 B
JavaScript

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