package models import "gorm.io/gorm" type Pago struct { gorm.Model EmpresaID uint `gorm:"not null;default:1;index" json:"empresaId"` 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)"` } func (Pago) TableName() string { return "pago" }