chore: update id order

This commit is contained in:
2026-03-28 17:00:00 +01:00
parent 5380abe8ed
commit 3bf3f5e605
48 changed files with 2347 additions and 3693 deletions
+7 -5
View File
@@ -3,13 +3,15 @@ package models
import "time"
type Media struct {
ID int `json:"id"`
ProductID int `json:"product_id"`
Type string `json:"type"`
URL string `json:"url"`
CreatedAt time.Time `json:"created_at"` // ✅ Ajouté
ID int `gorm:"primaryKey;autoIncrement" json:"id"`
ProductID int `gorm:"column:product_id" json:"product_id"`
Type string `gorm:"column:type" json:"type"`
URL string `gorm:"column:url" json:"url"`
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
}
func (Media) TableName() string { return "media" }
// Méthodes pour l'interface Database
func (m *Media) GetProductID() int { return m.ProductID }
func (m *Media) GetType() string { return m.Type }