2024-09-04 00:52:26 +00:00
|
|
|
import mongoose from "mongoose";
|
|
|
|
|
|
|
|
const userSchema = new mongoose.Schema({
|
|
|
|
firstName: { type: String, required: true },
|
2024-09-07 05:39:50 +00:00
|
|
|
middleName: { type: String, required: true },
|
2024-09-04 00:52:26 +00:00
|
|
|
lastName: { type: String, required: true },
|
|
|
|
email: { type: String, required: true, unique: true },
|
|
|
|
password: { type: String, required: true },
|
|
|
|
tokens:[
|
|
|
|
{
|
|
|
|
token:{
|
|
|
|
type:String,
|
|
|
|
required:true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
});
|
|
|
|
|
|
|
|
export default mongoose.model("User", userSchema);
|