chore: update

This commit is contained in:
2026-03-03 23:42:23 +01:00
parent 52b059fafa
commit 0073f80a48
95 changed files with 2720 additions and 40619 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ type Product struct {
Category string `json:"category" binding:"required"`
Description string `json:"description"`
Stock float64 `json:"stock"` // ← ajouter le stock ici
Unit string `json:"unit"` // kg | g | bag | l | cl | pcs | u
Prices []ProductPrice `json:"prices"`
Media []Media `json:"media,omitempty"`
CreatedAt time.Time `json:"created_at"`
@@ -38,7 +39,8 @@ type StockInfo struct {
func (p *Product) GetName() string { return p.Name }
func (p *Product) GetCategory() string { return p.Category }
func (p *Product) GetDescription() string { return p.Description }
func (p *Product) GetStock() float64 { return p.Stock } // ← méthode pour le stock
func (p *Product) GetStock() float64 { return p.Stock }
func (p *Product) GetUnit() string { return p.Unit }
func (p *Product) GetPrices() []ProductPrice { return p.Prices }
func (p *Product) SetID(id int) { p.ID = id }
func (p *Product) SetCreatedAt(t time.Time) { p.CreatedAt = t }