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

+2
View File
@@ -6,6 +6,8 @@ type Pago struct {
gorm.Model
FormaDePagoID uint `gorm:"column:formaDePagoID"`
FormaDePago FormaDePago `gorm:"foreignKey:FormaDePagoID"`
ReciboID uint `json:"reciboId"`
Recibo Recibo `gorm:"foreignKey:ReciboID" json:"recibo,omitempty"`
Importe float64 `gorm:"type:decimal(10,2)"`
}