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

+3 -1
View File
@@ -2,7 +2,9 @@ package models
type Recibo struct {
Comprobante
Pagos []Pago `gorm:"foreignKey:pagoId" json:"pagos"`
ClienteID uint `json:"clienteId"`
Cliente Cliente `gorm:"foreignKey:ClienteID" json:"cliente,omitempty"`
Pagos []Pago `gorm:"foreignKey:ReciboID" json:"pagos"`
}
func (Recibo) TableName() string {