126 lines
7.1 KiB
Go
126 lines
7.1 KiB
Go
package request
|
||
|
||
// QueryAllLocationRequest 查询所有库位请求(仓库ID可选)
|
||
type QueryAllLocationRequest struct {
|
||
WarehouseID *int64 `json:"warehouse_id" form:"warehouse_id"` // 仓库ID
|
||
Code string `json:"code" form:"code"` // 编码
|
||
Type *int8 `json:"type" form:"type"` // 类型
|
||
Status *int8 `json:"status" form:"status"` // 状态
|
||
Page int `json:"page" form:"page,default=1"` // 页码
|
||
PageSize int `json:"page_size" form:"page_size,default=10"` // 每页数量
|
||
}
|
||
|
||
type QueryLocationRequest struct {
|
||
WarehouseID int64 `json:"warehouse_id" form:"warehouse_id" binding:"required"` // 仓库ID
|
||
Code string `json:"code" form:"code"` // 编码
|
||
Type *int8 `json:"type" form:"type"` // 类型
|
||
Status *int8 `json:"status" form:"status"` // 状态
|
||
Page int `json:"page" form:"page,default=1"` // 页码
|
||
PageSize int `json:"page_size" form:"page_size,default=10"` // 每页数量
|
||
}
|
||
|
||
type CreateLocationRequest struct {
|
||
WarehouseID int64 `form:"warehouse_id" binding:"required"` // 仓库ID
|
||
Code string `form:"code" binding:"required,max=50"` // 编码
|
||
Type int8 `form:"type" binding:"required"` // 类型
|
||
Capacity int64 `form:"capacity" binding:"required"` // 容量
|
||
Status int8 `form:"status" binding:"required"` // 状态
|
||
}
|
||
|
||
type BatchGenerateLocationRequest struct {
|
||
WarehouseID int64 `form:"warehouse_id" binding:"required"` // 仓库ID
|
||
Groups []GroupConfig `form:"groups[]"` // 分组
|
||
Type int8 `form:"type"` // 类型
|
||
Capacity int64 `form:"capacity"` // 容量
|
||
Status int8 `form:"status"` // 状态
|
||
}
|
||
|
||
type GroupConfig struct {
|
||
FormatType int `form:"format_type" binding:"required,oneof=1 2 3 4"` // 格式类型
|
||
StartValue string `form:"start_value" binding:"required"` // 起始值
|
||
EndValue string `form:"end_value" binding:"required"` // 结束值
|
||
PaddingLen int `form:"padding_len"` // 填充长度
|
||
Separator string `form:"separator" binding:"max=5"` // 分隔符
|
||
}
|
||
|
||
type UpdateLocationRequest struct {
|
||
WarehouseID int64 `form:"warehouse_id" binding:"required"` // 仓库ID
|
||
IDs []int64 `form:"ids[]"` // 库位ID
|
||
Code string `form:"code"` // 库位编码
|
||
Type *int8 `form:"type"` // 库位类型
|
||
Capacity *int64 `form:"capacity"` // 库位容量
|
||
Sort *int `form:"sort"` // 库位排序
|
||
Status *int8 `form:"status"` // 库位状态
|
||
}
|
||
|
||
type DeleteLocationRequest struct {
|
||
IDs []int64 `form:"ids[]"` // 库位ID
|
||
}
|
||
type GetLocationIdRequest struct {
|
||
Code string `form:"code"` // 库位编码
|
||
WarehouseCode string `form:"warehouse_code"` // 仓库编码
|
||
}
|
||
|
||
type SyncLocationRequest struct {
|
||
UserID int64 `json:"user_id" binding:"required"` // 用户ID
|
||
Data []SyncLocationAreaRequest `json:"data" binding:"required"` // 库位数据
|
||
}
|
||
|
||
type SyncLocationAreaRequest struct {
|
||
Code string `json:"code" binding:"required"` // 库位编码
|
||
Name string `json:"name" binding:"required"` // 库位名称
|
||
TemplateId int64 `json:"templateId" binding:"required"` // 模板ID
|
||
Status string `json:"status" binding:"required"` // 状态
|
||
Logistics SyncLogisticsRequest `json:"logistics" binding:"required"` // 物流信息
|
||
Data []SyncLocationItemRequest `json:"data" binding:"required"` // 库位数据
|
||
}
|
||
|
||
type SyncLogisticsRequest struct {
|
||
Id int64 `json:"id"` // 物流ID
|
||
TemplateName string `json:"templateName" binding:"required"` // 模板名称
|
||
DeliveryProvince string `json:"deliveryProvince" binding:"required"` // 发货省
|
||
DeliveryCity string `json:"deliveryCity" binding:"required"` // 发货市
|
||
DeliveryArea string `json:"deliveryArea" binding:"required"` // 发货区
|
||
DeliveryAddress string `json:"deliveryAddress" binding:"required"` // 发货地址
|
||
PricingMethod string `json:"pricingMethod" binding:"required"` // 计费方式
|
||
Shipping string `json:"shipping" binding:"required"` // 配送方式
|
||
FirWbv float64 `json:"firWbv"` // 首重
|
||
FirPrice float64 `json:"firPrice"` // 首费
|
||
ContinueWbv float64 `json:"continueWbv"` // 续重
|
||
ContinuePrice float64 `json:"continuePrice"` // 续费
|
||
CreateBy int64 `json:"createBy"` // 创建人
|
||
CreateTime string `json:"createTime"` // 创建时间
|
||
UpdateBy int64 `json:"updateBy"` // 更新人
|
||
UpdateTime string `json:"updateTime"` // 更新时间
|
||
Status string `json:"status"` // 状态
|
||
DelFlag string `json:"delFlag"` // 删除标记
|
||
TenantId string `json:"tenantId"` // 租户ID
|
||
CreateDept int64 `json:"createDept"` // 创建部门
|
||
ShippingRange string `json:"shippingRange"` // 配送范围
|
||
WarehouseId int64 `json:"warehouseId"` // 仓库
|
||
Remark string `json:"remark"` // 备注
|
||
PhoneNumber int64 `json:"phoneNumber"` // 手机号
|
||
Contact string `json:"contact"` // 联系人
|
||
FullAddress string `json:"fullAddress"` // 全地址
|
||
}
|
||
|
||
type SyncLocationItemRequest struct {
|
||
Code string `json:"code" binding:"required"` // 编码
|
||
SheQuantityMax int64 `json:"sheQuantityMax" binding:"required"` // 最大数量
|
||
}
|
||
|
||
type SyncGoodsRequest struct {
|
||
UserID int64 `json:"user_id" binding:"required"` // 用户ID
|
||
Data []SyncGoodsItem `json:"data" binding:"required"` // 商品数据
|
||
}
|
||
|
||
type SyncGoodsItem struct {
|
||
GoodsName string `json:"goods_name" binding:"required"` // 商品名称
|
||
ISBN string `json:"isbn" binding:"required"` // ISBN
|
||
Price int64 `json:"price" binding:"required"` // 价格
|
||
Appearance string `json:"appearance" binding:"required"` // 外观
|
||
LiveImage []string `json:"live_image" binding:"required"` // 图片
|
||
LocationCode string `json:"location_code" binding:"required"` // 库位编码
|
||
Inventory int64 `json:"inventory" binding:"required"` // 库存
|
||
}
|