package models import "gorm.io/gorm" type Descuento struct { gorm.Model EmpresaID uint `gorm:"not null;default:1;index" json:"empresaId"` Nombre string `gorm:"type:varchar(100);not null"` Descripcion string `gorm:"type:text"` Tipo TipoDescuento `gorm:"type:varchar(20);not null"` Valor float64 `gorm:"type:decimal(12,2);not null"` Activo bool `gorm:"not null;default:true"` } type TipoDescuento string const ( Porcentaje TipoDescuento = "PORCENTAJE" Fijo TipoDescuento = "FIJO" )