add services support

This commit is contained in:
Pavel 2023-12-28 12:52:45 +03:00
parent c2a33378b8
commit a72a57fbe1
2 changed files with 21 additions and 13 deletions

@ -1 +0,0 @@
Subproject commit 5c6d2ebead217f5916767a9a542117fa496c677b

View File

@ -1057,24 +1057,33 @@ type ProductGroup struct {
// BaseProduct type.
type BaseProduct struct {
Name string `json:"name,omitempty"`
URL string `json:"url,omitempty"`
Article string `json:"article,omitempty"`
ExternalID string `json:"externalId,omitempty"`
Manufacturer string `json:"manufacturer,omitempty"`
Description string `json:"description,omitempty"`
Popular bool `json:"popular,omitempty"`
Stock bool `json:"stock,omitempty"`
Novelty bool `json:"novelty,omitempty"`
Recommended bool `json:"recommended,omitempty"`
Active bool `json:"active,omitempty"`
Markable bool `json:"markable,omitempty"`
Name string `json:"name,omitempty"`
Type ProductType `json:"type,omitempty"`
URL string `json:"url,omitempty"`
Article string `json:"article,omitempty"`
ExternalID string `json:"externalId,omitempty"`
Manufacturer string `json:"manufacturer,omitempty"`
Description string `json:"description,omitempty"`
Popular bool `json:"popular,omitempty"`
Stock bool `json:"stock,omitempty"`
Novelty bool `json:"novelty,omitempty"`
Recommended bool `json:"recommended,omitempty"`
Active bool `json:"active,omitempty"`
Markable bool `json:"markable,omitempty"`
}
type ProductType string
const (
RegularProduct ProductType = "product"
ServiceProduct ProductType = "service"
)
// Product type.
type Product struct {
BaseProduct
ID int `json:"id,omitempty"`
Type ProductType `json:"type"`
MaxPrice float32 `json:"maxPrice,omitempty"`
MinPrice float32 `json:"minPrice,omitempty"`
ImageURL string `json:"imageUrl,omitempty"`