diff --git a/backend/models/toucan.js b/backend/models/toucan.js new file mode 100644 index 0000000000000000000000000000000000000000..47d3d51758180c936acfa5e62dac35b1f559b2a3 --- /dev/null +++ b/backend/models/toucan.js @@ -0,0 +1,16 @@ +var mangoose = require("mongoose"); + +var Schema = mangoose.Schema; + +/** + * Indique ce que l'on doit trouver dans un toucan + */ +var toucanSchema = new Schema ({ + title: String, + date: Date, +}); + +// La date doit ĂȘtre unique +toucanSchema.index({date:-1},{unique: true}); + +module.exports = mangoose.model("Toucan",toucanSchema); \ No newline at end of file