package models type NotaDebito struct { Comprobante Motivo string `gorm:"type:varchar(40),not null"` FacturaOrigen Factura `gorm:"foreignKey:FacturaID" json:"factura"` } func (NotaDebito) TableName() string { return "nota_debito" }