Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let mongoose = require('mongoose');
  2.  
  3. let UserSchema = new mongoose.Schema({
  4.     _id: mongoose.Schema.Types.ObjectId,
  5.     firstname: String,
  6.     lastname: String,
  7.     username: { type: String, required: true, index: { unique: true } },
  8.     password: { type: String},
  9.     picture: String,
  10.     lastlogin: Date,
  11.     premium: Boolean,
  12.     type: String
  13. });
  14.  
  15. mongoose.model('User',UserSchema);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement