package database import ( "time" ) 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"` Password string `gorm:"not null" json:"password"` 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"` Subscribe Subscribe `gorm:"foreignKey:SubscribeID;constraint:OnDelete:CASCADE"` }