aboutsummaryrefslogtreecommitdiff
path: root/models/users/user.schema.ts
blob: 5292addb92c3e1ca6750b8a8d7adb861726ed9e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { Document, Schema } from "mongoose"

export interface UserSchema extends Document {
  name: string;
  avatarUrl?: string;
  age?: number;
}

export const userSchema = new Schema({
  name: String,
  avatarUrl: {
    type: String,
    required: false
  },
  age: {
    type: Number
  }
});