Private
Public Access
bueno es parte del plan de implementacion para el caso de uso de gestion
de stock
This commit is contained in:
1 parent
24e746b1b7
commit
6ed8805e21
40 files changed
+2748
-31
No files matched your search
@@ -8,17 +8,19 @@ import (
|
||||
|
||||
type Reserva struct {
|
||||
gorm.Model
|
||||
EmpresaID uint `gorm:"not null;default:1;index;index:idx_reserva_empresa_repuesto_almacen,priority:1" json:"empresaId"`
|
||||
EmpresaID uint `gorm:"not null;default:1;index;index:idx_reserva_empresa_repuesto_almacen,priority:1;index:idx_reserva_empresa_estado_vencimiento,priority:1" json:"empresaId"`
|
||||
|
||||
RepuestoID uint `gorm:"not null;index:idx_reserva_empresa_repuesto_almacen,priority:2" json:"repuesto_id"`
|
||||
Repuesto Repuesto `gorm:"foreignKey:RepuestoID" json:"repuesto,omitempty"`
|
||||
AlmacenID uint `gorm:"not null;index:idx_reserva_empresa_repuesto_almacen,priority:3" json:"almacen_id"`
|
||||
Almacen Almacen `gorm:"foreignKey:AlmacenID" json:"almacen,omitempty"`
|
||||
Cantidad float64 `gorm:"not null;check:cantidad > 0" json:"cantidad"`
|
||||
Estado EstadoReserva `gorm:"type:varchar(20);not null;default:'activa';index" json:"estado"`
|
||||
Cantidad float64 `gorm:"type:decimal(15,3);not null;check:cantidad > 0" json:"cantidad"`
|
||||
Estado EstadoReserva `gorm:"type:varchar(20);not null;default:'activa';index;index:idx_reserva_empresa_estado_vencimiento,priority:2" json:"estado"`
|
||||
ClienteID *uint `json:"cliente_id,omitempty"`
|
||||
Cliente *Cliente `gorm:"foreignKey:ClienteID" json:"cliente,omitempty"`
|
||||
FechaVencimiento time.Time `gorm:"index" json:"fecha_vencimiento,omitempty"`
|
||||
FechaVencimiento time.Time `gorm:"index;index:idx_reserva_empresa_estado_vencimiento,priority:3" json:"fecha_vencimiento,omitempty"`
|
||||
CreadoPorID uint `gorm:"index" json:"creadoPorId,omitempty"`
|
||||
Observacion string `gorm:"type:varchar(255)" json:"observacion,omitempty"`
|
||||
}
|
||||
|
||||
type EstadoReserva string
|
||||
|
||||
Reference in new issue
Block a user