19 lines
470 B
JavaScript
19 lines
470 B
JavaScript
|
import mongoose from "mongoose";
|
||
|
|
||
|
const userSchema = new mongoose.Schema({
|
||
|
firstName: { type: String, required: true },
|
||
|
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);
|