{"size": 626, "ext": "js", "max_stars_repo_path": "app/models/poll.js", "max_stars_repo_name": "crackks/voting-app", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/models/poll.js", "max_issues_repo_name": "crackks/voting-app", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/models/poll.js", "max_forks_repo_name": "crackks/voting-app", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.0769230769, "max_line_length": 70, "alphanum_fraction": 0.6693290735}
'use strict';

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

var poll = new Schema({
    _id:String,
	info:{
	    Name:String,
	    options:[{option:Number,name:String,color:Number,nbrVote:Number},
	    		{option:Number,name:String,color:Number,nbrVote:Number},
	    		{option:Number,name:String,color:Number,nbrVote:Number},
	    		{option:Number,name:String,color:Number,nbrVote:Number}],
	    optionNbr:Number,		
	    totalVote:Number,
	    when:Number
	},
	who:{
	    made:{userName:String},
	    vote:Array
	},
	voted:Boolean
},{ versionKey: false });

module.exports = mongoose.model('poll', poll);
