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
@@ -4,7 +4,7 @@ import "gorm.io/gorm"
|
||||
|
||||
type CuentaContable struct {
|
||||
gorm.Model
|
||||
Nombre string `gorm:"type:varchar(30),not null"`
|
||||
Tipo string `gorm:"type:varchar(12),not null"`
|
||||
Movimientos []MovimientoContable `gorm:"foreignKey:movimientoID"`
|
||||
Nombre string `gorm:"type:varchar(30);not null"`
|
||||
Tipo string `gorm:"type:varchar(12);not null"`
|
||||
Movimientos []MovimientoContable `gorm:"foreignKey:CuentaID"`
|
||||
}
|
||||
Reference in new issue
Block a user