fix(backend): add db tags to TopProduct struct for sqlx mapping

This commit is contained in:
Tiago Yamamoto 2025-12-22 15:38:56 -03:00
parent 6df111abfa
commit 9fc9b211bf

View file

@ -332,10 +332,10 @@ type CompanyRating struct {
// TopProduct aggregates seller performance per SKU. // TopProduct aggregates seller performance per SKU.
type TopProduct struct { type TopProduct struct {
ProductID uuid.UUID `json:"product_id"` ProductID uuid.UUID `db:"product_id" json:"product_id"`
Name string `json:"name"` Name string `db:"name" json:"name"`
TotalQuantity int64 `json:"total_quantity"` TotalQuantity int64 `db:"total_quantity" json:"total_quantity"`
RevenueCents int64 `json:"revenue_cents"` RevenueCents int64 `db:"revenue_cents" json:"revenue_cents"`
} }
// SellerDashboard summarizes commercial metrics for sellers. // SellerDashboard summarizes commercial metrics for sellers.