package models import ( "repuestera_back/models/seguridad" "gorm.io/gorm" ) // Comprobante es la base de los distintos tipos de comprobantes. // EmpresaID se propaga automáticamente a todas las tablas que lo embeben. type Comprobante struct { gorm.Model EmpresaID uint `gorm:"not null;default:1;index" json:"empresaId"` Estado string `gorm:"type:varchar(20);not null" json:"estado"` Total float64 `gorm:"type:decimal(15,2);not null" json:"total"` ResponsableID uint `gorm:"column:usuarioID"` Responsable models_seguridad.Usuario `gorm:"foreignKey:ResponsableID" json:"usuario"` }