package models import ( "time" ) type Inventory struct { ID uint `gorm:"primaryKey" json:"id"` ProductID uint `gorm:"index;not null" json:"product_id"` SupplierID uint `gorm:"index;not null" json:"supplier_id"` Quantity int `gorm:"default:0" json:"quantity"` UpdatedAt time.Time `json:"updated_at"` } func (Inventory) TableName() string { return "inventory" }