diff options
Diffstat (limited to 'models')
-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 |