-
Notifications
You must be signed in to change notification settings - Fork 2
/
shop_core_info_model.go
149 lines (130 loc) · 4.57 KB
/
shop_core_info_model.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
package model_public
import "time"
type ShopCore struct {
Description string `json:"description"`
Domain string `json:"domain"`
ShopID int `json:"shopID,string"`
Name string `json:"name"`
TagLine string `json:"tagLine"`
DefaultSort int `json:"defaultSort"`
Typename string `json:"__typename"`
}
type CreateInfo struct {
OpenSince string `json:"openSince,omitempty"`
EpochShopCreated string `json:"epochShopCreated,omitempty"`
Typename string `json:"__typename"`
}
func (cre *CreateInfo) ToTime() (time.Time, error) {
return time.Parse("January 2006", cre.OpenSince)
}
type FavoriteData struct {
TotalFavorite int `json:"totalFavorite"`
AlreadyFavorited int `json:"alreadyFavorited"`
Typename string `json:"__typename"`
}
type ShopAssets struct {
Avatar string `json:"avatar"`
Cover string `json:"cover,omitempty"`
Typename string `json:"__typename"`
}
type ShipmentInfo struct {
IsAvailable int `json:"isAvailable"`
Image string `json:"image"`
Name string `json:"name"`
Product []ShipmentInfoProduct `json:"product"`
Typename string `json:"__typename"`
}
type ShippingLoc struct {
DistrictName string `json:"districtName"`
CityName string `json:"cityName"`
Typename string `json:"__typename"`
}
type ShopStats struct {
ProductSold string `json:"productSold"`
TotalTxSuccess string `json:"totalTxSuccess"`
TotalShowcase string `json:"totalShowcase"`
Typename string `json:"__typename"`
}
type StatusInfo struct {
ShopStatus int `json:"shopStatus"`
StatusMessage string `json:"statusMessage"`
StatusTitle string `json:"statusTitle,omitempty"`
TickerType string `json:"tickerType,omitempty"`
IsIdle bool `json:"isIdle,omitempty"`
Typename string `json:"__typename"`
}
type ClosedInfoDetail struct {
OpenDate string `json:"openDate,omitempty"`
Status int `json:"status,omitempty"`
Typename string `json:"__typename"`
}
type ClosedInfo struct {
ClosedNote string `json:"closedNote"`
Until string `json:"until,omitempty"`
Reason string `json:"reason"`
Detail ClosedInfoDetail `json:"detail"`
Typename string `json:"__typename"`
}
type GoldOS struct {
IsGold int `json:"isGold"`
IsGoldBadge int `json:"isGoldBadge"`
IsOfficial int `json:"isOfficial"`
Badge string `json:"badge"`
ShopTier int `json:"shopTier"`
Typename string `json:"__typename"`
}
type CustomSEO struct {
Title string `json:"title"`
Description string `json:"description"`
BottomContent string `json:"bottomContent"`
Typename string `json:"__typename"`
}
type PartnerInfo struct {
FsType int `json:"fsType"`
Typename string `json:"__typename"`
}
type EpharmacyInfo struct {
SiaNumber string `json:"siaNumber"`
SipaNumber string `json:"sipaNumber"`
Apj string `json:"apj"`
Typename string `json:"__typename"`
}
type ShopInfoByIDResult struct {
ShopCore ShopCore `json:"shopCore"`
CreateInfo CreateInfo `json:"createInfo"`
FavoriteData FavoriteData `json:"favoriteData"`
ActiveProduct int `json:"activeProduct"`
ShopAssets ShopAssets `json:"shopAssets"`
Location string `json:"location"`
IsAllowManage int `json:"isAllowManage"`
BranchLinkDomain string `json:"branchLinkDomain"`
IsOpen int `json:"isOpen"`
ShipmentInfo []ShipmentInfo `json:"shipmentInfo"`
ShippingLoc ShippingLoc `json:"shippingLoc"`
ShopStats ShopStats `json:"shopStats"`
StatusInfo StatusInfo `json:"statusInfo"`
ClosedInfo ClosedInfo `json:"closedInfo"`
BbInfo []interface{} `json:"bbInfo"`
GoldOS GoldOS `json:"goldOS"`
ShopSnippetURL string `json:"shopSnippetURL"`
CustomSEO CustomSEO `json:"customSEO"`
IsQA bool `json:"isQA"`
IsGoApotik bool `json:"isGoApotik"`
PartnerInfo []PartnerInfo `json:"partnerInfo"`
EpharmacyInfo EpharmacyInfo `json:"epharmacyInfo"`
Typename string `json:"__typename"`
}
type ShopCoreInfoVar struct {
ID int `json:"id"`
Domain string `json:"domain"`
}
type ShopInfoByID struct {
Result []ShopInfoByIDResult `json:"result"`
Error Error `json:"error"`
Typename string `json:"__typename"`
}
type ShopCoreInfoResp struct {
Data struct {
ShopInfoByID `json:"shopInfoByID"`
} `json:"data"`
}