Files
epic-go/api/hero/v1/hero.go
hxt c5c273f0ab feat(hero): 新增英雄相关接口和功能
- 新增英雄信息获取接口和相关逻辑
- 实现英雄列表和详情查询功能- 添加英雄相关数据结构和VO对象
- 更新项目结构,移除不必要的文件
2025-06-21 20:12:02 +08:00

31 lines
748 B
Go

package v1
import (
"epic/internal/model/entity"
"github.com/gogf/gf/v2/frame/g"
)
type GetOneReq struct {
g.Meta `path:"/getOne" method:"get" tags:"Hero" summary:"Get one hero"`
Code string `v:"required" dc:"角色code"`
}
type GetOneRes struct {
*entity.EpicHeroInfo
}
// GetListReq GetListRes 列表返回所有角色
type GetListReq struct {
g.Meta `path:"/getList" method:"get" tags:"Hero" summary:"Get all hero"`
}
type GetListRes struct {
Records []*EpicHeroVO `json:"list"` // ✅ 返回一个数组
}
type GetDetailReq struct {
g.Meta `path:"/getDetail" method:"get" tags:"Hero" summary:"Get hero detail by code"`
Code string `v:"required" dc:"角色code"`
}
type GetDetailRes struct {
Data *HeroDetailVO `json:"data"`
}