import { Schema, Document } from "mongoose"; import MainModel from "../../connect/mongoose.ts"; export interface User extends Document { userName: string; Email: string; Password: string; isArchive: boolean; visitorBrowserID: string; lastPasswordReset: number; } const AuthSchema: Schema = new Schema({ userName: { type: String, required: true, }, Email: { type: String, required: true, }, Password: { type: String, min: 8, }, isArchive: { type: Boolean, default: false }, lastPasswordReset: { type: Number }, visitorBrowserID: { type: String }, }); const AuthModel = (db: any) => { return MainModel(db, "UserAuth", AuthSchema, "UserAuth"); }; export default AuthModel;