Files
freeCodeCamp/models/Story.js

16 lines
390 B
JavaScript
Raw Normal View History

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);