65 lines
1.9 KiB
Go
65 lines
1.9 KiB
Go
package dto
|
|
|
|
import "github.com/gogf/gf/v2/frame/g"
|
|
|
|
type AdminElementItem struct {
|
|
Id int64 `json:"id"`
|
|
EType int `json:"e_type"`
|
|
Name string `json:"name"`
|
|
Image string `json:"image"`
|
|
Audio string `json:"audio"`
|
|
Description string `json:"description"`
|
|
Status int `json:"status"`
|
|
SortOrder int `json:"sort_order"`
|
|
}
|
|
|
|
type AdminElementListReq struct {
|
|
g.Meta `path:"/element/list" method:"get" summary:"元素库列表"`
|
|
EType int `json:"e_type" v:"in:0,1,2,3"` // 0=全部,1=场景,2=人物,3=道具
|
|
}
|
|
|
|
type AdminElementListRes struct {
|
|
List []*AdminElementItem `json:"list"`
|
|
}
|
|
|
|
type AdminElementCreateReq struct {
|
|
g.Meta `path:"/element/create" method:"post" summary:"新增元素"`
|
|
EType int `v:"required|in:1,2,3" json:"e_type"`
|
|
Name string `v:"required|length:1,64" json:"name"`
|
|
Image string `json:"image"`
|
|
Audio string `json:"audio"`
|
|
Description string `json:"description"`
|
|
SortOrder int `json:"sort_order"`
|
|
}
|
|
|
|
type AdminElementCreateRes struct {
|
|
Id int64 `json:"id"`
|
|
}
|
|
|
|
type AdminElementUpdateReq struct {
|
|
g.Meta `path:"/element/update" method:"post" summary:"编辑元素"`
|
|
Id int64 `v:"required|min:1" json:"id"`
|
|
EType int `v:"required|in:1,2,3" json:"e_type"`
|
|
Name string `v:"required|length:1,64" json:"name"`
|
|
Image string `json:"image"`
|
|
Audio string `json:"audio"`
|
|
Description string `json:"description"`
|
|
SortOrder int `json:"sort_order"`
|
|
}
|
|
|
|
type AdminElementUpdateRes struct{}
|
|
|
|
type AdminElementDisableReq struct {
|
|
g.Meta `path:"/element/disable" method:"post" summary:"下架元素"`
|
|
Id int64 `v:"required|min:1" json:"id"`
|
|
}
|
|
|
|
type AdminElementDisableRes struct{}
|
|
|
|
type AdminElementEnableReq struct {
|
|
g.Meta `path:"/element/enable" method:"post" summary:"上架元素"`
|
|
Id int64 `v:"required|min:1" json:"id"`
|
|
}
|
|
|
|
type AdminElementEnableRes struct{}
|