Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const mongoose = require("mongoose");
- const passportLocalMongoose = require("passport-local-mongoose");
- var UserSchema = mongoose.Schema({
- username: String,
- password: String,
- firstname: String,
- lastname: String,
- clients: [{
- type: mongoose.Schema.Types.ObjectId,
- ref: "Client"
- }]
- });
- UserSchema.plugin(passportLocalMongoose);
- module.exports = mongoose.model("User", UserSchema);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement