Commit 3f4d310c authored by Balasuriya D.A.M.'s avatar Balasuriya D.A.M.

User Schema Backend

parent 166726fe
const mongoose = require("mongoose");
const userSchema = mongoose.Schema({
name: { type: String, required: true },
email: { type: String, required: true },
password: { type: String, required: true },
pic: {
type: String,
required: true,
default:
"https://icon-library.com/images/anonymous-avatar-icon/anonymous-avatar-icon-25.jpg",
},
},
{timestamps:true}
);
const User = mongoose.model("User", userSchema);
module.exports = User;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment