Private
Public Access
Fix GORM foreign keys and column types in models
This commit is contained in:
1 parent
fce21846bc
commit
8d5e191d7d
21 files changed
+48
-39
No files matched your search
@@ -4,6 +4,6 @@ import "gorm.io/gorm"
|
||||
|
||||
type Proveedor struct {
|
||||
gorm.Model
|
||||
Nombre string `gorm:"type:varchar(40)" json:"nombre"`
|
||||
Facturas []Factura `gorm:"foreignKey:FacturaID" json:"facturas,omitempty"`
|
||||
Nombre string `gorm:"type:varchar(40)" json:"nombre"`
|
||||
Facturas []Factura `gorm:"foreignKey:ProveedorID" json:"facturas,omitempty"`
|
||||
}
|
||||
Reference in new issue
Block a user