Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/thoda-dev/nuxt3_mongoose_demo. simple startup project with nuxt3 mongoose and github or discord sso
Something went wrong. Try again.
340 B · 21 lines
TypeScript
at main
123456789101112131415161718192021import { Schema, model } from "mongoose";
interface IUser { _id: Number, name: String, email?: String,}
const UserSchema = new Schema<IUser>({ name: { type:String, required: true, }, email: { type: String, }}, { timestamps: true});
export const User = model("User", UserSchema);