primeros puntos del parcial
This commit is contained in:
1 parent
e403a95f66
commit
037d175aed
6 files changed
+735
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.0 MiB |
@@ -0,0 +1,735 @@
|
|||||||
|
#+title: Parcial 2
|
||||||
|
#+author: fede
|
||||||
|
|
||||||
|
* Intro
|
||||||
|
Esta entrega tomara en cuenta el caso de uso =Gestion de Stock=.
|
||||||
|
* Diagrama de casos de uso - D-CUD-STOCK
|
||||||
|
#+begin_src plantuml :file ./D-CUD-STOCK.png
|
||||||
|
@startuml D-CUD-STOCK
|
||||||
|
title Gestión de Stock
|
||||||
|
|
||||||
|
left to right direction
|
||||||
|
|
||||||
|
actor "Empleado" as empleado
|
||||||
|
|
||||||
|
rectangle "Gestion de Stock" {
|
||||||
|
usecase "gestionar stock" as GS
|
||||||
|
|
||||||
|
usecase "mostrar existencias" as ME
|
||||||
|
usecase "listar existencias" as LE
|
||||||
|
|
||||||
|
usecase "ingresar stock" as IS
|
||||||
|
|
||||||
|
usecase "transcripción usando ia" as TIA
|
||||||
|
|
||||||
|
usecase "registrar diferencias" as RDR
|
||||||
|
|
||||||
|
usecase "trasladar stock" as TS
|
||||||
|
usecase "ajustar stock" as AJ
|
||||||
|
usecase "registrar movimiento" as RM
|
||||||
|
usecase "registrar comentario o observación" as CO
|
||||||
|
|
||||||
|
|
||||||
|
usecase "generar reporte de stock" as GRS
|
||||||
|
usecase "exportar reporte" as ER
|
||||||
|
|
||||||
|
usecase "reservar stock" as RS
|
||||||
|
usecase "consultar reservas" as VR
|
||||||
|
usecase "liberar reserva" as LR
|
||||||
|
|
||||||
|
usecase "registrar devolucion" as RD
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
rectangle "Integraciones Externas" {
|
||||||
|
cloud "IA Transcripcion" as IAT
|
||||||
|
}
|
||||||
|
|
||||||
|
empleado --> GS
|
||||||
|
|
||||||
|
GS <.. IS : <<extend>>
|
||||||
|
|
||||||
|
GS <.. ME : <<extend>>
|
||||||
|
GS ..> LE : <<include>>
|
||||||
|
|
||||||
|
|
||||||
|
GS <.. RD : <<extend>> "registrar devolución"
|
||||||
|
|
||||||
|
/'
|
||||||
|
' IS ..> CR : <<include>>
|
||||||
|
'/
|
||||||
|
IS <.. TIA : <<extend>>
|
||||||
|
TIA --> IAT
|
||||||
|
|
||||||
|
IS <.. RDR: <<extend>> "registrar diferencias"
|
||||||
|
'IS ..> RR : <<include>>
|
||||||
|
|
||||||
|
IS ..> RM : <<include>> "contabilizar"
|
||||||
|
|
||||||
|
AJ ..> RM : <<include>> "contabilizar"
|
||||||
|
|
||||||
|
GS <.. TS : <<extend>> "trasladar"
|
||||||
|
GS <.. AJ : <<extend>> "ajustar"
|
||||||
|
GS <.. CO : <<extend>> "comentar"
|
||||||
|
|
||||||
|
GRS <.. ER : <<extend>>
|
||||||
|
|
||||||
|
GS <.. RS : <<extend>> "reservar"
|
||||||
|
|
||||||
|
/'
|
||||||
|
' RS ..> RM : <<include>>
|
||||||
|
'/
|
||||||
|
RD ..> RM : <<include>>
|
||||||
|
|
||||||
|
GS <.. GRS : <<extend>>
|
||||||
|
|
||||||
|
RS ..> VR : <<include>> "consultar"
|
||||||
|
RS <.. LR : <<extend>> "liberar"
|
||||||
|
legend left
|
||||||
|
actor – actor externo o humano
|
||||||
|
usecase – caso de uso
|
||||||
|
<<include>> – sub‑flujo obligatorio
|
||||||
|
<<extend>> – sub‑flujo opcional
|
||||||
|
rectangle – módulo/sub‑dominio
|
||||||
|
endlegend
|
||||||
|
@enduml
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+RESULTS:
|
||||||
|
[[file:./D-CUD-STOCK.png]]
|
||||||
|
|
||||||
|
* Diagrama de dominio
|
||||||
|
** Entero
|
||||||
|
#+begin_src plantuml :file ../D-CLA-DOM-001.png
|
||||||
|
@startuml D-CLA-DOM-001
|
||||||
|
|
||||||
|
title SAP-TFI-2026 — Diagrama de Dominio (iteracion 1)
|
||||||
|
'hide circle
|
||||||
|
/'
|
||||||
|
' skinparam linetype ortho
|
||||||
|
'/
|
||||||
|
|
||||||
|
class "gorm.Model" {
|
||||||
|
ID: uint
|
||||||
|
CreatedAt: Time
|
||||||
|
UpdatedAt: Time
|
||||||
|
DeletedAt: Time
|
||||||
|
}
|
||||||
|
|
||||||
|
note top of "gorm.Model"
|
||||||
|
Las siguientes entidades heredan de gorm.Model
|
||||||
|
|
||||||
|
- Cliente
|
||||||
|
- Descuento
|
||||||
|
- Devolucion
|
||||||
|
- FormaPago
|
||||||
|
- Comprobante
|
||||||
|
- Factura
|
||||||
|
- NotaCredito
|
||||||
|
- NotaDebito
|
||||||
|
- OrdenCompra
|
||||||
|
- Marca
|
||||||
|
- Pago
|
||||||
|
- Proveedor
|
||||||
|
- Recibo
|
||||||
|
- Reserva
|
||||||
|
- AsientoContable
|
||||||
|
- MovimientoContable
|
||||||
|
- CuentaContable
|
||||||
|
- Stock
|
||||||
|
end note
|
||||||
|
|
||||||
|
|
||||||
|
class "Comprobante" as CBT {
|
||||||
|
Estado: string
|
||||||
|
Total: float64
|
||||||
|
ResponsableID: uint
|
||||||
|
Responsable: Usuario
|
||||||
|
}
|
||||||
|
|
||||||
|
/'
|
||||||
|
' note right of CBT
|
||||||
|
' Struct embebido utilizado para
|
||||||
|
' componer los distintos comprobantes.
|
||||||
|
'
|
||||||
|
' No posee ID ni tabla propia.
|
||||||
|
' end note
|
||||||
|
'/
|
||||||
|
|
||||||
|
class "Remito" as RMT {
|
||||||
|
FechaEmision: time.Time
|
||||||
|
TipoOperacion: TipoOperacion
|
||||||
|
EmisorID: uint
|
||||||
|
ReceptorID: uint
|
||||||
|
AlmacenOrigenID *uint
|
||||||
|
AlmacenOrigen *Almacen
|
||||||
|
Detalles: RemitoDetalle[]
|
||||||
|
}
|
||||||
|
|
||||||
|
Remito <|-- Comprobante
|
||||||
|
Remito "*" --> "1" TIO
|
||||||
|
Remito "1" *--> "1..*" RemitoDetalle
|
||||||
|
Remito "1" --> "0..2" Almacen
|
||||||
|
Remito "1" --> "0..1" Cliente : Receptor
|
||||||
|
Remito "1" --> "0..1" Proveedor : Emisor
|
||||||
|
|
||||||
|
class "RemitoDetalle" as DRMT {
|
||||||
|
ProductoID: uint
|
||||||
|
CantidadEsperada: float64
|
||||||
|
CantidadRecibida: float64
|
||||||
|
UnidadMedida: string
|
||||||
|
Observacion: string
|
||||||
|
}
|
||||||
|
|
||||||
|
enum "TipoOperacion" as TIO {
|
||||||
|
COMPRA
|
||||||
|
VENTA
|
||||||
|
INTERNO
|
||||||
|
}
|
||||||
|
|
||||||
|
class "Descuento" as DS {
|
||||||
|
Nombre: string
|
||||||
|
Descripcion: string
|
||||||
|
Tipo: TipoDescuento
|
||||||
|
Valor: float64
|
||||||
|
Activo: bool
|
||||||
|
}
|
||||||
|
|
||||||
|
Descuento "0..*" --> "1" TipoDescuento
|
||||||
|
|
||||||
|
enum TipoDescuento {
|
||||||
|
PORCENTAJE
|
||||||
|
FIJO
|
||||||
|
}
|
||||||
|
|
||||||
|
class "Almacen" as A {
|
||||||
|
ID: string
|
||||||
|
Ubicacion: string
|
||||||
|
Stocks: []Stock
|
||||||
|
}
|
||||||
|
|
||||||
|
Almacen "1" *--> "0..*" Stock
|
||||||
|
|
||||||
|
class "Cliente" as CC {
|
||||||
|
Nombre: string
|
||||||
|
Cuit: string
|
||||||
|
Email: string?
|
||||||
|
Facturas: []Factura
|
||||||
|
Recibos: []Recibo
|
||||||
|
}
|
||||||
|
|
||||||
|
Cliente "1" --> "0..*" Factura
|
||||||
|
Cliente "1" --> "0..*" Recibo
|
||||||
|
|
||||||
|
|
||||||
|
class "Factura" as F {
|
||||||
|
ClienteID: uint64
|
||||||
|
Cliente: Cliente
|
||||||
|
ReciboID: uint
|
||||||
|
Recibo: Recibo
|
||||||
|
Avisado: bool
|
||||||
|
Detalles: []FacturaDetalle
|
||||||
|
}
|
||||||
|
|
||||||
|
Factura "1" --> "0..1" Recibo
|
||||||
|
Factura "1" *--> "1..*" FacturaDetalle
|
||||||
|
|
||||||
|
|
||||||
|
class "FacturaDetalle" as FD {
|
||||||
|
RepuestoID: uint64
|
||||||
|
Cantidad: uint
|
||||||
|
DescuentoID: uint
|
||||||
|
Descuento: float64
|
||||||
|
PrecioUnitario: float64
|
||||||
|
Subtotal: float64
|
||||||
|
}
|
||||||
|
|
||||||
|
FacturaDetalle "1" --> "1" Repuesto
|
||||||
|
FacturaDetalle "1" --> "1" Descuento
|
||||||
|
|
||||||
|
|
||||||
|
class "FormaPago" as FPF {
|
||||||
|
Descripcion: string
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class "Marca" as M {
|
||||||
|
Nombre: string
|
||||||
|
Repuestos: []Repuesto
|
||||||
|
}
|
||||||
|
|
||||||
|
class "NotaCredito" as NC {
|
||||||
|
Motivo: string
|
||||||
|
FacturaOrigenID: uint
|
||||||
|
FacturaOrigen: Factura
|
||||||
|
}
|
||||||
|
|
||||||
|
NotaCredito "0..1" --> "1" Factura
|
||||||
|
|
||||||
|
|
||||||
|
class "NotaDebito" as ND {
|
||||||
|
Motivo: string
|
||||||
|
FacturaOrigenID: uint
|
||||||
|
FacturaOrigen: Factura
|
||||||
|
}
|
||||||
|
|
||||||
|
NotaDebito "0..1" --> "1" Factura
|
||||||
|
|
||||||
|
|
||||||
|
class "Devolucion" as DV {
|
||||||
|
Motivo: string
|
||||||
|
FacturaOrigenID: uint
|
||||||
|
FacturaOrigen: Factura
|
||||||
|
Detalles: []DevolucionDetalle
|
||||||
|
}
|
||||||
|
|
||||||
|
Devolucion <|-- Comprobante
|
||||||
|
Devolucion "0..1" <--o "1" Factura
|
||||||
|
|
||||||
|
|
||||||
|
class "DevolucionDetalle" as DVD {
|
||||||
|
RepuestoID: uint64
|
||||||
|
Cantidad: uint
|
||||||
|
PrecioUnitario: float64
|
||||||
|
Subtotal: float64
|
||||||
|
}
|
||||||
|
|
||||||
|
DevolucionDetalle "1" --> "1" Repuesto
|
||||||
|
|
||||||
|
|
||||||
|
class "OrdenCompra" as O {
|
||||||
|
ProveedorId: uint
|
||||||
|
Proveedor: Proveedor
|
||||||
|
Detalles: []OrdenCompraDetalle
|
||||||
|
}
|
||||||
|
|
||||||
|
OrdenCompra "1" *--> "1..*" OrdenCompraDetalle
|
||||||
|
OrdenCompra "1" --> "1" Proveedor
|
||||||
|
|
||||||
|
|
||||||
|
class "Pago" as PPP {
|
||||||
|
FormaDePagoID: uint
|
||||||
|
FormaDePago: FormaPago
|
||||||
|
Importe: float64
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class "Proveedor" as PR {
|
||||||
|
Nombre: string
|
||||||
|
Facturas: []Factura
|
||||||
|
}
|
||||||
|
|
||||||
|
Proveedor "1" --> "0..*" Factura
|
||||||
|
|
||||||
|
|
||||||
|
class "OrdenCompraDetalle" as OD {
|
||||||
|
RepuestoID: uint64
|
||||||
|
Cantidad: uint
|
||||||
|
PrecioUnitario: float64
|
||||||
|
Subtotal: float64
|
||||||
|
}
|
||||||
|
|
||||||
|
OrdenCompraDetalle "1" --> "1" Repuesto
|
||||||
|
|
||||||
|
|
||||||
|
class "Recibo" as RC {
|
||||||
|
ResponsableID: uint
|
||||||
|
Pagos: []Pago
|
||||||
|
}
|
||||||
|
|
||||||
|
Recibo "1" *--> "1..*" Pago
|
||||||
|
|
||||||
|
|
||||||
|
class "Repuesto" as R {
|
||||||
|
Nombre: string
|
||||||
|
Precio: float64
|
||||||
|
StockMinimo: int64
|
||||||
|
Descripcion: string
|
||||||
|
MarcaID: uint
|
||||||
|
Marca: Marca
|
||||||
|
Aliases: []string
|
||||||
|
Stocks: []Stock
|
||||||
|
}
|
||||||
|
|
||||||
|
Repuesto "1" <-- "1" Stock
|
||||||
|
Repuesto "0..*" --> "1" Marca
|
||||||
|
|
||||||
|
class "Reserva" as RRV {
|
||||||
|
RepuestoID: uint
|
||||||
|
Repuesto: Repuesto
|
||||||
|
AlmacenID: uint
|
||||||
|
Almacen: Almacen
|
||||||
|
Cantidad: float64
|
||||||
|
Estado: EstadoReserva
|
||||||
|
ClienteID: *uint
|
||||||
|
Cliente: *Cliente
|
||||||
|
FechaVencimiento: time.Time
|
||||||
|
}
|
||||||
|
|
||||||
|
Reserva "0..*" --> "1" Cliente
|
||||||
|
Repuesto "1..*" --> "1" Reserva
|
||||||
|
Almacen "1" --> "0..*" Reserva
|
||||||
|
Reserva "1" --> "1" EstadoReserva
|
||||||
|
|
||||||
|
enum EstadoReserva{
|
||||||
|
activa
|
||||||
|
vencida
|
||||||
|
liberada
|
||||||
|
consumida
|
||||||
|
}
|
||||||
|
|
||||||
|
class "Stock" as S {
|
||||||
|
RepuestoID: uint64
|
||||||
|
Cantidad: uint
|
||||||
|
CantidadReservada: uint
|
||||||
|
Repuesto: Repuesto
|
||||||
|
Observacion: string
|
||||||
|
Movimientos: MovimientosStock[]
|
||||||
|
}
|
||||||
|
|
||||||
|
Stock "1" *--> "1..*" MovimientosStock
|
||||||
|
|
||||||
|
class "MovimientosStock" as MSS {
|
||||||
|
Fecha: Time
|
||||||
|
Tipo: string
|
||||||
|
Cantidad: float64
|
||||||
|
UsuarioID: uint
|
||||||
|
}
|
||||||
|
|
||||||
|
package Contabilidad {
|
||||||
|
|
||||||
|
class "CuentaContable" as CCO {
|
||||||
|
Nombre: string
|
||||||
|
Tipo: string
|
||||||
|
Movimientos: []MovimientoContable
|
||||||
|
}
|
||||||
|
|
||||||
|
class "AsientoContable" as AC {
|
||||||
|
Descripcion: string
|
||||||
|
Movimientos: []MovimientoContable
|
||||||
|
ComprobanteTipo: string
|
||||||
|
ComprobanteID: uint
|
||||||
|
}
|
||||||
|
|
||||||
|
class "MovimientoContable" as MC {
|
||||||
|
AsientoID: uint
|
||||||
|
Asiento: AsientoContable
|
||||||
|
CuentaID: uint
|
||||||
|
Cuenta: CuentaContable
|
||||||
|
Debe: float64
|
||||||
|
Haber: float64
|
||||||
|
Descripcion: string
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
CuentaContable "1" <-- "1..*" MovimientoContable
|
||||||
|
AsientoContable "1" --> "1..*" MovimientoContable
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
' Relación polimórfica con los comprobantes
|
||||||
|
AsientoContable "1..*" --> "1" Comprobante
|
||||||
|
/'
|
||||||
|
' AsientoContable ..> Factura : Tipo + ID
|
||||||
|
' AsientoContable ..> Recibo : Tipo + ID
|
||||||
|
' AsientoContable ..> NotaCredito : Tipo + ID
|
||||||
|
' AsientoContable ..> NotaDebito : Tipo + ID
|
||||||
|
' AsientoContable ..> OrdenCompra : Tipo + ID
|
||||||
|
'/
|
||||||
|
|
||||||
|
|
||||||
|
' Composición conceptual de Comprobante
|
||||||
|
Comprobante --|> Factura
|
||||||
|
Comprobante --|> Recibo
|
||||||
|
Comprobante --|> NotaCredito
|
||||||
|
Comprobante --|> NotaDebito
|
||||||
|
Comprobante --|> OrdenCompra
|
||||||
|
Comprobante --|> Devolucion
|
||||||
|
|
||||||
|
class "Log" as LG {
|
||||||
|
ID: uint
|
||||||
|
UsuarioID: uint
|
||||||
|
Accion: string
|
||||||
|
Detalles: LogDetalle[]
|
||||||
|
CreatedAt: Time
|
||||||
|
Usuario: Usuario
|
||||||
|
}
|
||||||
|
|
||||||
|
class "LogDetalle" as LGD{
|
||||||
|
ID: uint
|
||||||
|
NombreTabla: string
|
||||||
|
Columna: string
|
||||||
|
ValorAnterior: string
|
||||||
|
ValorNuevo: string
|
||||||
|
}
|
||||||
|
|
||||||
|
class "Usuario" as usu {
|
||||||
|
ID: uint
|
||||||
|
Email: string
|
||||||
|
Password: string
|
||||||
|
Name: string
|
||||||
|
Grupos: Grupo
|
||||||
|
CreatedAt: Time
|
||||||
|
UpdatedAt: Time
|
||||||
|
DeletedAt: Time
|
||||||
|
}
|
||||||
|
|
||||||
|
class "Permiso" as per {
|
||||||
|
ID: uint
|
||||||
|
Nombre: string
|
||||||
|
Alias: string
|
||||||
|
Descripcion: string
|
||||||
|
CreatedAt: Time
|
||||||
|
UpdatedAt: Time
|
||||||
|
DeletedAt: Time
|
||||||
|
}
|
||||||
|
|
||||||
|
class "Grupo" as GRR {
|
||||||
|
ID: uint
|
||||||
|
Nombre: string
|
||||||
|
Descripcion: string
|
||||||
|
Permisos: Permiso
|
||||||
|
Grupos: Grupo
|
||||||
|
Usuarios: Usuario
|
||||||
|
CreatedAt: Time
|
||||||
|
UpdatedAt: Time
|
||||||
|
DeletedAt: Time
|
||||||
|
}
|
||||||
|
|
||||||
|
interface "IPermisosComponent" {
|
||||||
|
Buscar(id uint): bool
|
||||||
|
ListarPermisos(permisos map[uint]Permiso)
|
||||||
|
}
|
||||||
|
|
||||||
|
Logs "1" *--> "1..*" LogDetalle
|
||||||
|
Logs "0..*" --> "1" Usuario
|
||||||
|
|
||||||
|
Grupo ..|> IPermisosComponent
|
||||||
|
Grupo "1" o--> "0..*" IPermisosComponent
|
||||||
|
Permiso ..|> IPermisosComponent
|
||||||
|
|
||||||
|
Usuario "0..*" --> "0..*" Grupo
|
||||||
|
Comprobante "0..*" --> "1" Usuario
|
||||||
|
|
||||||
|
@enduml
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+RESULTS:
|
||||||
|
[[file:../D-CLA-DOM-001.png]]
|
||||||
|
** Relevante para el Caso de uso
|
||||||
|
#+begin_src plantuml :file ./D-DOM-STOCK.png
|
||||||
|
|
||||||
|
class "gorm.Model" {
|
||||||
|
ID: uint
|
||||||
|
CreatedAt: Time
|
||||||
|
UpdatedAt: Time
|
||||||
|
DeletedAt: Time
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class "Remito" {
|
||||||
|
FechaEmision: time.Time
|
||||||
|
TipoOperacion: TipoOperacion
|
||||||
|
EmisorID: uint
|
||||||
|
ReceptorID: uint
|
||||||
|
AlmacenOrigenID *uint
|
||||||
|
AlmacenOrigen *Almacen
|
||||||
|
Detalles: RemitoDetalle[]
|
||||||
|
}
|
||||||
|
|
||||||
|
Remito <|-- Comprobante
|
||||||
|
'Remito "1" --> "0..1" Proveedor : Emisor
|
||||||
|
|
||||||
|
|
||||||
|
class "Almacen" {
|
||||||
|
ID: string
|
||||||
|
Ubicacion: string
|
||||||
|
Stocks: []Stock
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class "Comprobante" {
|
||||||
|
Estado: string
|
||||||
|
Total: float64
|
||||||
|
ResponsableID: uint
|
||||||
|
Responsable: Usuario
|
||||||
|
}
|
||||||
|
|
||||||
|
class "RemitoDetalle" {
|
||||||
|
ProductoID: uint
|
||||||
|
CantidadEsperada: float64
|
||||||
|
CantidadRecibida: float64
|
||||||
|
UnidadMedida: string
|
||||||
|
Observacion: string
|
||||||
|
}
|
||||||
|
|
||||||
|
enum "TipoOperacion" {
|
||||||
|
COMPRA
|
||||||
|
VENTA
|
||||||
|
INTERNO
|
||||||
|
}
|
||||||
|
|
||||||
|
class "Reserva" {
|
||||||
|
RepuestoID: uint
|
||||||
|
Repuesto: Repuesto
|
||||||
|
AlmacenID: uint
|
||||||
|
Almacen: Almacen
|
||||||
|
Cantidad: float64
|
||||||
|
Estado: EstadoReserva
|
||||||
|
ClienteID: uint
|
||||||
|
Cliente: Cliente
|
||||||
|
FechaVencimiento: Time
|
||||||
|
}
|
||||||
|
|
||||||
|
enum EstadoReserva{
|
||||||
|
ACTIVA
|
||||||
|
VENCIDA
|
||||||
|
LIBERADA
|
||||||
|
CONSUMIDA
|
||||||
|
}
|
||||||
|
|
||||||
|
class "Stock" {
|
||||||
|
RepuestoID: uint64
|
||||||
|
Cantidad: uint
|
||||||
|
CantidadReservada: uint
|
||||||
|
Repuesto: Repuesto
|
||||||
|
Observacion: string
|
||||||
|
Movimientos: []MovimientosStock
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class "MovimientosStock" {
|
||||||
|
Fecha: Time
|
||||||
|
Tipo: string
|
||||||
|
Cantidad: float64
|
||||||
|
UsuarioID: uint
|
||||||
|
}
|
||||||
|
|
||||||
|
class "Repuesto"{
|
||||||
|
Nombre: string
|
||||||
|
Precio: float64
|
||||||
|
StockMinimo: int64
|
||||||
|
Descripcion: string
|
||||||
|
MarcaID: uint
|
||||||
|
Marca: Marca
|
||||||
|
Aliases: []string
|
||||||
|
Stocks: []Stock
|
||||||
|
}
|
||||||
|
|
||||||
|
class "Marca" {
|
||||||
|
Nombre: string
|
||||||
|
Repuestos: []Repuesto
|
||||||
|
}
|
||||||
|
|
||||||
|
class "Cliente" {
|
||||||
|
Nombre: string
|
||||||
|
Cuit: string
|
||||||
|
Email: string?
|
||||||
|
Facturas: []Factura
|
||||||
|
Recibos: []Recibo
|
||||||
|
}
|
||||||
|
|
||||||
|
note right of Remito
|
||||||
|
,**Emisor → Receptor según TipoOperacion**
|
||||||
|
INTERNO: Almacén → Almacén
|
||||||
|
COMPRA: Proveedor → Almacén
|
||||||
|
VENTA: Almacén → Cliente
|
||||||
|
end note
|
||||||
|
|
||||||
|
Marca "1" --> "1..*" Repuesto
|
||||||
|
Repuesto "1" o--> "0..*" Stock
|
||||||
|
Stock "1" *--> "1..*" MovimientosStock
|
||||||
|
|
||||||
|
Reserva "0..*" --> "1" Repuesto
|
||||||
|
Reserva "0..*" --> "1" Almacen
|
||||||
|
Reserva --> EstadoReserva
|
||||||
|
|
||||||
|
Remito "1" *--> "1..*" RemitoDetalle
|
||||||
|
Remito "1" --> "0..2" Almacen
|
||||||
|
|
||||||
|
|
||||||
|
Remito "1" --> "0..1" Cliente : Receptor
|
||||||
|
Remito --> TipoOperacion
|
||||||
|
|
||||||
|
Almacen "1" --> "0..*" Stock
|
||||||
|
|
||||||
|
|
||||||
|
gorm.Model --|> Comprobante
|
||||||
|
gorm.Model --|> Reserva
|
||||||
|
gorm.Model --|> Stock
|
||||||
|
gorm.Model --|> Marca
|
||||||
|
gorm.Model --|> Cliente
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+RESULTS:
|
||||||
|
[[file:./D-DOM-STOCK.png]]
|
||||||
|
|
||||||
|
|
||||||
|
* Prototipo
|
||||||
|
[[./flow1.png]]
|
||||||
|
|
||||||
|
* Arquitectura
|
||||||
|
Consiste de la arquitectura de toda la solucion no solo el cu.
|
||||||
|
#+begin_export html
|
||||||
|
<pre>
|
||||||
|
[Usuario] -usa-> [Sistema Repuestera]
|
||||||
|
|-Consultas-> [Mysql]
|
||||||
|
|-Almacen Imagenes-> [minIO]
|
||||||
|
|-[Avisos]
|
||||||
|
|-Emails-> [Servicio emails]
|
||||||
|
|-Webhook-> [Servicio webhooks]
|
||||||
|
</pre>
|
||||||
|
#+end_export
|
||||||
|
|
||||||
|
** Actores Externos
|
||||||
|
- Usuario\\
|
||||||
|
Persona que opera el Sistema, (vendedor, operador de elmacen,
|
||||||
|
contador).
|
||||||
|
|
||||||
|
- Mysql\\
|
||||||
|
Base de datos persistente.
|
||||||
|
|
||||||
|
- minIO\\
|
||||||
|
almacenamiento de blobs
|
||||||
|
|
||||||
|
- Avisos\\
|
||||||
|
Servicio para enviar emails y webhooks. Notificando eventos del
|
||||||
|
sistema
|
||||||
|
|
||||||
|
** Contenedores
|
||||||
|
#+begin_export html
|
||||||
|
<pre>
|
||||||
|
[Navegador Web]
|
||||||
|
|
|
||||||
|
v
|
||||||
|
[Servidor Repuestera]
|
||||||
|
|-[Nginx - Reverse Proxy]
|
||||||
|
|-[FrontEnd / interfaz web (/)]
|
||||||
|
|-[Almacenamiento blobs]
|
||||||
|
|-[Servicio Integracion Externa (/avisos)]
|
||||||
|
|-[Backend/logica de negocio (/api)]
|
||||||
|
|-[ORM]
|
||||||
|
|
|
||||||
|
v
|
||||||
|
[Mysql]
|
||||||
|
</pre>
|
||||||
|
#+end_export
|
||||||
|
|
||||||
|
** Componentes principales
|
||||||
|
| Componente | Descripcion | Tecnologia |
|
||||||
|
|-----------------------------+---------------------------------+------------------------------------|
|
||||||
|
| Navegador web | Interfaz de usuario | Navegador web |
|
||||||
|
| Servidor Repuestera | Aloja los servicios | Docker Compose |
|
||||||
|
| Nginx - Reverse Proxy | Enruta las peticiones | Nginx (C) |
|
||||||
|
| Backend / logica de negocio | Programa Principal | Go+gin framework |
|
||||||
|
| Almacenamientoi blobs | Almacen de imagenes de facturas | minIO |
|
||||||
|
| Frontend / Interfaz Web | Interfaz Web (ssr+spa) | Sveltekithtml, css, js + templates |
|
||||||
|
| Servicio Integracion Ext. | Enviar Avisos smtp/webhook | Scala |
|
||||||
|
| ORM | Abstracción de datos | Go |
|
||||||
|
| Mysql | Base de datos | Mysql (C, C++) |
|
||||||
|
|
||||||
|
[[./D-ARQ-001.png]]
|
||||||
|
[[./D-ARQ-002.png]]
|
||||||
Reference in new issue
Block a user