start of comments view

This commit is contained in:
Nathan Leniz
2015-03-03 22:52:45 +09:00
parent 4b84b49d07
commit 968832ae52
3 changed files with 48 additions and 3 deletions

View File

@@ -2,10 +2,23 @@ var mongoose = require('mongoose');
var secrets = require('../config/secrets');
var commentSchema = new mongoose.Schema({
rank: { type: Number, default: -Infinity },
upVotes: { type: Array, default: [] },
associatedPost: {
type: String,
required: true
},
rank: {
type: Number,
default: -Infinity
},
upVotes: {
type: Array,
default: []
},
author: {},
comments: { type: Array, default: [] }
comments: {
type: Array,
default: []
}
});
module.exports = mongoose.model('Comment', commentSchema);