We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parente0bc54d commit4631b94Copy full SHA for 4631b94
models/user.model.go
@@ -8,15 +8,15 @@ import (
8
9
typeUserstruct {
10
ID uuid.UUID`gorm:"type:uuid;default:uuid_generate_v4();primary_key"`
11
-Namestring`gorm:"type:varchar(255)"`
12
-Emailstring`gorm:"uniqueIndex"`
13
-Passwordstring
14
-Rolestring`gorm:"type:varchar(255)"`
15
-Providerstring
16
-Photostring
17
-Verifiedbool
18
-CreatedAt time.Time
19
-UpdatedAt time.Time
+Namestring`gorm:"type:varchar(255);not null"`
+Emailstring`gorm:"uniqueIndex;not null"`
+Passwordstring`gorm:"not null"`
+Rolestring`gorm:"type:varchar(255);not null"`
+Providerstring`gorm:"not null"`
+Photostring`gorm:"not null"`
+Verifiedbool`gorm:"not null"`
+CreatedAt time.Time`gorm:"not null"`
+UpdatedAt time.Time`gorm:"not null"`
20
}
21
22
func (User)UsersTable()string {