Files
36Wisdom/biz/model/dto/badge.go
T
2026-08-14 16:11:10 +08:00

60 lines
1.6 KiB
Go

package dto
import "github.com/gogf/gf/v2/frame/g"
// ---------- 后台管理 ----------
type AdminBadgeItem struct {
Id int64 `json:"id"`
Name string `json:"name"`
Icon string `json:"icon"`
CondType int `json:"cond_type"`
CondValue int `json:"cond_value"`
Status int `json:"status"`
}
type AdminBadgeListReq struct {
g.Meta `path:"/badge/list" method:"get" summary:"徽章列表"`
}
type AdminBadgeListRes struct {
List []*AdminBadgeItem `json:"list"`
}
type AdminBadgeCreateReq struct {
g.Meta `path:"/badge/create" method:"post" summary:"新增徽章"`
Name string `v:"required|length:1,64" json:"name"`
Icon string `json:"icon"`
CondType int `v:"required|in:1,2,3,4,5,6" json:"cond_type"`
CondValue int `v:"required|min:1" json:"cond_value"`
}
type AdminBadgeCreateRes struct {
Id int64 `json:"id"`
}
type AdminBadgeUpdateReq struct {
g.Meta `path:"/badge/update" method:"post" summary:"编辑徽章"`
Id int64 `v:"required|min:1" json:"id"`
Name string `v:"required|length:1,64" json:"name"`
Icon string `json:"icon"`
CondType int `v:"required|in:1,2,3,4,5,6" json:"cond_type"`
CondValue int `v:"required|min:1" json:"cond_value"`
}
type AdminBadgeUpdateRes struct{}
type AdminBadgeDisableReq struct {
g.Meta `path:"/badge/disable" method:"post" summary:"下架徽章"`
Id int64 `v:"required|min:1" json:"id"`
}
type AdminBadgeDisableRes struct{}
type AdminBadgeEnableReq struct {
g.Meta `path:"/badge/enable" method:"post" summary:"上架徽章"`
Id int64 `v:"required|min:1" json:"id"`
}
type AdminBadgeEnableRes struct{}