estatesfunding/ef-api/models/user.js

24 lines
697 B
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 },
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-04 00:52:26 +00:00
tokens:[
{
token:{
type:String,
required:true
}
}
],
});
export default mongoose.model("User", userSchema);