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.
type TopProduct struct {
ProductID uuid.UUID `json:"product_id"`
Name string `json:"name"`
TotalQuantity int64 `json:"total_quantity"`
RevenueCents int64 `json:"revenue_cents"`
ProductID uuid.UUID `db:"product_id" json:"product_id"`
Name string `db:"name" json:"name"`
TotalQuantity int64 `db:"total_quantity" json:"total_quantity"`
RevenueCents int64 `db:"revenue_cents" json:"revenue_cents"`
}
// SellerDashboard summarizes commercial metrics for sellers.