Files
freeCodeCamp/models/Story.js
2015-03-03 01:41:32 -08:00

16 lines
390 B
JavaScript

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: [] },
author: {},
comments: { type: Array, default: [] }
});
module.exports = mongoose.model('Story', storySchema);