package v1 import ( "server/internal/model" "github.com/gogf/gf/v2/frame/g" ) // ================== 任务接口 ================== type ListReq struct { g.Meta `path:"/task" tags:"Backend/Task" method:"get" summary:"任务列表"` Page int `json:"page"` Size int `json:"size"` Title string `json:"title" dc:"任务标题(模糊搜索)"` Status int `json:"status" dc:"状态:1启用,2禁用"` } type ListRes struct { Total int `json:"total"` List []model.Task `json:"list"` } type AddReq struct { g.Meta `path:"/task" tags:"Backend/Task" method:"post" summary:"新增任务"` TaskType uint `json:"taskType"` Title string `json:"title"` Description string `json:"description"` RewardPoints uint `json:"rewardPoints"` Status int `json:"status"` } type AddRes struct { Success bool `json:"success"` } type EditReq struct { g.Meta `path:"/task" tags:"Backend/Task" method:"put" summary:"编辑任务"` Id int64 `json:"id"` TaskType uint `json:"taskType"` Title string `json:"title"` Description string `json:"description"` RewardPoints uint `json:"rewardPoints"` Status int `json:"status"` } type EditRes struct { Success bool `json:"success"` } type DelReq struct { g.Meta `path:"/task" tags:"Backend/Task" method:"delete" summary:"删除任务"` Id int64 `json:"id"` } type DelRes struct { Success bool `json:"success"` } // ================== App端任务接口 ================== type AppListReq struct { g.Meta `path:"/task/appList" tags:"APP/Task" method:"get" summary:"App端任务列表"` } type AppListRes struct { List []model.TaskSimpleItem `json:"list"` }