us-coach-spider/pkg/coach-client/model.go
timerzz 075a4812e4
All checks were successful
Build image / build (push) Successful in 1m30s
fix 修复coach-client接口问题
2024-05-14 17:43:08 +08:00

53 lines
1.4 KiB
Go

package coach_client
type PageDataResponse struct {
PageData struct {
Total int `json:"total"`
Page int `json:"page"`
TotalPages int `json:"totalPages"`
PageSize int `json:"pageSize"`
Products []Product `json:"products"`
} `json:"pageData"`
}
type Product struct {
Name string `json:"name"`
Colors []Color `json:"colors"`
VariantsOnSale []Variant `json:"variantsOnSale"`
}
type Color struct {
Id string `json:"id"` //"id": "IMDQC",
Text string `json:"text"` //颜色的描述
Orderable bool `json:"orderable"`
Media Media `json:"media"`
Url string `json:"url"` //"/products/eliza-flap-crossbody-bag-in-signature-canvas/CP009-IMDQC.html",
VgId string `json:"vgId"` // "vgId": "CP009-IMDQC",
MasterId string `json:"masterId"` //"masterId": "CP009"
}
type Media struct {
Thumbnail Thumbnail `json:"thumbnail"`
}
type Thumbnail struct {
Src string `json:"src"`
}
type Variant struct {
Id string `json:"id"`
OnSale bool `json:"onSale"`
Price Price `json:"price"`
}
type Price struct {
Sales Sales `json:"sales"`
MarkdownDiscPercent float32 `json:"markdownDiscPercent"`
}
type Sales struct {
Value float64 `json:"value"`
Currency string `json:"currency"`
Formatted string `json:"formatted"`
DecimalPrice string `json:"decimalPrice"`
}