var mongoose     = require('mongoose');
var Schema       = mongoose.Schema;

var RestaurantSchema   = new Schema({
    name: String,
    votes: Number
});

module.exports = mongoose.model('Restaurant', RestaurantSchema);

var mongoose     = require('mongoose');
var Schema       = mongoose.Schema;

var RestaurantSchema   = new Schema({
    name: String,
    votes: {type: Number, default: 0}
});

module.exports = mongoose.model('Restaurant', RestaurantSchema);

add default to votes in schema