diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-26 21:11:15 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-26 21:11:15 +0300 |
commit | 7f9df8559139cbda04c480615c4ed25f57c4bbcd (patch) | |
tree | 11cc8a1f4a5573220f47d3c1b5c3a5ee8fb72e17 /models/users | |
parent | 1fbf5ffbabc1ea2924e68c735e4d2b87643b5fc0 (diff) | |
download | which-api-7f9df8559139cbda04c480615c4ed25f57c4bbcd.tar.gz |
feat: add verified field to user schema
Diffstat (limited to 'models/users')
-rw-r--r-- | models/users/user.schema.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/models/users/user.schema.ts b/models/users/user.schema.ts index ff6cbe9..5969604 100644 --- a/models/users/user.schema.ts +++ b/models/users/user.schema.ts @@ -6,9 +6,20 @@ export interface UserSchema extends Document, Omit<User, '_id'> { } export const userSchema = new Schema({ - username: String, - password: String, + username: { + type: String, + unique: true, + required: true + }, + password: { + type: String, + required: true + }, email: String, + verified: { + type: Boolean, + default: false + }, avatarUrl: { type: String, required: false |