package daytask import ( "time" ) // DtTaskCategory 任务分类表 type DtTaskCategory struct { Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:分类ID"` Name string `json:"name" gorm:"column:name;type:varchar(64);not null;comment:分类名称"` NameVi string `json:"nameVi" gorm:"column:name_vi;type:varchar(64);comment:分类名称(越南语)"` Icon string `json:"icon" gorm:"column:icon;type:varchar(255);comment:分类图标"` Platform string `json:"platform" gorm:"column:platform;type:varchar(32);comment:关联平台: tiktok/youtube/instagram/facebook"` Description string `json:"description" gorm:"column:description;type:varchar(255);comment:分类描述"` Status int8 `json:"status" gorm:"column:status;type:tinyint;default:1;comment:状态: 0=禁用 1=启用"` Sort int `json:"sort" gorm:"column:sort;type:int;default:0;comment:排序"` CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;comment:创建时间"` UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"` } func (*DtTaskCategory) TableName() string { return "dt_task_category" } func NewDtTaskCategory() *DtTaskCategory { return &DtTaskCategory{} } // DtTask 任务表 type DtTask struct { Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:任务ID"` TaskNo string `json:"taskNo" gorm:"column:task_no;type:varchar(32);not null;uniqueIndex:uk_task_no;comment:任务编号"` CategoryId int64 `json:"categoryId" gorm:"column:category_id;type:bigint;not null;index:idx_category_id;comment:分类ID"` Title string `json:"title" gorm:"column:title;type:varchar(128);not null;comment:任务标题"` TitleVi string `json:"titleVi" gorm:"column:title_vi;type:varchar(128);comment:任务标题(越南语)"` Description string `json:"description" gorm:"column:description;type:text;comment:任务描述"` DescriptionVi string `json:"descriptionVi" gorm:"column:description_vi;type:text;comment:任务描述(越南语)"` Cover string `json:"cover" gorm:"column:cover;type:varchar(255);comment:封面图"` TargetUrl string `json:"targetUrl" gorm:"column:target_url;type:varchar(512);comment:目标链接"` TaskType int8 `json:"taskType" gorm:"column:task_type;type:tinyint;default:1;comment:任务类型: 1=关注 2=点赞 3=评论 4=分享 5=观看"` RewardAmount float64 `json:"rewardAmount" gorm:"column:reward_amount;type:decimal(18,2);default:0.00;comment:任务奖励(USDT)"` TotalCount int `json:"totalCount" gorm:"column:total_count;type:int;default:0;comment:任务总量"` RemainCount int `json:"remainCount" gorm:"column:remain_count;type:int;default:0;comment:剩余数量"` CompletedCount int `json:"completedCount" gorm:"column:completed_count;type:int;default:0;comment:完成数量"` DailyLimit int `json:"dailyLimit" gorm:"column:daily_limit;type:int;default:1;comment:每人每日限制"` TotalLimit int `json:"totalLimit" gorm:"column:total_limit;type:int;default:1;comment:每人总限制"` StartTime int64 `json:"startTime" gorm:"column:start_time;type:bigint;comment:开始时间"` EndTime int64 `json:"endTime" gorm:"column:end_time;type:bigint;comment:结束时间"` RequireScreenshot int8 `json:"requireScreenshot" gorm:"column:require_screenshot;type:tinyint;default:1;comment:是否需要截图: 0=否 1=是"` AutoAudit int8 `json:"autoAudit" gorm:"column:auto_audit;type:tinyint;default:0;comment:是否自动审核: 0=否 1=是"` AuditTimeout int `json:"auditTimeout" gorm:"column:audit_timeout;type:int;default:24;comment:审核超时(小时)"` Status int8 `json:"status" gorm:"column:status;type:tinyint;default:0;index:idx_status;comment:状态: 0=草稿 1=上架 2=下架 3=已结束"` Sort int `json:"sort" gorm:"column:sort;type:int;default:0;comment:排序"` Remark string `json:"remark" gorm:"column:remark;type:varchar(255);comment:备注"` CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;index:idx_created_at;comment:创建时间"` UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"` DeletedAt *time.Time `json:"deletedAt,omitempty" gorm:"column:deleted_at;type:datetime;index;comment:删除时间"` } func (*DtTask) TableName() string { return "dt_task" } func NewDtTask() *DtTask { return &DtTask{} } // DtTaskStep 任务步骤表 type DtTaskStep struct { Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:步骤ID"` TaskId int64 `json:"taskId" gorm:"column:task_id;type:bigint;not null;index:idx_task_id;comment:任务ID"` StepNo int `json:"stepNo" gorm:"column:step_no;type:int;default:1;comment:步骤序号"` Title string `json:"title" gorm:"column:title;type:varchar(128);not null;comment:步骤标题"` TitleVi string `json:"titleVi" gorm:"column:title_vi;type:varchar(128);comment:步骤标题(越南语)"` Description string `json:"description" gorm:"column:description;type:text;comment:步骤说明"` DescriptionVi string `json:"descriptionVi" gorm:"column:description_vi;type:text;comment:步骤说明(越南语)"` Image string `json:"image" gorm:"column:image;type:varchar(255);comment:示例图片"` RequireUpload int8 `json:"requireUpload" gorm:"column:require_upload;type:tinyint;default:0;comment:是否需要上传凭证: 0=否 1=是"` Sort int `json:"sort" gorm:"column:sort;type:int;default:0;comment:排序"` CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;comment:创建时间"` UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"` } func (*DtTaskStep) TableName() string { return "dt_task_step" } func NewDtTaskStep() *DtTaskStep { return &DtTaskStep{} } // DtUserTask 用户任务记录表 type DtUserTask struct { Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:记录ID"` OrderNo string `json:"orderNo" gorm:"column:order_no;type:varchar(32);not null;uniqueIndex:uk_order_no;comment:订单编号"` UserId int64 `json:"userId" gorm:"column:user_id;type:bigint;not null;index:idx_user_id;comment:用户ID"` UserUid string `json:"userUid" gorm:"column:user_uid;type:varchar(32);comment:用户UID"` TaskId int64 `json:"taskId" gorm:"column:task_id;type:bigint;not null;index:idx_task_id;comment:任务ID"` TaskNo string `json:"taskNo" gorm:"column:task_no;type:varchar(32);comment:任务编号"` TaskTitle string `json:"taskTitle" gorm:"column:task_title;type:varchar(128);comment:任务标题"` RewardAmount float64 `json:"rewardAmount" gorm:"column:reward_amount;type:decimal(18,2);default:0.00;comment:奖励金额"` Screenshots string `json:"screenshots" gorm:"column:screenshots;type:json;comment:截图凭证列表"` SubmitTime int64 `json:"submitTime" gorm:"column:submit_time;type:bigint;comment:提交时间"` AuditTime int64 `json:"auditTime" gorm:"column:audit_time;type:bigint;comment:审核时间"` AuditAdminId int64 `json:"auditAdminId" gorm:"column:audit_admin_id;type:bigint;comment:审核管理员ID"` AuditRemark string `json:"auditRemark" gorm:"column:audit_remark;type:varchar(255);comment:审核备注"` RejectReason string `json:"rejectReason" gorm:"column:reject_reason;type:varchar(255);comment:拒绝原因"` Status int8 `json:"status" gorm:"column:status;type:tinyint;default:0;index:idx_status;comment:状态: 0=进行中 1=待审核 2=已通过 3=已拒绝 4=已取消"` CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;index:idx_created_at;comment:创建时间"` UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"` } func (*DtUserTask) TableName() string { return "dt_user_task" } func NewDtUserTask() *DtUserTask { return &DtUserTask{} }