Get initial view working, sort out mongo mess with seed file
This commit is contained in:
@@ -2,13 +2,31 @@ var mongoose = require('mongoose');
|
||||
var secrets = require('../config/secrets');
|
||||
|
||||
var storySchema = new mongoose.Schema({
|
||||
headline: String,
|
||||
link: String,
|
||||
body: String,
|
||||
rank: { type: Number, default: -Infinity },
|
||||
upVotes: { type: Array, default: [] },
|
||||
headline: {
|
||||
type: String,
|
||||
unique: false
|
||||
},
|
||||
link: {
|
||||
type: String,
|
||||
unique: false
|
||||
},
|
||||
body: {
|
||||
type: String,
|
||||
unique: false
|
||||
},
|
||||
rank: {
|
||||
type: Number,
|
||||
default: -Infinity
|
||||
},
|
||||
upVotes: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
author: {},
|
||||
comments: { type: Array, default: [] }
|
||||
comments: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('Story', storySchema);
|
||||
|
Reference in New Issue
Block a user