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
@@ -5,9 +5,9 @@ import "gorm.io/gorm"
|
||||
type MovimientoContable struct {
|
||||
gorm.Model
|
||||
AsientoID uint `gorm:"column:asientoID"`
|
||||
Asiento AsientoContable `gorm:"foreignKey:asientoID"`
|
||||
Asiento AsientoContable `gorm:"foreignKey:AsientoID"`
|
||||
CuentaID uint `gorm:"column:cuentaID"`
|
||||
Cuenta CuentaContable `gorm:"foreignKey:cuentaID"`
|
||||
Cuenta CuentaContable `gorm:"foreignKey:CuentaID"`
|
||||
Debe float64 `gorm:"type:decimal(10,2)"`
|
||||
Haber float64 `gorm:"type:decimal(10,2)"`
|
||||
Descripcion string `gorm:"type:varchar(50)"`
|
||||
|
||||
Reference in new issue
Block a user