58 lines
2.0 KiB
Go
58 lines
2.0 KiB
Go
package response
|
|
|
|
import (
|
|
"psi/es"
|
|
"psi/models"
|
|
)
|
|
|
|
// GetEsBookResponse 获取图书基础信息响应
|
|
type GetEsBookResponse struct {
|
|
Data ESBook `json:"data"`
|
|
}
|
|
|
|
// GetEsBookListResponse 获取套装书列表响应(返回多条数据)
|
|
type GetEsBookListResponse struct {
|
|
Data []ESBook `json:"data"`
|
|
}
|
|
|
|
type ESBook struct {
|
|
ID int64 `json:"id,omitempty"`
|
|
Fid int64 `json:"fid"`
|
|
BookName es.FlexibleString `json:"book_name,omitempty"`
|
|
FBookName es.FlexibleString `json:"f_book_name"`
|
|
BookPic es.BookPicObj `json:"book_pic,omitempty"`
|
|
BookPicS es.BookPicSObj `json:"book_pic_s,omitempty"`
|
|
BookPicB string `json:"book_pic_b,omitempty"`
|
|
BookDefPic es.BookDefPicObj `json:"book_def_pic,omitempty"`
|
|
ISBN string `json:"isbn,omitempty"`
|
|
FISBN string `json:"f_isbn"`
|
|
Author string `json:"author,omitempty"`
|
|
Category string `json:"category,omitempty"`
|
|
Publisher string `json:"publisher,omitempty"`
|
|
PublicationTime string `json:"publication_time,omitempty"`
|
|
BindingLayout string `json:"binding_layout,omitempty"`
|
|
FixPrice es.Float64OrString `json:"fix_price,omitempty"`
|
|
IsSuit int `json:"is_suit"`
|
|
PageCount es.NumberOrString `json:"page_count"` // 页数
|
|
WordCount es.NumberOrString `json:"word_count"` // 字数
|
|
BookFormat es.NumberOrString `json:"book_format"` // 多少开
|
|
CatId es.CatIdObject `json:"cat_id"` // 类目
|
|
}
|
|
|
|
// GuessBookInfo 存储提取结果
|
|
type GuessBookInfo struct {
|
|
BookName string
|
|
Author string
|
|
Publisher string
|
|
}
|
|
|
|
type SuitBookResponse struct {
|
|
WithFid []models.BookInfo `json:"with_fid"`
|
|
WithoutFid []models.BookInfo `json:"without_fid"`
|
|
}
|
|
|
|
type NoIsbnBookResponse struct {
|
|
Total int64 `json:"total"` // 总数
|
|
List []models.BookInfo `json:"list"` // 列表
|
|
}
|