Skip to content

Commit 4631b94

Browse files
committed
updated
1 parent e0bc54d commit 4631b94

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

models/user.model.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import (
88

99
type User struct {
1010
ID uuid.UUID `gorm:"type:uuid;default:uuid_generate_v4();primary_key"`
11-
Name string `gorm:"type:varchar(255)"`
12-
Email string `gorm:"uniqueIndex"`
13-
Password string
14-
Role string `gorm:"type:varchar(255)"`
15-
Provider string
16-
Photo string
17-
Verified bool
18-
CreatedAt time.Time
19-
UpdatedAt time.Time
11+
Name string `gorm:"type:varchar(255);not null"`
12+
Email string `gorm:"uniqueIndex;not null"`
13+
Password string `gorm:"not null"`
14+
Role string `gorm:"type:varchar(255);not null"`
15+
Provider string `gorm:"not null"`
16+
Photo string `gorm:"not null"`
17+
Verified bool `gorm:"not null"`
18+
CreatedAt time.Time `gorm:"not null"`
19+
UpdatedAt time.Time `gorm:"not null"`
2020
}
2121

2222
func (User) UsersTable() string {

0 commit comments

Comments
 (0)