chore: playground example
This commit is contained in:
16
playground/server/models/user.schema.ts
Normal file
16
playground/server/models/user.schema.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { defineMongooseModel } from '#nuxt/mongoose'
|
||||
|
||||
export const UserSchema = defineMongooseModel({
|
||||
name: 'User',
|
||||
schema: {
|
||||
name: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
},
|
||||
slug: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
unique: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user