Skip to content

Instantly share code, notes, and snippets.

@parthibanloganathan
Created June 4, 2020 01:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parthibanloganathan/06c711f53a07d1992b6791d0fe48b559 to your computer and use it in GitHub Desktop.
Save parthibanloganathan/06c711f53a07d1992b6791d0fe48b559 to your computer and use it in GitHub Desktop.
helpelf_user
import mongoose from "mongoose";
const Schema = mongoose.Schema;
const userSchema = new mongoose.Schema({
email: {
type: String,
unique: true,
required: true
},
firebaseUserId: {
type: String,
unique: true,
required: true
},
adminControls: {
isAdmin: {
type: Boolean,
default: false
},
spoofUserId: {
type: Schema.Types.ObjectId,
ref: "User"
}
},
});
const User = mongoose.model("User", userSchema);
export default User;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment