148 lines
5.0 KiB
Go
148 lines
5.0 KiB
Go
package dto
|
|
|
|
import "github.com/gogf/gf/v2/frame/g"
|
|
|
|
type StrategyListReq struct {
|
|
g.Meta `path:"/strategy/list" method:"get" summary:"计策列表"`
|
|
ChildId int64 `v:"required" json:"child_id"`
|
|
}
|
|
|
|
type StrategyItem struct {
|
|
StrategyId int64 `json:"strategy_id"`
|
|
Name string `json:"name"`
|
|
Pinyin string `json:"pinyin"`
|
|
GroupNo int `json:"group_no"`
|
|
GroupName string `json:"group_name"`
|
|
Meaning string `json:"meaning"`
|
|
Icon string `json:"icon"`
|
|
SortOrder int `json:"sort_order"`
|
|
Stars int `json:"stars"`
|
|
PerfectCount int `json:"perfect_count"`
|
|
TotalLevels int `json:"total_levels"`
|
|
Unlocked bool `json:"unlocked"`
|
|
UnlockReason string `json:"unlock_reason"`
|
|
}
|
|
|
|
type StrategyListRes struct {
|
|
List []StrategyItem `json:"list"`
|
|
}
|
|
|
|
type StrategyDetailReq struct {
|
|
g.Meta `path:"/strategy/detail" method:"get" summary:"计策详情"`
|
|
StrategyId int64 `v:"required" json:"strategy_id"`
|
|
ChildId int64 `v:"required" json:"child_id"`
|
|
}
|
|
|
|
type LevelBrief struct {
|
|
LevelId int64 `json:"level_id"`
|
|
Title string `json:"title"`
|
|
AgeGroup string `json:"age_group"`
|
|
SceneName string `json:"scene_name"`
|
|
Stars int `json:"stars"`
|
|
Perfect bool `json:"perfect"`
|
|
Unlocked bool `json:"unlocked"`
|
|
ContentVersion int `json:"content_version"`
|
|
ProgressVersion int `json:"progress_version"`
|
|
}
|
|
|
|
type StrategyDetailRes struct {
|
|
StrategyId int64 `json:"strategy_id"`
|
|
Name string `json:"name"`
|
|
Pinyin string `json:"pinyin"`
|
|
Meaning string `json:"meaning"`
|
|
MeaningPinyin string `json:"meaning_pinyin"`
|
|
GroupName string `json:"group_name"`
|
|
TeachContent string `json:"teach_content"`
|
|
TeachContentPinyin string `json:"teach_content_pinyin"`
|
|
TeachImage string `json:"teach_image"`
|
|
TeachAudio string `json:"teach_audio"`
|
|
SummaryQ string `json:"summary_q"`
|
|
SummaryOptions string `json:"summary_options"`
|
|
Levels []LevelBrief `json:"levels"`
|
|
}
|
|
|
|
// ---------- 后台管理 ----------
|
|
|
|
type AdminStrategyItem struct {
|
|
Id int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Pinyin string `json:"pinyin"`
|
|
GroupNo int `json:"group_no"`
|
|
GroupName string `json:"group_name"`
|
|
Meaning string `json:"meaning"`
|
|
TeachContent string `json:"teach_content"`
|
|
TeachImage string `json:"teach_image"`
|
|
TeachAudio string `json:"teach_audio"`
|
|
SummaryQ string `json:"summary_q"`
|
|
SummaryOptions string `json:"summary_options"`
|
|
SummaryAudio string `json:"summary_audio"`
|
|
Icon string `json:"icon"`
|
|
SortOrder int `json:"sort_order"`
|
|
UnlockBefore int64 `json:"unlock_before"`
|
|
Status int `json:"status"`
|
|
LevelCount int `json:"level_count"`
|
|
}
|
|
|
|
type AdminStrategyListReq struct {
|
|
g.Meta `path:"/strategy/list" method:"get" summary:"计策列表(含关卡数)"`
|
|
}
|
|
|
|
type AdminStrategyListRes struct {
|
|
List []*AdminStrategyItem `json:"list"`
|
|
}
|
|
|
|
type AdminStrategyCreateReq struct {
|
|
g.Meta `path:"/strategy/create" method:"post" summary:"新增计策"`
|
|
Name string `v:"required|length:1,32" json:"name"`
|
|
GroupNo int `v:"required|min:1|max:6" json:"group_no"`
|
|
GroupName string `json:"group_name"`
|
|
Meaning string `json:"meaning"`
|
|
TeachContent string `json:"teach_content"`
|
|
TeachImage string `json:"teach_image"`
|
|
TeachAudio string `json:"teach_audio"`
|
|
SummaryQ string `json:"summary_q"`
|
|
SummaryOptions string `json:"summary_options"`
|
|
SummaryAudio string `json:"summary_audio"`
|
|
Icon string `json:"icon"`
|
|
SortOrder int `json:"sort_order"`
|
|
UnlockBefore int64 `json:"unlock_before"`
|
|
}
|
|
|
|
type AdminStrategyCreateRes struct {
|
|
Id int64 `json:"id"`
|
|
}
|
|
|
|
type AdminStrategyUpdateReq struct {
|
|
g.Meta `path:"/strategy/update" method:"post" summary:"编辑计策"`
|
|
Id int64 `v:"required|min:1" json:"id"`
|
|
Name string `v:"required|length:1,32" json:"name"`
|
|
GroupNo int `v:"required|min:1|max:6" json:"group_no"`
|
|
GroupName string `json:"group_name"`
|
|
Meaning string `json:"meaning"`
|
|
TeachContent string `json:"teach_content"`
|
|
TeachImage string `json:"teach_image"`
|
|
TeachAudio string `json:"teach_audio"`
|
|
SummaryQ string `json:"summary_q"`
|
|
SummaryOptions string `json:"summary_options"`
|
|
SummaryAudio string `json:"summary_audio"`
|
|
Icon string `json:"icon"`
|
|
SortOrder int `json:"sort_order"`
|
|
UnlockBefore int64 `json:"unlock_before"`
|
|
}
|
|
|
|
type AdminStrategyUpdateRes struct{}
|
|
|
|
type AdminStrategyDisableReq struct {
|
|
g.Meta `path:"/strategy/disable" method:"post" summary:"下架计策"`
|
|
Id int64 `v:"required|min:1" json:"id"`
|
|
}
|
|
|
|
type AdminStrategyDisableRes struct{}
|
|
|
|
type AdminStrategyEnableReq struct {
|
|
g.Meta `path:"/strategy/enable" method:"post" summary:"上架计策"`
|
|
Id int64 `v:"required|min:1" json:"id"`
|
|
}
|
|
|
|
type AdminStrategyEnableRes struct{}
|