{"size": 374, "ext": "js", "max_stars_repo_path": "models/user.js", "max_stars_repo_name": "iambelmin/nodejs-shop", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "models/user.js", "max_issues_repo_name": "iambelmin/nodejs-shop", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "models/user.js", "max_forks_repo_name": "iambelmin/nodejs-shop", "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": 28.7692307692, "max_line_length": 48, "alphanum_fraction": 0.6844919786}
var mongoose = require('mongoose');
var Schema = mongoose.Schema;

var schema = new Schema({
    username: {type:String, required: true},
    password: {type:String, required: true},
    notSuperUser: {type:Boolean, required: true}
});
schema.methods.validPassword = function( pwd ) {
    return ( this.password === pwd );
};

module.exports = mongoose.model('User', schema)