Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pagination ¶
type Product ¶
type Product struct { ID uint64 `json:"id" gorm:"primaryKey"` Title string `json:"title" gorm:"index;comment:标题"` // 产品标题 SubTitle string `json:"sub_title" gorm:"comment:副标题"` // 产品简介 Thumbnail string `json:"thumbnail" gorm:"comment:缩略图"` // 标题缩略图 Pictures datatypes.JSON `json:"pictures" gorm:"type:JSON;comment:产品图片"` // 产品图片 CatalogueID int `json:"catalogue_id" gorm:"comment:分类ID"` // 分类id Description string `json:"description" gorm:"comment:产品描述"` // 产品详细描述 Sort uint8 `json:"sort" gorm:"comment:产品排序"` // 顺序 Status uint `json:"status" gorm:"index;comment:产品状态0正常1下架2售罄"` // 状态 0 开启 1 下架 2 售罄 CreatedAt time.Time `json:"created_at" gorm:"comment:创建时间"` Catalogue catalogue.Catalogue `json:"catalogue"` }
type ProductListResponse ¶
type ProductListResponse struct { Pagination Result []Product `json:"result"` }
func List ¶
func List(query *ProductSearchQuery) (*ProductListResponse, error)
type ProductSearchQuery ¶
Click to show internal directories.
Click to hide internal directories.