优化 VIP 会员加载逻辑,支持无头像用户展示,增加错误处理和日志记录。更新 VIP 相关接口,确保用户状态查询和资料更新功能正常,新增 VIP 资料字段以提升用户体验。
This commit is contained in:
@@ -23,6 +23,15 @@ type User struct {
|
||||
WithdrawnEarnings *float64 `gorm:"column:withdrawn_earnings;type:decimal(10,2)" json:"withdrawnEarnings,omitempty"`
|
||||
Source *string `gorm:"column:source;size:50" json:"source,omitempty"`
|
||||
|
||||
// VIP 相关(与 next-project 线上 users 表一致)
|
||||
IsVip *bool `gorm:"column:is_vip" json:"-"`
|
||||
VipExpireDate *time.Time `gorm:"column:vip_expire_date" json:"-"`
|
||||
VipName *string `gorm:"column:vip_name;size:100" json:"-"`
|
||||
VipAvatar *string `gorm:"column:vip_avatar;size:500" json:"-"`
|
||||
VipProject *string `gorm:"column:vip_project;size:200" json:"-"`
|
||||
VipContact *string `gorm:"column:vip_contact;size:100" json:"-"`
|
||||
VipBio *string `gorm:"column:vip_bio;type:text" json:"-"`
|
||||
|
||||
// 以下为接口返回时从订单/绑定表实时计算的字段,不入库
|
||||
PurchasedSectionCount int `gorm:"-" json:"purchasedSectionCount,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user