You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
3.6 KiB

6 months ago
package request
type SearchTbGoods struct {
SpuNo string `json:"spu_no" form:"spu_no"` //编号
Title string `json:"title" form:"title"` //标题
Status int `json:"status" form:"status"` //1:在售中 2:已下架 3:已售罄
CreateBy string `json:"-"` //创建人
PageInfo
}
type CreateTbGoods struct {
CategoryId uint `json:"category_id"` //分类id
Title string `json:"title"` //商品标题
TitleEng string `json:"title_eng"` //商品标题英文
Images string `json:"images"` //商品图片
RetailPrice float64 `json:"retail_price"` //吊牌价(零售指导价)
Content string `json:"content"` //商品详情-图片
ContentText string `json:"content_text"` //商品详情-文字
Tags string `json:"tags"` //标签
Online string `json:"online"` //上下架状态 on/off
Specs []CreateTbGoodsSpec `json:"specs"` //规格
}
type TbGoodsAttributeValue struct {
AttributeId uint `json:"attribute_id"` //规格属性id
Value string `json:"value"` //
//ValueId uint `json:"value_id"` //
}
type GoodsAttributeValue struct {
AttributeId uint `json:"attribute_id"` //规格属性id
Value string `json:"value"` //
ValueId uint `json:"value_id"` //
Key string `json:"key"` //
}
type CreateTbGoodsSpec struct {
Attributes []TbGoodsAttributeValue `json:"attributes"` //规格
SkuNo string `json:"sku_no"` //商品编码
Stock int64 `json:"stock"` //库存
Price float64 `json:"price"` //价格
Image string `json:"image"` //sku图片
GoodsNo string `json:"goods_no"` //商品编号
}
type UpdateTbGoods struct {
ID uint `json:"id"`
CategoryId uint `json:"category_id"` //分类id
Title string `json:"title"` //商品标题
TitleEng string `json:"title_eng"` //商品标题英文
Images string `json:"images"` //商品图片
RetailPrice float64 `json:"retail_price"` //吊牌价(零售指导价)
Content string `json:"content"` //商品详情
ContentText string `json:"content_text"` //商品详情-文字
Tags string `json:"tags"` //标签
Online string `json:"online"` //上下架状态 on/off
Specs []UpdateTbGoodsSpec `json:"specs"` //规格
}
type UpdateTbGoodsSpec struct {
ID uint `json:"id"` //id
Attributes []TbGoodsAttributeValue `json:"attributes"` //规格
SkuNo string `json:"sku_no"` //商品编码
Stock int64 `json:"stock"` //库存
Price float64 `json:"price"` //价格
Image string `json:"image"` //sku图片
GoodsNo string `json:"goods_no"` //商品编号
}
type BatchOnline struct {
Ids []uint `json:"ids"`
Online string `json:"online"` //上下架状态 on/off
}
type UpdateSku struct {
SkuList []Sku `json:"sku_list"`
}
type Sku struct {
ID uint `json:"id"` //id
Stock int64 `json:"stock"` //库存
Price float64 `json:"price"` //价格
}
type GetSale struct {
PageInfo
Title string `json:"title" form:"title"`
}