package models import "gorm.io/gorm" type Proveedor struct { gorm.Model EmpresaID uint `gorm:"not null;default:1;index" json:"empresaId"` Nombre string `gorm:"type:varchar(40)" json:"nombre"` Facturas []Factura `gorm:"foreignKey:ProveedorID" json:"facturas,omitempty"` }