实现商户注册、管理员审核商户申请接口
This commit is contained in:
37
api/store/v1/store.go
Normal file
37
api/store/v1/store.go
Normal file
@ -0,0 +1,37 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
type ListReq struct {
|
||||
g.Meta `path:"/store" method:"get" tags:"Store" summary:"(系统管理员、商户管理员)获取门店列表"`
|
||||
Page int `json:"page" dc:"页数"`
|
||||
Size int `json:"size" dc:"每页数量"`
|
||||
MerchantId int `json:"merchantId" dc:"商户ID"`
|
||||
}
|
||||
type ListRes struct {
|
||||
List interface{} `json:"list" dc:"商户列表"`
|
||||
Total int `json:"total" dc:"总数"`
|
||||
}
|
||||
type CreateReq struct {
|
||||
g.Meta `path:"/store" method:"post" tags:"Store" summary:"(商户管理员)创建门店"`
|
||||
Name string `json:"name" v:"required" dc:"门店名称"`
|
||||
ContactName string `json:"contactName" v:"required" dc:"联系人"`
|
||||
ContactPhone string `json:"contactPhone" v:"required" dc:"联系人电话"`
|
||||
}
|
||||
type CreateRes struct {
|
||||
Id int64 `json:"id" dc:"门店ID"`
|
||||
}
|
||||
type UpdateReq struct {
|
||||
g.Meta `path:"/store" method:"put" tags:"Store" summary:"(商户管理员)更新门店"`
|
||||
Id int64 `json:"id" v:"required" dc:"门店ID"`
|
||||
Name string `json:"name" v:"required" dc:"门店名称"`
|
||||
Address string `json:"address" v:"required" dc:"门店地址"`
|
||||
ContactName string `json:"contactName" v:"required" dc:"联系人"`
|
||||
ContactPhone string `json:"contactPhone" v:"required" dc:"联系人电话"`
|
||||
}
|
||||
|
||||
type UpdateRes struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
Reference in New Issue
Block a user