/
widget_structs.go
65 lines (58 loc) · 2.3 KB
/
widget_structs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright 2013 The Changkong Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package widget
const VersionNo = "20130808"
/* Widget获取到的商品信息 */
type WidgetItem struct {
AddToCart bool `json:"add_to_cart"`
ApproveStatus string `json:"approve_status"`
ClickUrl string `json:"click_url"`
IsMall bool `json:"is_mall"`
ItemId int `json:"item_id"`
ItemPics []string `json:"item_pics"`
ItemPromotionData []*PromotionInItem `json:"item_promotion_data"`
PicUrl string `json:"pic_url"`
Price string `json:"price"`
Quantity int `json:"quantity"`
SellerNick string `json:"seller_nick"`
ShopPromotionData []*PromotionInShop `json:"shop_promotion_data"`
SkuProps []*WidgetSkuProps `json:"sku_props"`
Skus []*WidgetSku `json:"skus"`
Title string `json:"title"`
}
/* 单品级优惠信息 */
type PromotionInItem struct {
Desc string `json:"desc"`
EndTime string `json:"end_time"`
ItemPromoPrice float64 `json:"item_promo_price"`
Name string `json:"name"`
OtherNeed string `json:"other_need"`
OtherSend string `json:"other_send"`
PromotionId string `json:"promotion_id"`
SkuIdList []string `json:"sku_id_list"`
SkuPriceList []float64 `json:"sku_price_list"`
StartTime string `json:"start_time"`
}
/* 店铺级优惠信息 */
type PromotionInShop struct {
Name string `json:"name"`
PromotionDetailDesc string `json:"promotion_detail_desc"`
PromotionId string `json:"promotion_id"`
}
/* Widget使用的sku属性对应信息结构体 */
type WidgetSkuProps struct {
Alias string `json:"alias"`
KeyName string `json:"key_name"`
PicUrl string `json:"pic_url"`
PropKey int `json:"prop_key"`
PropValue int `json:"prop_value"`
ValueName string `json:"value_name"`
}
/* 组件sku信息 */
type WidgetSku struct {
Price float64 `json:"price"`
Props string `json:"props"`
Quantity int `json:"quantity"`
SkuId int `json:"sku_id"`
}