Private
Public Access
feat: actualizado diagrama de dominio
This commit is contained in:
1 parent
7f22570076
commit
63f01c253f
5 files changed
+75
-8
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/datatypes"
|
||||
)
|
||||
|
||||
type Remito struct {
|
||||
Comprobante
|
||||
FechaEmision time.Time `gorm:"not null" json:"fechaEmision"`
|
||||
TipoOperacion TipoOperacion `gorm:"type:varchar(20);not null" json:"tipoOperacion"`
|
||||
EmisorID uint `gorm:"not null" json:"emisorId"`
|
||||
ReceptorID uint `gorm:"not null" json:"receptorId"`
|
||||
|
||||
AlmacenOrigenID *uint `gorm:"column:almacen_origen_id" json:"almacenOrigenId,omitempty"`
|
||||
AlmacenOrigen *Almacen `gorm:"foreignKey:AlmacenOrigenID" json:"almacenOrigen,omitempty"`
|
||||
|
||||
Detalles datatypes.JSONSlice[RemitoDetalle] `gorm:"type:json" json:"detalles,omitempty"`
|
||||
}
|
||||
|
||||
type TipoOperacion string
|
||||
|
||||
const (
|
||||
OperacionCompra TipoOperacion = "COMPRA"
|
||||
OperacionVenta TipoOperacion = "VENTA"
|
||||
OperacionMovimiento TipoOperacion = "MOVIMIENTO"
|
||||
)
|
||||
Reference in new issue
Block a user