aboutsummaryrefslogtreecommitdiff
path: root/models/users/user.schema.ts
blob: 9030d61fef3b32a8b31f47783dad8cfe9e96c5d4 (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';
import { User } from 'which-types';

export interface UserSchema extends Document, User {
  password: string;
}

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