Private
Public Access
feat: añadida entidad de descuentos
This commit is contained in:
1 parent
3f3175b615
commit
a1169c7234
4 files changed
+45
-3
No files matched your search
@@ -0,0 +1,22 @@
|
||||
package models
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
type Descuento struct {
|
||||
gorm.Model
|
||||
|
||||
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"
|
||||
)
|
||||
Reference in new issue
Block a user