Pavel Sinitsin
8c3541a892
Introduced a new method `GetTreeCategories` to provide a hierarchical structure for categories. Fixed typos in variable names and integrated utility functions for converting flat lists to nested dictionaries and vice versa. Added `TreeCategories` model for representing nested category structures.
33 lines
801 B
Go
33 lines
801 B
Go
package model
|
|
|
|
type CategoryResponse struct {
|
|
Categories []Category `json:"categories"`
|
|
}
|
|
|
|
type CategoriesAndProductsBySlugParentCategoryResponse struct {
|
|
Date string `json:"date"`
|
|
Slug string `json:"slug"`
|
|
Name string `json:"name"`
|
|
Url string `json:"url"`
|
|
Categories []Category `json:"categories"`
|
|
Products []Product `json:"products"`
|
|
}
|
|
|
|
type NewProductsResponse struct {
|
|
Data struct {
|
|
Products []Product `json:"products"`
|
|
} `json:"data"`
|
|
|
|
Meta struct {
|
|
Page int `json:"page"`
|
|
TotalPages int `json:"totalPages"`
|
|
TotalCount int `json:"totalCount"`
|
|
PageSize int `json:"pageSize"`
|
|
} `json:"_meta"`
|
|
}
|
|
|
|
type RemainsAndPlanresiduesResponse struct {
|
|
Date string `json:"date"`
|
|
Products []ShortProduct `json:"products"`
|
|
}
|