fix: phone and email nullable.
This commit is contained in:
@ -8,8 +8,8 @@ import (
|
||||
type User struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
Username string `gorm:"uniqueIndex;not null" json:"username"`
|
||||
Email string `gorm:"uniqueIndex;" json:"email"`
|
||||
Phone string `gorm:"uniqueIndex;" json:"phone"`
|
||||
Email *string `gorm:"uniqueIndex;" json:"email"`
|
||||
Phone *string `gorm:"uniqueIndex;" json:"phone"`
|
||||
Password string `gorm:"not null" json:"-"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
|
||||
Reference in New Issue
Block a user