package model import "time" // ReferralBinding 对应表 referral_bindings type ReferralBinding struct { ID string `gorm:"column:id;primaryKey;size:50"` ReferrerID string `gorm:"column:referrer_id;size:50"` RefereeID string `gorm:"column:referee_id;size:50"` ReferralCode string `gorm:"column:referral_code;size:20"` Status *string `gorm:"column:status;size:20"` BindingDate time.Time `gorm:"column:binding_date"` ExpiryDate time.Time `gorm:"column:expiry_date"` CommissionAmount *float64 `gorm:"column:commission_amount;type:decimal(10,2)"` CreatedAt time.Time `gorm:"column:created_at"` UpdatedAt time.Time `gorm:"column:updated_at"` } func (ReferralBinding) TableName() string { return "referral_bindings" }