Files
arenax-server/api/store/v1/store.go
2025-07-12 19:05:23 +08:00

156 lines
6.4 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package v1
import (
"github.com/gogf/gf/v2/frame/g"
)
type ListReq struct {
g.Meta `path:"/store" method:"get" tags:"Backend/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:"Backend/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:"Backend/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:"是否成功"`
}
type DeleteReq struct {
g.Meta `path:"/store" method:"delete" tags:"Backend/Store" summary:"(系统、商户门店后台)删除门店"`
Id int64 `json:"id" v:"required" dc:"门店ID"`
}
type DeleteRes struct {
Success bool `json:"success" dc:"是否成功"`
}
type AddIpReq struct {
g.Meta `path:"/store/addIp" method:"post" tags:"Backend/Store" summary:"(系统、商户门店后台)添加门店IP"`
StoreId int64 `json:"storeId" v:"required" dc:"门店ID"`
Ip string `json:"ip" v:"required" dc:"IP"`
Remark string `json:"remark" dc:"备注"`
}
type AddIpRes struct {
Success bool `json:"success" dc:"是否成功"`
}
type DeleteIpReq struct {
g.Meta `path:"/store/del/{id}" method:"delete" tags:"Backend/Store" summary:"(系统、商户门店后台)删除门店IP"`
Id int64 `json:"id" v:"required" dc:"id"`
}
type DeleteIpRes struct {
Success bool `json:"success" dc:"是否成功"`
}
type UpdateIpReq struct {
g.Meta `path:"/store/updateIp" method:"put" tags:"Backend/Store" summary:"(系统、商户门店后台)更新门店IP"`
Id int64 `json:"id" v:"required" dc:"id"`
//StoreId int64 `json:"storeId" v:"required" dc:"storeId"`
Ip string `json:"ip" v:"required" dc:"IP"`
Remark string `json:"remark" dc:"备注"`
}
type UpdateIpRes struct {
Success bool `json:"success" dc:"是否成功"`
}
type GetIpListReq struct {
g.Meta `path:"/store/getIpList" method:"get" tags:"Backend/Store" summary:"(系统、商户门店后台)获取门店IP列表"`
StoreId int64 `json:"storeId" dc:"门店ID"`
Page int `json:"page" v:"required" dc:"页数"`
Size int `json:"size" v:"required" dc:"每页数量"`
}
type GetIpListRes struct {
List interface{} `json:"list" dc:"IP列表"`
Total int64 `json:"total" dc:"总数"`
}
type DetailReq struct {
g.Meta `path:"/store/detail" method:"get" tags:"Backend/Store" summary:"(系统、商户门店后台)门店详情"`
StoreId int64 `json:"storeId" v:"required" dc:"门店ID"`
}
type DetailRes struct {
Id int64 `json:"id" dc:"门店ID"`
NetbarAccount string `json:"netbarAccount" dc:"门店账号"`
}
type StoreMemberLevelReq struct {
g.Meta `path:"/store/memberLevel" method:"get" tags:"Backend/Store" summary:"(系统、商户门店后台)门店会员等级"`
StoreId int64 `json:"storeId" dc:"门店ID"`
Page int `json:"page" dc:"页数"`
Size int `json:"size" dc:"每页数量"`
}
type StoreMemberLevelRes struct {
List interface{} `json:"list"`
Total int64 `json:"total"`
}
type GetStoreAreaListReq struct {
g.Meta `path:"/store/area" method:"get" tags:"Backend/Store" summary:"(系统、商户门店后台)获取门店区域列表"`
StoreId int64 `json:"storeId" v:"required#门店ID不能为空" dc:"门店ID"`
}
type GetStoreAreaListRes struct {
List interface{} `json:"list"`
Total int `json:"total"`
}
type GetNetfeeSettingReq struct {
g.Meta `path:"/store/netfeeSetting" method:"get" tags:"Backend/Store" summary:"(系统、商户门店后台)获取门店网络费设置"`
StoreId int64 `json:"storeId" v:"required#门店ID不能为空" dc:"门店ID"`
LevelId int64 `json:"levelId" v:"required#会员等级ID不能为空" dc:"会员等级ID"`
AreaId int64 `json:"areaId" v:"required#区域ID不能为空" dc:"区域ID"`
RewardId int64 `json:"rewardId" v:"required#奖励ID不能为空" dc:"奖励ID"`
}
type GetNetfeeSettingRes struct {
Id int64 `json:"id" dc:"主键ID"` // 主键ID
StoreId int64 `json:"storeId" dc:"门店ID"` // 门店ID
RewardId int64 `json:"rewardId" dc:"奖励IDrewards表主键"` // 奖励IDrewards表主键
AreaId int64 `json:"areaId" dc:"区域ID外部系统"` // 区域ID外部系统
MemberLevelId int64 `json:"memberLevelId" dc:"会员等级ID外部系统"` // 会员等级ID外部系统
PriceData string `json:"priceData" dc:"7x24价格矩阵"` // 7x24价格矩阵
}
type SaveNetfeeSettingReq struct {
g.Meta `path:"/store/netfeeSetting" method:"post" tags:"Backend/Store" summary:"(系统、商户门店后台)保存门店网络费设置"`
StoreId int64 `json:"storeId" v:"required#门店ID不能为空" dc:"门店ID"`
LevelId int64 `json:"levelId" v:"required#会员等级ID不能为空" dc:"会员等级ID"`
AreaId int64 `json:"areaId" v:"required#区域ID不能为空" dc:"区域ID"`
RewardId int64 `json:"rewardId" v:"required#奖励ID不能为空" dc:"奖励ID"`
PriceData string `json:"priceData" v:"required#价格矩阵不能为空" dc:"价格矩阵"`
Id int64 `json:"id" dc:"id"`
}
type SaveNetfeeSettingRes struct {
Success bool `json:"success" dc:"是否成功"`
}
type GetStoreInfoByNetbarReq struct {
g.Meta `path:"/store/getStoreInfoByNetbar" method:"get" tags:"PC/Store" summary:"(用户)根据网关账号获取门店信息"`
NetbarAccount string `json:"netbarAccount" v:"required" dc:"网关账号"`
}
type GetStoreInfoByNetbarRes struct {
Store interface{} `json:"store"`
}