{"size": 541, "ext": "js", "max_stars_repo_path": "app/models/User/index.js", "max_stars_repo_name": "PedramMarandi/express-mvc", "max_stars_repo_stars_event_min_datetime": "2017-03-29T07:00:14.000Z", "max_stars_repo_stars_event_max_datetime": "2017-09-03T14:46:06.000Z", "max_issues_repo_path": "app/models/User/index.js", "max_issues_repo_name": "PedramMarandi/express-mvc", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/models/User/index.js", "max_forks_repo_name": "PedramMarandi/express-mvc", "max_forks_repo_forks_event_min_datetime": "2018-12-01T00:55:38.000Z", "max_forks_repo_forks_event_max_datetime": "2018-12-01T00:55:38.000Z"}
{"max_stars_count": 10, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 19.3214285714, "max_line_length": 48, "alphanum_fraction": 0.5674676525}
import mongoose, {
    Schema as schema
} from 'mongoose';
import validateUsername from './validate';
var userSchema = new schema({
    name: {
        type: String,
        require: true
    },
    lastname: {
        type: String,
        required: true
    },
    username: {
        type: String,
        validator: validateUsername,
        msg: "Your username is wrong"
    },
    age: {
        type: Number,
        default: null
    },
    password: String
});

const User = mongoose.model('User', userSchema);

export default User;