126 lines
5.2 KiB
Go
126 lines
5.2 KiB
Go
package request
|
||
|
||
// QueryAllLocationRequest 查询所有库位请求(仓库ID可选)
|
||
type QueryAllLocationRequest struct {
|
||
WarehouseID *int64 `json:"warehouse_id" form:"warehouse_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"`
|
||
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"`
|
||
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"`
|
||
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[]"`
|
||
}
|
||
type GetLocationIdRequest struct {
|
||
Code string `form:"code"`
|
||
WarehouseCode string `form:"warehouse_code"`
|
||
}
|
||
|
||
type SyncLocationRequest struct {
|
||
UserID int64 `json:"user_id" binding:"required"`
|
||
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"`
|
||
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"`
|
||
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"`
|
||
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"`
|
||
Data []SyncGoodsItem `json:"data" binding:"required"`
|
||
}
|
||
|
||
type SyncGoodsItem struct {
|
||
GoodsName string `json:"goods_name" binding:"required"`
|
||
ISBN string `json:"isbn" binding:"required"`
|
||
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"`
|
||
}
|