initial commit

This commit is contained in:
Harikrishnan Gopal
2024-12-03 15:53:50 +05:30
commit 956cf14c53
26 changed files with 22820 additions and 0 deletions

27
server/models/User.js Normal file
View 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);