dt_user_level.go 2.1 KB

1234567891011121314151617181920212223242526272829
  1. package daytask
  2. // DtUserLevel 用户等级表
  3. type DtUserLevel struct {
  4. Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:等级ID"`
  5. Name string `json:"name" gorm:"column:name;type:varchar(64);not null;comment:等级名称"`
  6. NameVi string `json:"nameVi" gorm:"column:name_vi;type:varchar(64);comment:等级名称(越南语)"`
  7. Icon string `json:"icon" gorm:"column:icon;type:varchar(255);comment:等级图标"`
  8. Level int `json:"level" gorm:"column:level;type:int;default:0;index:idx_level;comment:等级序号"`
  9. Price float64 `json:"price" gorm:"column:price;type:decimal(18,2);default:0.00;comment:开通价格(USDT)"`
  10. DailyTaskLimit int `json:"dailyTaskLimit" gorm:"column:daily_task_limit;type:int;default:0;comment:每日任务上限"`
  11. CommissionRate float64 `json:"commissionRate" gorm:"column:commission_rate;type:decimal(5,2);default:0.00;comment:任务佣金比例(%)"`
  12. InviteReward float64 `json:"inviteReward" gorm:"column:invite_reward;type:decimal(18,2);default:0.00;comment:邀请奖励(USDT)"`
  13. InviteCommissionRate float64 `json:"inviteCommissionRate" gorm:"column:invite_commission_rate;type:decimal(5,2);default:0.00;comment:邀请返佣比例(%)"`
  14. Description string `json:"description" gorm:"column:description;type:varchar(512);comment:等级说明"`
  15. Privileges string `json:"privileges" gorm:"column:privileges;type:json;comment:等级特权列表"`
  16. Status int8 `json:"status" gorm:"column:status;type:tinyint;default:1;comment:状态: 0=禁用 1=启用"`
  17. Sort int `json:"sort" gorm:"column:sort;type:int;default:0;comment:排序"`
  18. CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;comment:创建时间"`
  19. UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"`
  20. }
  21. func (*DtUserLevel) TableName() string {
  22. return "dt_user_level"
  23. }
  24. func NewDtUserLevel() *DtUserLevel {
  25. return &DtUserLevel{}
  26. }