Created
June 4, 2020 01:58
-
-
Save parthibanloganathan/06c711f53a07d1992b6791d0fe48b559 to your computer and use it in GitHub Desktop.
helpelf_user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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