daShangDao_centerBook/model/request/book.go
2026-04-30 18:08:43 +08:00

112 lines
5.6 KiB
Go
Raw 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 request
// BookSearchRequest ES 搜索图书请求参数
type BookSearchRequest struct {
Page int `form:"page"` // 页码
PageSize int `form:"pageSize"` // 每页数量
PerPage int `form:"per_page"` // 每页数量 (兼容字段)
SaleSelect string `form:"saleSelect"` // 销量筛选类型
PicType string `form:"picType"` // 图片类型
ShopType string `form:"shopType"` // 店铺类型
BookName string `form:"book_name"` // 书名
BookPic string `form:"book_pic"` // 图片筛选
ISBN string `form:"isbn"` // ISBN
Author string `form:"author"` // 作者
Category string `form:"category"` // 分类
CategoryType string `form:"categoryType"` // ISBN分类类型
Publisher string `form:"publisher"` // 出版社
PublicationTime string `form:"publication_time"` // 出版时间
BindingLayout string `form:"binding_layout"` // 装帧
FixPrice string `form:"fix_price"` // 定价
IsSuit string `form:"isSuit"` // 是否套装
IsReturn string `form:"is_return"` // 是否驳回
IsFilter string `form:"is_filter"` // 过滤字段
BuyCounts string `form:"buy_counts"` // 购买次数
SellCounts string `form:"sell_counts"` // 在售数量
DaySale7 string `form:"day_sale_7"` // 7 天销量
DaySale15 string `form:"day_sale_15"` // 15 天销量
DaySale30 string `form:"day_sale_30"` // 30 天销量
DaySale60 string `form:"day_sale_60"` // 60 天销量
DaySale90 string `form:"day_sale_90"` // 90 天销量
DaySale180 string `form:"day_sale_180"` // 180 天销量
DaySale365 string `form:"day_sale_365"` // 365 天销量
ThisYearSale string `form:"this_year_sale"` // 今年销量
LastYearSale string `form:"last_year_sale"` // 去年销量
TotalSaleRange string `form:"totalSale_range"` // 总销量范围
ID string `form:"id"` // ID
PageCount string `form:"page_count"` // 页数
WordCount string `form:"word_count"` // 字数
KongfzCategories string `form:"kongfz_categories"` // 孔夫子分类列表,多个用逗号分隔
KongfzInclude int8 `form:"kongfz_include"` // 是否涵盖1-是2-否
}
// BookUpdateRequest 更新图书请求参数
type BookUpdateRequest struct {
ISBN string `json:"isbn" binding:"required"`
Data map[string]interface{} `json:"data" binding:"required"`
}
// BookDelByIsbnRequest 更新图书请求参数
type BookDelByIsbnRequest struct {
ISBN string `json:"isbn" form:"isbn" binding:"required"`
}
// BookDelByIdRequest 更新图书请求参数
type BookDelByIdRequest struct {
ID string `json:"id" form:"id" binding:"required"`
}
// BookInfo 书籍信息结构
type BookInfo struct {
Isbn string `json:"isbn"` // ISBN
BookName string `json:"book_name"` // 书名
Author string `json:"author"` // 作者
Publishing string `json:"publishing"` // 出版社
PublicationDate string `json:"publication_date"` // 出版时间
Binding string `json:"binding"` // 装帧
PagesCount int64 `json:"pages_count"` // 页数
WordsCount int64 `json:"words_count"` // 字数
Format int64 `json:"format"` // 开本
ImageObject *ImageObject `json:"image_object"` // 图片
Price int64 `json:"price"` // 售价
CatIdObject CatIdObject `json:"cat_id"` // 分类
}
// BookInfoByPsi 书籍信息结构
type BookInfoByPsi struct {
Isbn string `json:"isbn"` // ISBN
BookName string `json:"book_name"` // 书名
Author string `json:"author"` // 作者
Publishing string `json:"publishing"` // 出版社
PublicationDate string `json:"publication_date"` // 出版时间
Binding string `json:"binding"` // 装帧
PagesCount int64 `json:"pages_count"` // 页数
WordsCount int64 `json:"words_count"` // 字数
Format int64 `json:"format"` // 开本
ImageObject *ImageObject `json:"image_object"` // 图片
Price int64 `json:"price"` // 售价
CatIdObject CatIdObject `json:"cat_id"` // 分类
IsSuit int `json:"is_suit"`
}
// ImageObject 图片对象结构
type ImageObject struct {
CarouselUrlArray []string `json:"carousel_url_array"` // 轮播图
WhiteBackgroundUrl string `json:"white_background_url"` // 白底图
DetailUrlObject DetailImageObject `json:"detail_url_object"` // 详情对象
DefaultImageUrl string `json:"default_image_url"` // 默认图
}
type CatIdObject struct {
PinDuoDuoCatId string `json:"pin_duo_duo_cat_id"` // 拼多多分类 ID
KongFuZiCatId string `json:"kong_fu_zi_cat_id"` // 孔夫子分类 ID
XianYuCatId string `json:"xian_yu_cat_id"` // 闲鱼分类 ID
}
type DetailImageObject struct {
IntroductionUrl []string `json:"introduction_url"` // 简介图
CatalogueUrl []string `json:"catalogue_url"` // 目录图
LiveShootingUrl []string `json:"live_shooting_url"` // 实拍图
OtherUrl []string `json:"other_url"` // 其他图
}