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
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user