Files
arenax-server/api/storeRole/v1/storeRole.go

38 lines
1.5 KiB
Go

package v1
import "github.com/gogf/gf/v2/frame/g"
type ListReq struct {
g.Meta `path:"/store/role" method:"get" tags:"StoreRole" summary:"(系统、商户门店后台)获取门店角色列表"`
StoreId int64 `json:"storeId" v:"required#门店ID不能为空" dc:"门店ID"`
Page int `json:"page" dc:"页数"`
Size int `json:"size" dc:"页大小"`
}
type ListRes struct {
List interface{} `json:"list"`
Total int `json:"total"`
}
type CreateReq struct {
g.Meta `path:"/store/role" method:"post" tags:"StoreRole" summary:"(系统、商户门店后台)创建门店角色"`
StoreId int64 `json:"storeId" v:"required#门店ID不能为空" dc:"门店ID"`
Name string `json:"name" v:"required#角色名称不能为空" dc:"角色名称"`
}
type CreateRes struct {
Id int64 `json:"id"`
}
type UpdateReq struct {
g.Meta `path:"/store/role" method:"put" tags:"StoreRole" summary:"(系统、商户门店后台)更新门店角色"`
Id int64 `json:"id" v:"required#角色ID不能为空" dc:"角色ID"`
Name string `json:"name" v:"required#角色名称不能为空" dc:"角色名称"`
}
type UpdateRes struct {
Success bool `json:"success" dc:"是否成功"`
}
type DeleteReq struct {
g.Meta `path:"/store/role/{id}" method:"delete" tags:"StoreRole" summary:"(系统、商户门店后台)删除门店角色"`
Id int64 `in:"path" json:"id" v:"required#角色ID不能为空" dc:"角色ID"`
}
type DeleteRes struct {
Success bool `json:"success" dc:"是否成功"`
}