{"size": 633, "ext": "js", "max_stars_repo_path": "schemas/records.js", "max_stars_repo_name": "mbugerald/getir-challenge", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "schemas/records.js", "max_issues_repo_name": "mbugerald/getir-challenge", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "schemas/records.js", "max_forks_repo_name": "mbugerald/getir-challenge", "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": 22.6071428571, "max_line_length": 64, "alphanum_fraction": 0.5987361769}
const mongoose = require('mongoose');

// Mongoose schema reflect of the exact database structure.
//     Purpose is to retrieve and bind existing database results
//      to the given built custom mongoose schema.
const RecordsSchema = mongoose.Schema({
    driver: mongoose.ObjectId,
    counts: {
        type: Array,
        required: true,
        integer: true
    },
    createdAt: {
        type: Date,
        required: true
    },
    key: {
        type: String,
        required: true
    },
    value: {
        type: String,
        required: true
    },
});

module.exports = mongoose.model('Records', RecordsSchema);
