feat: price_quality индикатор для прайслиста; убраны неиспользуемые price_method/period/coefficient/manual_price/meta_prices
Прайслисты: добавлено поле price_quality (0-9, выставляется внешней утилитой ценообразования на основе количества/свежести котировок за период — QF только отображает, не считает сам). В карточке прайслиста рядом с ценой показывается предупреждение (жёлтый/красный «!») при quality < 7. price_method/price_period_days/price_coefficient/manual_price/meta_prices убраны из контракта QF (models.PricelistItem, local_pricelist_items, API, колонка «Настройки» на странице прайслиста) — эти поля принадлежат внешнему движку ценообразования и нигде не использовались в клиенте. Сами колонки в qt_pricelist_items не трогаем — оставлены для обратной совместимости с внешней системой. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
39e6fd5642
commit
bea8d9453e
@@ -61,14 +61,11 @@ type PricelistItem struct {
|
||||
LotCategory string `gorm:"column:lot_category;size:50" json:"lot_category,omitempty"`
|
||||
LotDescription string `gorm:"column:lot_description;size:10000" json:"lot_description,omitempty"`
|
||||
Price float64 `gorm:"type:decimal(12,2);not null" json:"price"`
|
||||
PriceMethod string `gorm:"size:20" json:"price_method,omitempty"`
|
||||
|
||||
// Price calculation settings (snapshot from qt_lot_metadata), shown in the
|
||||
// pricelist detail UI as a compact "settings" summary next to each item.
|
||||
PricePeriodDays int `gorm:"default:90" json:"price_period_days"`
|
||||
PriceCoefficient float64 `gorm:"type:decimal(5,2);default:0" json:"price_coefficient"`
|
||||
ManualPrice *float64 `gorm:"type:decimal(12,2)" json:"manual_price,omitempty"`
|
||||
MetaPrices string `gorm:"size:1000" json:"meta_prices,omitempty"`
|
||||
// PriceQuality is a 0-9 score set by the external pricing tool that builds
|
||||
// the pricelist (based on quote recency/count per its own per-lot settings).
|
||||
// 7-9 = good, 4-6 = warning, 0-3 = poor. QF only displays it, never computes it.
|
||||
PriceQuality *int `gorm:"column:price_quality" json:"price_quality,omitempty"`
|
||||
}
|
||||
|
||||
func (PricelistItem) TableName() string {
|
||||
|
||||
Reference in New Issue
Block a user