查询当前登录用户排名,
This commit is contained in:
48
api/game/v1/game.go
Normal file
48
api/game/v1/game.go
Normal file
@ -0,0 +1,48 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
type ListReq struct {
|
||||
g.Meta `path:"/game" method:"get" tags:"Game" summary:"获取游戏列表"`
|
||||
Page int `json:"page" dc:"页数"`
|
||||
Size int `json:"size" dc:"每页数量"`
|
||||
}
|
||||
|
||||
type ListRes struct {
|
||||
List interface{} `json:"list" dc:"游戏列表"`
|
||||
Total int `json:"total" dc:"总数"`
|
||||
}
|
||||
|
||||
type CreateReq struct {
|
||||
g.Meta `path:"/game" method:"post" tags:"Game" summary:"创建游戏"`
|
||||
GameID int64 `json:"gameId" v:"required#游戏ID不能为空" dc:"游戏ID"`
|
||||
GameName string `json:"gameName" v:"required#游戏名称不能为空" dc:"游戏名称"`
|
||||
GameCode string `json:"gameCode" v:"required#游戏代号不能为空" dc:"游戏代号"`
|
||||
Avatar string `json:"avatar" dc:"游戏图标"`
|
||||
}
|
||||
|
||||
type CreateRes struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
|
||||
type UpdateReq struct {
|
||||
g.Meta `path:"/game" method:"put" tags:"Game" summary:"更新游戏"`
|
||||
GameID int64 `json:"gameId" v:"required#游戏ID不能为空" dc:"游戏ID"`
|
||||
GameName string `json:"gameName" v:"required#游戏名称不能为空" dc:"游戏名称"`
|
||||
GameCode string `json:"gameCode" v:"required#游戏代号不能为空" dc:"游戏代号"`
|
||||
Avatar string `json:"avatar" dc:"游戏图标"`
|
||||
Id int64 `json:"id" v:"required#游戏ID不能为空" dc:"ID"`
|
||||
}
|
||||
|
||||
type UpdateRes struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
|
||||
type DeleteReq struct {
|
||||
g.Meta `path:"/game/{id}" method:"delete" tags:"Game" summary:"删除游戏"`
|
||||
ID int64 `json:"Id" v:"required#ID不能为空" dc:"ID"`
|
||||
}
|
||||
|
||||
type DeleteRes struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
Reference in New Issue
Block a user