import { model , Schema , Document } from 'mongoose' ; import { User } from '@interfaces/users.interface' ; const userSchema = new Schema ( { email : { type : String , required : true , unique : true , } , password : { type : String , required : true , } , } ) ; const userModel = model < User & Document > ( 'User' , userSchema ) ; export default userModel ;