start building the schema for both the posts and comments

This commit is contained in:
Michael Q Larson
2015-03-03 00:18:52 -08:00
parent 3555c2ba4f
commit 9a143ef435
2 changed files with 43 additions and 0 deletions

20
models/Comment.js Normal file
View File

@@ -0,0 +1,20 @@
var mongoose = require('mongoose');
var secrets = require('../config/secrets');
var commentSchema = new mongoose.Schema({
rank: Number,
upVotes: [
{
upVotedBy: ObjectId,
upVotedTime: Number
}
],
author: {
username: String,
id: ObjectId,
picture: String
}
});
module.exports = mongoose.model('BonfireCompletion', bonfireCompletionSchema);