Skip to content

Instantly share code, notes, and snippets.

@wildan3105
Created June 23, 2018 06:23
Show Gist options
  • Save wildan3105/61627ba0c184fa84c14d674e59aab693 to your computer and use it in GitHub Desktop.
Save wildan3105/61627ba0c184fa84c14d674e59aab693 to your computer and use it in GitHub Desktop.
MongoDB schema
var mongoose = require('mongoose')
var Schema = mongoose.Schema
var lecturerSchema = new Schema ({
name: String,
username: String,
kk: String,
kk_initial: String,
img_url: String,
oldpass: String,
newpass: String,
last_login: Date,
notif_seen: Boolean,
passwordreset_link: String,
std_limit: Number,
candidates: [],
students: [],
notifs: [],
educations: {}
})
module.exports = mongoose.model('Lecturer', lecturerSchema)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment