Files
epic-go/api/hero/v1/hero.go
hu xiaotong 89a6cdc001 refactor(hero): 重构英雄相关接口和数据结构
- 修改 GetDetailReq 结构体,将 Code 字段改为 HeroCode
- 更新 GetDetailRes 结构体,将 Rarity 字段改为 Stars,类型从 string 改为 int
-调整 EpicHeroVO 结构体,移除 orm 标签,将 Rarity 改为 Stars- 更新相关控制器和逻辑层代码,以适应上述变更
2025-06-23 09:22:57 +08:00

29 lines
712 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:"/app-api/epic/hero/list-all" method:"get" tags:"Hero" summary:"Get all hero"`
}
type GetListRes []*EpicHeroVO
type GetDetailReq struct {
g.Meta `path:"/app-api/epic/hero/hero-detail" method:"get" tags:"Hero" summary:"Get hero detail by code"`
HeroCode string `v:"required" dc:"角色code"`
}
type GetDetailRes struct {
*HeroDetailVO
}