start building the schema for both the posts and comments
This commit is contained in:
20
models/Comment.js
Normal file
20
models/Comment.js
Normal 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);
|
||||
|
Reference in New Issue
Block a user