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 },
|
2024-09-30 15:39:00 +00:00
|
|
|
profileImage:String,
|
|
|
|
// profileImage: { type: String, required: true, unique: true },
|
|
|
|
aboutme: { type: String, required: true, unique: true },
|
2024-10-01 12:44:18 +00:00
|
|
|
city: { type: String, required: true, unique: true },
|
|
|
|
state: { type: String, required: true, unique: true },
|
|
|
|
county: { type: String, required: true, unique: true },
|
|
|
|
zip: { type: String, required: true, unique: true },
|
2024-09-04 00:52:26 +00:00
|
|
|
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);
|