2024-09-04 00:52:26 +00:00
|
|
|
import mongoose from "mongoose";
|
|
|
|
|
|
|
|
const userSchema = new mongoose.Schema({
|
2024-09-07 07:48:55 +00:00
|
|
|
title: {type: String, required: true },
|
2024-09-04 00:52:26 +00:00
|
|
|
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 },
|
2024-09-07 07:48:55 +00:00
|
|
|
termsconditions:{type: String,},
|
2024-09-07 11:26:52 +00:00
|
|
|
userType:{ type: String, required: true },
|
2024-09-07 13:58:47 +00:00
|
|
|
verified: { type: Boolean, default: false },
|
2024-09-08 12:30:09 +00:00
|
|
|
id: { type: String },
|
|
|
|
resetToken: { type: String },
|
|
|
|
resetTokenExpiration: { type: String },
|
2024-09-09 16:38:14 +00:00
|
|
|
userId:{type:String},
|
2024-09-04 00:52:26 +00:00
|
|
|
tokens:[
|
|
|
|
{
|
|
|
|
token:{
|
|
|
|
type:String,
|
|
|
|
required:true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
});
|
|
|
|
|
|
|
|
export default mongoose.model("User", userSchema);
|