Skip to content
Snippets Groups Projects
Commit ce7adb9a authored by Inès Yeterian's avatar Inès Yeterian
Browse files

add new ToucanD model, which final aim is to remplace the initial Toucan model

parent 68385ca8
No related branches found
No related tags found
No related merge requests found
var mongoose = require("mongoose");
var Schema = mongoose.Schema;
/**
* Indique ce que l'on doit trouver dans un toucan
*/
var toucanDSchema = new Schema ({
title: {type : String, required: true}, // Chaque toucan doit avoir un titre et une date
date: {type : Date, required: true},
issue: {type: Number, required: true},
urlId: {type: String, required: true}
});
// Le numéro doit être unique
toucanDSchema.index({issue:-1},{unique: true});
module.exports = mongoose.model("ToucanD",toucanDSchema);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment