Удалён мёртвый серверный слой управления компонентами/категориями, который дублировал источники категории LOT. В рантайме категория всегда берётся из local_pricelist_items.lot_category (наполняется синком из qt_pricelist_items.lot_category). Удалено: - repository: UnifiedRepo/DataSource, ComponentRepository, CategoryRepository - services: старый ConfigurationService (заменён LocalConfigurationService), ComponentService, ComponentToLocal, ImportFromLot, ParsePartNumber - quote.go: недостижимый online-блок (qt_categories) + componentRepo/ pricingService/priceResolver Сохранены живые типы: models.Category/DefaultCategories (для /api/categories), ComponentView/ComponentListResult, CreateConfigRequest/ArticlePreviewRequest/ ConfigurationGetter/ErrConfig*. bible-local/03-database.md: зафиксирован единственный источник категории LOT; qt_categories/qt_lot_metadata перенесены в server-side only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
25 lines
859 B
Go
25 lines
859 B
Go
package services
|
|
|
|
import (
|
|
"git.mchus.pro/mchus/quoteforge/internal/models"
|
|
)
|
|
|
|
type ComponentListResult struct {
|
|
Items []ComponentView `json:"items"`
|
|
TotalCount int64 `json:"total_count"`
|
|
Page int `json:"page"`
|
|
PerPage int `json:"per_page"`
|
|
TotalPages int `json:"total_pages"`
|
|
}
|
|
|
|
type ComponentView struct {
|
|
LotName string `json:"lot_name"`
|
|
Description string `json:"description"`
|
|
Category string `json:"category"`
|
|
CategoryName string `json:"category_name"`
|
|
Model string `json:"model"`
|
|
PriceFreshness models.PriceFreshness `json:"price_freshness"`
|
|
PopularityScore float64 `json:"popularity_score"`
|
|
Specs models.Specs `json:"specs,omitempty"`
|
|
}
|