initial commit
This commit is contained in:
27
server/models/User.js
Normal file
27
server/models/User.js
Normal file
@@ -0,0 +1,27 @@
|
||||
const mongoose = require("mongoose");
|
||||
const passportLocalMongoose = require("passport-local-mongoose");
|
||||
|
||||
const UserSchema = new mongoose.Schema(
|
||||
{
|
||||
googleId: String,
|
||||
username: String,
|
||||
email: String,
|
||||
password: String,
|
||||
profilePicture: String,
|
||||
resetPasswordToken: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
resetPasswordExpires: {
|
||||
type: Date,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
timestamps: true,
|
||||
}
|
||||
);
|
||||
|
||||
UserSchema.plugin(passportLocalMongoose);
|
||||
|
||||
module.exports = mongoose.model("User", UserSchema);
|
||||
Reference in New Issue
Block a user