{"size": 511, "ext": "js", "max_stars_repo_path": "trivialet_backend/models/Admin.js", "max_stars_repo_name": "imsushant12/Trivialet", "max_stars_repo_stars_event_min_datetime": "2021-09-20T10:04:57.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-22T07:17:53.000Z", "max_issues_repo_path": "trivialet_backend/models/Admin.js", "max_issues_repo_name": "Adarshjain10/Trivialet", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "trivialet_backend/models/Admin.js", "max_forks_repo_name": "Adarshjain10/Trivialet", "max_forks_repo_forks_event_min_datetime": "2021-09-20T06:18:02.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-07T18:38:30.000Z"}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": 6, "avg_line_length": 21.2916666667, "max_line_length": 53, "alphanum_fraction": 0.5381604697}
const mongoose = require('mongoose')

const AdminSchema = new mongoose.Schema({
    name: {
        type: String,
        required: [true, 'Please add your name']
    },
    email: {
        type: String,
        required: [true, 'Add a email'],
        unique: true
    },
    password: {
        type: String,
        required: [true, 'Add a password'],
        minlength: 6
    },
    createdAt: {
        type: Date,
        default: Date.now,
    }
})

module.exports = mongoose.model('Admin', AdminSchema)