64 lines
1.9 KiB
Go
64 lines
1.9 KiB
Go
package dto
|
|
|
|
import "github.com/gogf/gf/v2/frame/g"
|
|
|
|
// ---------- 后台管理 ----------
|
|
|
|
type AdminLifeTaskItem struct {
|
|
Id int64 `json:"id"`
|
|
StrategyId int64 `json:"strategy_id"`
|
|
StrategyName string `json:"strategy_name"`
|
|
Title string `json:"title"`
|
|
Description string `json:"description"`
|
|
Guide string `json:"guide"`
|
|
RewardPoints int `json:"reward_points"`
|
|
Status int `json:"status"`
|
|
}
|
|
|
|
type AdminLifeTaskListReq struct {
|
|
g.Meta `path:"/life-task/list" method:"get" summary:"生活任务列表"`
|
|
}
|
|
|
|
type AdminLifeTaskListRes struct {
|
|
List []*AdminLifeTaskItem `json:"list"`
|
|
}
|
|
|
|
type AdminLifeTaskCreateReq struct {
|
|
g.Meta `path:"/life-task/create" method:"post" summary:"新增生活任务"`
|
|
StrategyId int64 `v:"required|min:1" json:"strategy_id"`
|
|
Title string `v:"required|length:1,64" json:"title"`
|
|
Description string `json:"description"`
|
|
Guide string `json:"guide"`
|
|
RewardPoints int `v:"min:1" json:"reward_points"`
|
|
}
|
|
|
|
type AdminLifeTaskCreateRes struct {
|
|
Id int64 `json:"id"`
|
|
}
|
|
|
|
type AdminLifeTaskUpdateReq struct {
|
|
g.Meta `path:"/life-task/update" method:"post" summary:"编辑生活任务"`
|
|
Id int64 `v:"required|min:1" json:"id"`
|
|
StrategyId int64 `v:"required|min:1" json:"strategy_id"`
|
|
Title string `v:"required|length:1,64" json:"title"`
|
|
Description string `json:"description"`
|
|
Guide string `json:"guide"`
|
|
RewardPoints int `v:"min:1" json:"reward_points"`
|
|
}
|
|
|
|
type AdminLifeTaskUpdateRes struct{}
|
|
|
|
type AdminLifeTaskDisableReq struct {
|
|
g.Meta `path:"/life-task/disable" method:"post" summary:"下架生活任务"`
|
|
Id int64 `v:"required|min:1" json:"id"`
|
|
}
|
|
|
|
type AdminLifeTaskDisableRes struct{}
|
|
|
|
type AdminLifeTaskEnableReq struct {
|
|
g.Meta `path:"/life-task/enable" method:"post" summary:"上架生活任务"`
|
|
Id int64 `v:"required|min:1" json:"id"`
|
|
}
|
|
|
|
type AdminLifeTaskEnableRes struct{}
|