Skip to content
Snippets Groups Projects
Commit 351ce8b4 authored by Damien's avatar Damien
Browse files

schéma de donnée créé

parent 6039428f
No related branches found
No related tags found
No related merge requests found
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment