{"size": 360, "ext": "js", "max_stars_repo_path": "lib/model/user.js", "max_stars_repo_name": "pennyren/wenote", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/model/user.js", "max_issues_repo_name": "pennyren/wenote", "max_issues_repo_issues_event_min_datetime": "2015-12-27T06:35:26.000Z", "max_issues_repo_issues_event_max_datetime": "2015-12-27T06:35:26.000Z", "max_forks_repo_path": "lib/model/user.js", "max_forks_repo_name": "pennyren/wenote", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 22.5, "max_line_length": 61, "alphanum_fraction": 0.6583333333}
var mongoose = require('mongoose');
var db = require('../util/db');
var userSchema = new mongoose.Schema({
	username: {
		type: String
	},
	password: {
		type: String
	}
});
userSchema.statics.findByUsername = function (username, cb) {
	return this.model('user').findOne({
        username: username
    }, cb);
}
module.exports = db.model('user', userSchema);