product_create.go 1.3 KB

123456789101112131415161718192021222324252627282930
  1. package http_model
  2. type CreateProductPhoto struct {
  3. PhotoUrl string `json:"photo_url"` // 图片或视频url
  4. Symbol int `json:"symbol"` // 图片为主图或详情图标志位,1为主图,2为详情图,3为视频
  5. }
  6. type CreateProductRequest struct {
  7. ProductName string `json:"product_name"` // 商品名称
  8. ProductType int `json:"product_type"` // 商品类型
  9. ShopAddress string `json:"shop_address"` // 店铺地址,商品类型为线下品牌时需填写
  10. ProductPrice int64 `json:"product_price"` // 商品价值
  11. ProductPhotos []CreateProductPhoto `json:"product_photos"` // 商品图片列表
  12. ProductUrl string `json:"product_url"` // 商品链接,可为电商网址、公司官网、大众点评的店铺地址等可以说明商品信息或者品牌信息的线上地址;
  13. EnterpriseID int `json:"enterprise_id"` // 所属企业id
  14. BrandName string `json:"brand_name"`
  15. }
  16. type CreateProductData struct {
  17. ProductID int `json:"product_id"` // 商品id
  18. }
  19. func NewCreateProductRequest() *CreateProductRequest {
  20. return new(CreateProductRequest)
  21. }
  22. func NewCreateProductResponse() *CommonResponse {
  23. resp := new(CommonResponse)
  24. resp.Data = new(CreateProductData)
  25. return resp
  26. }