package entities import ( "database/sql" "gorm.io/gorm" "time" ) type User struct { Id uint `json:"id" gorm:"primaryKey"` Nickname string `json:"secret_key"` Gender string `json:"gender"` Avatar string `json:"avatar"` Username sql.NullString `json:"username" gorm:"unique"` Email sql.NullString `json:"email" gorm:"unique"` PhoneNumber sql.NullString `json:"phone_number" gorm:"unique"` Password sql.NullString `json:"password"` Data []*UserData `json:"data,omitempty" gorm:"foreignKey:Uid;references:Id"` CreatedAt time.Time `json:"create_time"` UpdatedAt time.Time `json:"update_time"` DeletedAt gorm.DeletedAt `json:"delete_time,omitempty" gorm:"index"` }