89 lines
5.7 KiB
Go
89 lines
5.7 KiB
Go
package request
|
|
|
|
// ProductBookRequest 创建/更新商品反射请求
|
|
type ProductBookRequest struct {
|
|
ID int64 `form:"id"` // 商品ID(更新时必填)
|
|
CategoryID int64 `form:"category_id"` // 分类ID
|
|
AboutId int64 `form:"about_id"` // 关联ID(租户ID)
|
|
WarehouseID int64 `form:"warehouse_id"` // 仓库ID
|
|
WarehouseName string `form:"warehouse_name"` // 仓库名称
|
|
LocationID int64 `form:"location_id"` // 货位ID
|
|
LocationName string `form:"location_name"` // 货位名称
|
|
StandardProductID int64 `form:"standard_product_id"` // 关联标品ID
|
|
Fid int64 `form:"fid"` // 父级ID
|
|
Type int8 `form:"type"` // 类型 1正常 2套装书 3一号多书 4无书号
|
|
ISBN string `form:"isbn" binding:"required"` // ISBN
|
|
FISBN string `form:"f_isbn"` // FISBN
|
|
BookName string `form:"book_name"` // 书名
|
|
FBookName string `form:"f_book_name"` // 副书名
|
|
Author string `form:"author"` // 作者
|
|
Publishing string `form:"publishing"` // 出版社
|
|
PublicationTime int64 `form:"publication_time"` // 出版日期时间戳
|
|
Binding string `form:"binding"` // 装帧
|
|
PagesCount int64 `form:"pages_count"` // 页数
|
|
WordsCount int64 `form:"words_count"` // 字数
|
|
Format int64 `form:"format"` // 开本
|
|
CatID string `form:"cat_id"` // 类目json字符串
|
|
Name string `form:"name"` // 商品名称
|
|
Appearance int64 `form:"appearance"` // 品相
|
|
Barcode string `form:"barcode"` // 条码
|
|
Price int64 `form:"price"` // 价格
|
|
SalePrice int64 `form:"sale_price"` // 书价
|
|
Cost int64 `form:"cost"` // 最低运费
|
|
Stock int64 `form:"stock"` // 库存
|
|
SelfID int64 `form:"self_id"` // 分库商品表中的商品ID
|
|
LiveImage []string `form:"live_image[]"` // 实拍图数组
|
|
IsBatchManaged int8 `form:"is_batch_managed"` // 是否批次管理
|
|
IsShelfLifeManaged int8 `form:"is_shelf_life_managed"` // 是否效期管理
|
|
Status int8 `form:"status"` // 状态
|
|
}
|
|
|
|
// ... existing code ...
|
|
|
|
// GetProductBookListRequest 获取商品反射列表请求
|
|
type GetProductBookListRequest struct {
|
|
Page int `form:"page"` // 页码
|
|
PageSize int `form:"page_size"` // 每页数量
|
|
ID int64 `form:"id"` // 商品ID
|
|
CategoryID int64 `form:"category_id"` // 分类ID
|
|
AboutId int64 `form:"about_id"` // 关联ID
|
|
WarehouseID int64 `form:"warehouse_id"` // 仓库ID
|
|
WarehouseName string `form:"warehouse_name"` // 仓库名称
|
|
LocationID int64 `form:"location_id"` // 货位ID
|
|
LocationName string `form:"location_name"` // 货位名称
|
|
StandardProductID int64 `form:"standard_product_id"` // 关联标品ID
|
|
Fid int64 `form:"fid"` // 父级ID
|
|
Type *int8 `form:"type"` // 类型
|
|
ISBN string `form:"isbn"` // ISBN
|
|
FISBN string `form:"f_isbn"` // FISBN
|
|
BookName string `form:"book_name"` // 书名
|
|
FBookName string `form:"f_book_name"` // 副书名
|
|
Author string `form:"author"` // 作者
|
|
Publishing string `form:"publishing"` // 出版社
|
|
PublicationTime int64 `form:"publication_time"` // 出版日期
|
|
Binding string `form:"binding"` // 装帧
|
|
PagesCount int64 `form:"pages_count"` // 页数
|
|
WordsCount int64 `form:"words_count"` // 字数
|
|
Format int64 `form:"format"` // 开本
|
|
Name string `form:"name"` // 商品名称
|
|
Appearance int64 `form:"appearance"` // 品相
|
|
Barcode string `form:"barcode"` // 条码
|
|
Price int64 `form:"price"` // 价格
|
|
SalePrice int64 `form:"sale_price"` // 书价
|
|
Cost int64 `form:"cost"` // 最低运费
|
|
Stock int64 `form:"stock"` // 库存
|
|
SelfID int64 `form:"self_id"` // 分库商品表中的商品ID
|
|
IsBatchManaged *int8 `form:"is_batch_managed"` // 批次管理
|
|
IsShelfLifeManaged *int8 `form:"is_shelf_life_managed"` // 效期管理
|
|
Status *int8 `form:"status"` // 状态
|
|
StartCreatedAt int64 `form:"start_created_at"` // 创建时间开始
|
|
EndCreatedAt int64 `form:"end_created_at"` // 创建时间结束
|
|
Keyword string `form:"keyword"` // 关键词(搜索书名/作者/ISBN)
|
|
SortByTotal string `form:"sort_by_total"` // 按售价+运费总和排序: asc/desc
|
|
}
|
|
|
|
// DeleteProductBookRequest 删除商品反射请求
|
|
type DeleteProductBookRequest struct {
|
|
ID int64 `form:"id" binding:"required"` // 商品ID
|
|
}
|