diff options
Diffstat (limited to 'models/users/user.schema.ts')
-rw-r--r-- | models/users/user.schema.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/models/users/user.schema.ts b/models/users/user.schema.ts index c846f81..e39f667 100644 --- a/models/users/user.schema.ts +++ b/models/users/user.schema.ts @@ -1,12 +1,14 @@ import { Document, Schema } from "mongoose" -export interface User extends Document { +export interface User { name: string; avatarUrl?: string; age?: number; } -export const UserSchema = new Schema({ +export interface UserSchema extends Document, User {} + +export const userSchema = new Schema({ name: String, avatarUrl: { type: String, |