18 lines
504 B
Go
18 lines
504 B
Go
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é
|
|
}
|
|
|
|
// Méthodes pour l'interface Database
|
|
func (m *Media) GetProductID() int { return m.ProductID }
|
|
func (m *Media) GetType() string { return m.Type }
|
|
func (m *Media) GetURL() string { return m.URL }
|
|
func (m *Media) SetID(id int) { m.ID = id }
|