65 lines
2.3 KiB
Go
65 lines
2.3 KiB
Go
package request
|
|
|
|
import common "sundynix-go/model/commom/request"
|
|
|
|
// ExchangeItemCreateReq 创建兑换商品请求
|
|
type ExchangeItemCreateReq struct {
|
|
Name string `json:"name" binding:"required"`
|
|
Description string `json:"description"`
|
|
ImageId string `json:"imageId"`
|
|
Type string `json:"type" binding:"required"` // PHYSICAL / VIRTUAL / COUPON
|
|
CostSunlight int64 `json:"costSunlight" binding:"required,min=1"`
|
|
Stock int `json:"stock"` // -1 无限
|
|
LimitPerUser int `json:"limitPerUser"` // 0 不限
|
|
Sort int `json:"sort"`
|
|
StartTime string `json:"startTime"` // 可选
|
|
EndTime string `json:"endTime"` // 可选
|
|
}
|
|
|
|
// ExchangeItemUpdateReq 更新兑换商品请求
|
|
type ExchangeItemUpdateReq struct {
|
|
Id string `json:"id" binding:"required"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
ImageId string `json:"imageId"`
|
|
Type string `json:"type"`
|
|
CostSunlight int64 `json:"costSunlight"`
|
|
Stock int `json:"stock"`
|
|
LimitPerUser int `json:"limitPerUser"`
|
|
Status int `json:"status"` // 1上架 2下架
|
|
Sort int `json:"sort"`
|
|
StartTime string `json:"startTime"`
|
|
EndTime string `json:"endTime"`
|
|
}
|
|
|
|
// ExchangeItemListReq 商品列表查询请求
|
|
type ExchangeItemListReq struct {
|
|
common.PageInfo
|
|
Type string `json:"type" form:"type"` // 按类型筛选
|
|
Status int `json:"status" form:"status"` // 按状态筛选
|
|
}
|
|
|
|
// ExchangeReq 用户兑换请求
|
|
type ExchangeReq struct {
|
|
ItemId string `json:"itemId" binding:"required"`
|
|
Quantity int `json:"quantity"` // 默认1
|
|
RecipientName string `json:"recipientName"`
|
|
Phone string `json:"phone"`
|
|
Address string `json:"address"`
|
|
}
|
|
|
|
// ExchangeOrderListReq 订单列表查询请求
|
|
type ExchangeOrderListReq struct {
|
|
common.PageInfo
|
|
Status int `json:"status" form:"status"` // 按状态筛选
|
|
UserId string `json:"userId" form:"userId"` // 管理端按用户筛选
|
|
}
|
|
|
|
// ExchangeOrderUpdateReq 更新订单状态请求 (管理端)
|
|
type ExchangeOrderUpdateReq struct {
|
|
Id string `json:"id" binding:"required"`
|
|
Status int `json:"status" binding:"required"` // 目标状态
|
|
TrackingNo string `json:"trackingNo"` // 快递单号(发货时)
|
|
Remark string `json:"remark"`
|
|
}
|