fix: unique entity
This commit is contained in:
@@ -7,9 +7,9 @@ import (
|
||||
type User struct {
|
||||
ID string `gorm:"primaryKey" json:"id"`
|
||||
SubscribeID string `gorm:"not null" json:"subscribe_id"`
|
||||
Email string `gorm:"unique,not null" json:"email"`
|
||||
Email string `gorm:"unique;not null" json:"email"`
|
||||
Password string `gorm:"not null" json:"password"`
|
||||
Phone string `gorm:"default:null" json:"phone"`
|
||||
Phone string `gorm:"default:not null;unique" json:"phone"`
|
||||
CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user