TwoToc code
[YouAndWeb_TwoToc] / server / api / show / show.model.js
1 'use strict';
2
3 var mongoose = require('bluebird').promisifyAll(require('mongoose'));
4 var Schema = mongoose.Schema;
5
6 var ShowSchema = new Schema({
7   title: String,
8   image: String,
9   description: String,
10   date: {type:Date, default: Date.now()},
11   userId: String,
12   services: Array,
13   info: String,
14   location: {
15     type: [Number],
16     index: '2d'
17   },
18   place: String,
19   categoryId: String,
20   active: Boolean
21 });
22
23
24 // ShowSchema.set('toObject', { virtuals: true });
25
26 module.exports = mongoose.model('Show', ShowSchema);