arnaucube
arnaucube/thoughtsPublic Self-hosted repository
thoughts/models/thoughtModel.js
models/thoughtModel.jsRaw
 1var mongoose = require('mongoose'),
 2    Schema   = mongoose.Schema;
 3
 4
 5var thoughtSchema = new Schema({
 6    time: { type: String },
 7    content:   { type: String },
 8    username: { type: String },
 9    fav: { type: String }, //array amb els users que posen fav
10    avatar: { type: String }
11})
12module.exports = mongoose.model('thoughtModel', thoughtSchema);