From 351ce8b434f59292772f3754a72a08294045cc26 Mon Sep 17 00:00:00 2001
From: Damien <damien.armillon@gmail.com>
Date: Wed, 24 Apr 2019 15:28:30 +0200
Subject: [PATCH] =?UTF-8?q?sch=C3=A9ma=20de=20donn=C3=A9e=20cr=C3=A9=C3=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 backend/models/toucan.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 backend/models/toucan.js

diff --git a/backend/models/toucan.js b/backend/models/toucan.js
new file mode 100644
index 0000000..47d3d51
--- /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
-- 
GitLab