estatesfunding/ef-api/models/user.js

37 lines
1.1 KiB
JavaScript
Raw Normal View History

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-10-22 06:43:35 +00:00
// profileImage:String,
profileImage: { type: String},
2024-09-30 15:39:00 +00:00
// profileImage: { type: String, required: true, unique: true },
2024-10-22 06:43:35 +00:00
aboutme: { type: String},
city: { type: String },
state: { type: String},
county: { type: String},
zip: { type: String },
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
}
}
],
2024-11-05 11:31:20 +00:00
fundAmount: { type: String },
2024-09-04 00:52:26 +00:00
});
export default mongoose.model("User", userSchema);