dt_task.go 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package entity
  2. // DtTask 任务表
  3. type DtTask struct {
  4. MysqlFullModel
  5. TaskNo string `json:"taskNo" gorm:"type:varchar(32);uniqueIndex:uk_task_no;comment:任务编号"`
  6. CategoryId int64 `json:"categoryId" gorm:"index:idx_category_id;comment:分类ID"`
  7. Title string `json:"title" gorm:"type:varchar(128);comment:任务标题"`
  8. TitleVi string `json:"titleVi" gorm:"type:varchar(128);comment:任务标题(越南语)"`
  9. Description string `json:"description" gorm:"type:text;comment:任务描述"`
  10. DescriptionVi string `json:"descriptionVi" gorm:"type:text;comment:任务描述(越南语)"`
  11. Cover string `json:"cover" gorm:"type:varchar(255);comment:封面图"`
  12. TargetUrl string `json:"targetUrl" gorm:"type:varchar(512);comment:目标链接"`
  13. TaskType int8 `json:"taskType" gorm:"default:1;comment:任务类型: 1=关注 2=点赞 3=评论 4=分享 5=观看"`
  14. RewardAmount float64 `json:"rewardAmount" gorm:"type:decimal(18,2);default:0.00;comment:任务奖励(USDT)"`
  15. TotalCount int `json:"totalCount" gorm:"default:0;comment:任务总量"`
  16. RemainCount int `json:"remainCount" gorm:"default:0;comment:剩余数量"`
  17. CompletedCount int `json:"completedCount" gorm:"default:0;comment:完成数量"`
  18. MinLevel int `json:"minLevel" gorm:"default:0;comment:最低等级要求"`
  19. DailyLimit int `json:"dailyLimit" gorm:"default:1;comment:每人每日限制"`
  20. TotalLimit int `json:"totalLimit" gorm:"default:1;comment:每人总限制"`
  21. StartTime int64 `json:"startTime" gorm:"default:0;comment:开始时间"`
  22. EndTime int64 `json:"endTime" gorm:"default:0;comment:结束时间"`
  23. RequireScreenshot int8 `json:"requireScreenshot" gorm:"default:1;comment:是否需要截图: 0=否 1=是"`
  24. AutoAudit int8 `json:"autoAudit" gorm:"default:0;comment:是否自动审核: 0=否 1=是"`
  25. AuditTimeout int `json:"auditTimeout" gorm:"default:24;comment:审核超时(小时)"`
  26. IsTop int8 `json:"isTop" gorm:"default:0;comment:是否置顶: 0=否 1=是"`
  27. IsRecommend int8 `json:"isRecommend" gorm:"default:0;comment:是否推荐: 0=否 1=是"`
  28. Status int8 `json:"status" gorm:"default:0;index:idx_status;comment:状态: 0=草稿 1=上架 2=下架 3=已结束"`
  29. Remark string `json:"remark" gorm:"type:varchar(255);comment:备注"`
  30. }
  31. func (*DtTask) TableName() string {
  32. return "dt_task"
  33. }
  34. func (*DtTask) Comment() string {
  35. return "任务表"
  36. }
  37. func NewDtTask() *DtTask {
  38. return &DtTask{}
  39. }