forked from BasirKhan418/Project-Studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Basir Khan
committed
Jul 19, 2023
1 parent
bcafb9a
commit 2f5109a
Showing
11 changed files
with
3,063 additions
and
162 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import mongoose from "mongoose"; | ||
const UserSchema=new mongoose.Schema({ | ||
name:{type:String,required:true}, | ||
email:{type:String,required:true,unique:true}, | ||
phone:{type:Number,required:true,unique:true}, | ||
password:{type:String,required:true}, | ||
role:{type:String,default:'user'}, | ||
bio:{type:String,default:''}, | ||
},{timestamps:true}) | ||
mongoose.models={} | ||
export default mongoose.model('User',UserSchema); |
Oops, something went wrong.