Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mongoose = require('mongoose');
- var pollsSchema = new mongoose.Schema({
- question: String,
- responses: [{
- responseText: String,
- votes: {
- type: Number,
- default: 0
- },
- updated_at: {
- type: Date,
- default: Date.now
- }
- }]
- });
- module.exports = mongoose.model('Polls', pollsSchema);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement