forked from UKSOURCE/ipv6
Adding login admin, fix ipv6 Vienamese version, add env example
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import mongoose, { Schema, Document } from "mongoose";
|
||||
|
||||
export interface IUser extends Document {
|
||||
email: string;
|
||||
password: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
const UserSchema: Schema = new Schema(
|
||||
{
|
||||
email: { type: String, required: true, unique: true },
|
||||
password: { type: String, required: true },
|
||||
},
|
||||
{ timestamps: true }
|
||||
);
|
||||
|
||||
export default mongoose.models.User || mongoose.model<IUser>("User", UserSchema);
|
||||
Reference in New Issue
Block a user