dt_user_level.go 1.6 KB

12345678910111213141516171819202122232425262728293031
  1. package entity
  2. // DtUserLevel 用户等级表
  3. type DtUserLevel struct {
  4. MysqlBaseModel
  5. Name string `json:"name" gorm:"type:varchar(64);comment:等级名称"`
  6. NameVi string `json:"nameVi" gorm:"type:varchar(64);comment:等级名称(越南语)"`
  7. Icon string `json:"icon" gorm:"type:varchar(255);comment:等级图标"`
  8. Level int `json:"level" gorm:"default:0;index:idx_level;comment:等级序号"`
  9. Price float64 `json:"price" gorm:"type:decimal(18,2);default:0.00;comment:开通价格(USDT)"`
  10. DailyTaskLimit int `json:"dailyTaskLimit" gorm:"default:0;comment:每日任务上限"`
  11. CommissionRate float64 `json:"commissionRate" gorm:"type:decimal(5,2);default:0.00;comment:任务佣金比例(%)"`
  12. InviteReward float64 `json:"inviteReward" gorm:"type:decimal(18,2);default:0.00;comment:邀请奖励(USDT)"`
  13. InviteCommissionRate float64 `json:"inviteCommissionRate" gorm:"type:decimal(5,2);default:0.00;comment:邀请返佣比例(%)"`
  14. Description string `json:"description" gorm:"type:varchar(512);comment:等级说明"`
  15. Privileges string `json:"privileges" gorm:"type:json;comment:等级特权列表"`
  16. Status int8 `json:"status" gorm:"default:1;comment:状态: 0=禁用 1=启用"`
  17. Sort int `json:"sort" gorm:"default:0;comment:排序"`
  18. }
  19. func (*DtUserLevel) TableName() string {
  20. return "dt_user_level"
  21. }
  22. func (*DtUserLevel) Comment() string {
  23. return "用户等级表"
  24. }
  25. func NewDtUserLevel() *DtUserLevel {
  26. return &DtUserLevel{}
  27. }