Fix GORM foreign keys and column types in models

This commit is contained in:
fede committed 2026-10-22 20:32:28 -03:00
1 parent fce21846bc
commit 8d5e191d7d
21 files changed
+48 -39

No files matched your search

+1 -1
View File
@@ -13,5 +13,5 @@ type Comprobante struct {
Estado string `gorm:"type:varchar(20);not null" json:"estado"`
Total float64 `gorm:"type:decimal(15,2);not null" json:"total"`
ResponsableID uint `gorm:"column:usuarioID"`
Responsable models_seguridad.Usuario `gorm:"foreignKey:usuarioID" json:"usuario"`
Responsable models_seguridad.Usuario `gorm:"foreignKey:ResponsableID" json:"usuario"`
}