Skip to content

Instantly share code, notes, and snippets.

@mirsahib
Created December 16, 2019 07:36
Show Gist options
  • Save mirsahib/5d98d96e1c4512d7319f893cf0ae8da5 to your computer and use it in GitHub Desktop.
Save mirsahib/5d98d96e1c4512d7319f893cf0ae8da5 to your computer and use it in GitHub Desktop.
const mongoose = require("mongoose");
const userSchema = mongoose.Schema({
Year: { type: Number, required: true },
Semester: { type: String, required: true },
School: { type: String, required: true },
Department: { type: String, required: true },
Major: { type: String, required: true },
Students: { type: Number, require: true }
});
module.exports = mongoose.model("Record", userSchema);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment