Creazione organizza
[YouAndWeb_TwoToc] / .fr-KzWVa7 / twotoc / server / api / show / show.model.js
diff --git a/.fr-KzWVa7/twotoc/server/api/show/show.model.js b/.fr-KzWVa7/twotoc/server/api/show/show.model.js
new file mode 100755 (executable)
index 0000000..2bb15d6
--- /dev/null
@@ -0,0 +1,26 @@
+'use strict';
+
+var mongoose = require('bluebird').promisifyAll(require('mongoose'));
+var Schema = mongoose.Schema;
+
+var ShowSchema = new Schema({
+  title: String,
+  image: String,
+  description: String,
+  date: {type:Date, default: Date.now()},
+  userId: String,
+  services: Array,
+  info: String,
+  location: {
+    type: [Number],
+    index: '2d'
+  },
+  place: String,
+  categoryId: String,
+  active: Boolean
+});
+
+
+// ShowSchema.set('toObject', { virtuals: true });
+
+module.exports = mongoose.model('Show', ShowSchema);