Pavel Sinitsin
cea1f96bb4
Deleted client/credential.go and moved the Credentials struct to the api package for better modularity. Enhanced type safety in api by checking type assertions and added detailed comments in model structs.
33 lines
1.5 KiB
Go
33 lines
1.5 KiB
Go
package model
|
||
|
||
type CategoryResponse struct {
|
||
Categories []Category `json:"categories"` // Массив категорий 1-го уровня
|
||
}
|
||
|
||
type CategoriesAndProductsBySlugParentCategoryResponse struct {
|
||
Date string `json:"date"` // Дата формирования файла
|
||
Slug string `json:"slug"` // Слаг категории 1-го уровня
|
||
Name string `json:"name"` // Название категории 1-го уровня
|
||
Url string `json:"url"` // Относительный адрес категории 1-го уровня
|
||
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"` // Массив остатков по товарам
|
||
}
|