Advertisement
Guest User

Untitled

a guest
Aug 7th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. const mongoose = require("mongoose");
  2. const passportLocalMongoose = require("passport-local-mongoose");
  3. var UserSchema = mongoose.Schema({
  4. username: String,
  5. password: String,
  6. firstname: String,
  7. lastname: String,
  8. clients: [{
  9. type: mongoose.Schema.Types.ObjectId,
  10. ref: "Client"
  11. }]
  12. });
  13. UserSchema.plugin(passportLocalMongoose);
  14.  
  15. module.exports = mongoose.model("User", UserSchema);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement