Private
Public Access
un par de cambios hechos con cosas que vi que tenia mal
This commit is contained in:
1 parent
61ca620c8e
commit
7a61f35682
6 files changed
+11
-300
No files matched your search
@@ -23,7 +23,7 @@ package "Capa 2: Servidor de Aplicacion" {
|
|||||||
node "Svelte Framework\n(JS + Templates)" as SV
|
node "Svelte Framework\n(JS + Templates)" as SV
|
||||||
node "Static Assets\n(JS, CSS, imagenes)" as Static
|
node "Static Assets\n(JS, CSS, imagenes)" as Static
|
||||||
node "Carbon Design Components" as Componentes
|
node "Carbon Design Components" as Componentes
|
||||||
database "Views, Form, Pages, Tables, Search" as Views
|
database "Views, Form,\nPages, Tables, Search" as Views
|
||||||
}
|
}
|
||||||
|
|
||||||
Browser --> Static : descarga assets
|
Browser --> Static : descarga assets
|
||||||
@@ -38,23 +38,21 @@ package "Capa 2: Servidor de Aplicacion" {
|
|||||||
- Endpoint a la pagina (/)
|
- Endpoint a la pagina (/)
|
||||||
- Endpoint a servicio smtp/webhook (/avisos)
|
- Endpoint a servicio smtp/webhook (/avisos)
|
||||||
end note
|
end note
|
||||||
Router --> SV : Proxy al front
|
Router -d-> SV : Proxy al front
|
||||||
Browser --> Router : Todas las requests
|
Browser -d-> Router : Todas las requests
|
||||||
}
|
}
|
||||||
|
|
||||||
package "Capa 2.1.4: Controllers" {
|
package "Capa 2.1.4: Controllers" {
|
||||||
|
|
||||||
|
|
||||||
node "Controllers (GO) /back/src/controllers/**/*.go" as Controllers
|
node "Controllers (GO) /back/src/controllers/**/*.go" as Controllers
|
||||||
Router --> Controllers : Proxy a la api
|
Router -d-> Controllers : Proxy a la api
|
||||||
package "DTOs (GO) /back/src/dtos/**/*.go" as DTOs {
|
package "DTOs (GO) /back/src/dtos/**/*.go" as DTOs {
|
||||||
node "Request DTOs" as DTOReq
|
node "DTO" as DTOReq
|
||||||
node "Response DTOs" as DTORes
|
|
||||||
node "Builders" as Builders
|
node "Builders" as Builders
|
||||||
Builders --> DTOReq
|
Builders --> DTOReq
|
||||||
Builders --> DTORes
|
|
||||||
}
|
}
|
||||||
Controllers --> DTOs
|
Controllers --> Builders
|
||||||
}
|
}
|
||||||
|
|
||||||
package "Capa 2.1.3: Logica de Negocio" {
|
package "Capa 2.1.3: Logica de Negocio" {
|
||||||
@@ -86,7 +84,7 @@ package "Servicios Externos" as EXT{
|
|||||||
cloud "Sistema Externo Webhook" as WEBHOOK
|
cloud "Sistema Externo Webhook" as WEBHOOK
|
||||||
}
|
}
|
||||||
|
|
||||||
II --> EXT : SMTP / HTTP POST
|
II -l-> EXT : SMTP / HTTP POST
|
||||||
Router --> II : Expone Endpoints
|
Router --> II : Expone Endpoints
|
||||||
Controllers -> II : Consume integraciones
|
Controllers -> II : Consume integraciones
|
||||||
@enduml
|
@enduml
|
||||||
|
|||||||
@@ -9,43 +9,8 @@ title SAP-TFI-2026 — Diagrama de Dominio (iteracion 1)
|
|||||||
' skinparam linetype ortho
|
' 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
|
' note right of CBT
|
||||||
@@ -56,15 +21,6 @@ Responsable: Usuario
|
|||||||
' end note
|
' end note
|
||||||
'/
|
'/
|
||||||
|
|
||||||
class "Remito" as RMT {
|
|
||||||
FechaEmision: time.Time
|
|
||||||
TipoOperacion: TipoOperacion
|
|
||||||
EmisorID: uint
|
|
||||||
ReceptorID: uint
|
|
||||||
AlmacenOrigenID *uint
|
|
||||||
AlmacenOrigen *Almacen
|
|
||||||
Detalles: RemitoDetalle[]
|
|
||||||
}
|
|
||||||
|
|
||||||
Remito <|-- Comprobante
|
Remito <|-- Comprobante
|
||||||
Remito "*" --> "1" TIO
|
Remito "*" --> "1" TIO
|
||||||
@@ -73,13 +29,6 @@ Remito "1" --> "0..2" Almacen
|
|||||||
Remito "1" --> "0..1" Cliente : Receptor
|
Remito "1" --> "0..1" Cliente : Receptor
|
||||||
Remito "1" --> "0..1" Proveedor : Emisor
|
Remito "1" --> "0..1" Proveedor : Emisor
|
||||||
|
|
||||||
class "RemitoDetalle" as DRMT {
|
|
||||||
ProductoID: uint
|
|
||||||
CantidadEsperada: float64
|
|
||||||
CantidadRecibida: float64
|
|
||||||
UnidadMedida: string
|
|
||||||
Observacion: string
|
|
||||||
}
|
|
||||||
|
|
||||||
enum "TipoOperacion" as TIO {
|
enum "TipoOperacion" as TIO {
|
||||||
COMPRA
|
COMPRA
|
||||||
@@ -87,13 +36,6 @@ VENTA
|
|||||||
INTERNO
|
INTERNO
|
||||||
}
|
}
|
||||||
|
|
||||||
class "Descuento" as DS {
|
|
||||||
Nombre: string
|
|
||||||
Descripcion: string
|
|
||||||
Tipo: TipoDescuento
|
|
||||||
Valor: float64
|
|
||||||
Activo: bool
|
|
||||||
}
|
|
||||||
|
|
||||||
Descuento "0..*" --> "1" TipoDescuento
|
Descuento "0..*" --> "1" TipoDescuento
|
||||||
|
|
||||||
@@ -102,170 +44,47 @@ PORCENTAJE
|
|||||||
FIJO
|
FIJO
|
||||||
}
|
}
|
||||||
|
|
||||||
class "Almacen" as A {
|
|
||||||
ID: string
|
|
||||||
Ubicacion: string
|
|
||||||
Stocks: []Stock
|
|
||||||
}
|
|
||||||
|
|
||||||
Almacen "1" *--> "0..*" 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..*" Factura
|
||||||
Cliente "1" --> "0..*" Recibo
|
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" --> "0..1" Recibo
|
||||||
Factura "1" *--> "1..*" FacturaDetalle
|
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" Repuesto
|
||||||
FacturaDetalle "1" --> "1" Descuento
|
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
|
NotaCredito "0..1" --> "1" Factura
|
||||||
|
|
||||||
|
|
||||||
class "NotaDebito" as ND {
|
|
||||||
Motivo: string
|
|
||||||
FacturaOrigenID: uint
|
|
||||||
FacturaOrigen: Factura
|
|
||||||
}
|
|
||||||
|
|
||||||
NotaDebito "0..1" --> "1" Factura
|
NotaDebito "0..1" --> "1" Factura
|
||||||
|
|
||||||
|
|
||||||
class "Devolucion" as DV {
|
|
||||||
Motivo: string
|
|
||||||
FacturaOrigenID: uint
|
|
||||||
FacturaOrigen: Factura
|
|
||||||
Detalles: []DevolucionDetalle
|
|
||||||
}
|
|
||||||
|
|
||||||
Devolucion <|-- Comprobante
|
Devolucion <|-- Comprobante
|
||||||
Devolucion "0..1" <--o "1" Factura
|
Devolucion "0..1" <--o "1" Factura
|
||||||
|
|
||||||
|
|
||||||
class "DevolucionDetalle" as DVD {
|
|
||||||
RepuestoID: uint64
|
|
||||||
Cantidad: uint
|
|
||||||
PrecioUnitario: float64
|
|
||||||
Subtotal: float64
|
|
||||||
}
|
|
||||||
|
|
||||||
DevolucionDetalle "1" --> "1" Repuesto
|
DevolucionDetalle "1" --> "1" Repuesto
|
||||||
|
|
||||||
|
|
||||||
class "OrdenCompra" as O {
|
|
||||||
ProveedorId: uint
|
|
||||||
Proveedor: Proveedor
|
|
||||||
Detalles: []OrdenCompraDetalle
|
|
||||||
}
|
|
||||||
|
|
||||||
OrdenCompra "1" *--> "1..*" OrdenCompraDetalle
|
OrdenCompra "1" *--> "1..*" OrdenCompraDetalle
|
||||||
OrdenCompra "1" --> "1" Proveedor
|
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
|
Proveedor "1" --> "0..*" Factura
|
||||||
|
|
||||||
|
|
||||||
class "OrdenCompraDetalle" as OD {
|
|
||||||
RepuestoID: uint64
|
|
||||||
Cantidad: uint
|
|
||||||
PrecioUnitario: float64
|
|
||||||
Subtotal: float64
|
|
||||||
}
|
|
||||||
|
|
||||||
OrdenCompraDetalle "1" --> "1" Repuesto
|
OrdenCompraDetalle "1" --> "1" Repuesto
|
||||||
|
|
||||||
|
|
||||||
class "Recibo" as RC {
|
|
||||||
ResponsableID: uint
|
|
||||||
Pagos: []Pago
|
|
||||||
}
|
|
||||||
|
|
||||||
Recibo "1" *--> "1..*" 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 "1" <-- "1" Stock
|
||||||
Repuesto "0..*" --> "1" Marca
|
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
|
Reserva "0..*" --> "1" Cliente
|
||||||
Repuesto "1..*" --> "1" Reserva
|
Repuesto "1..*" --> "1" Reserva
|
||||||
Almacen "1" --> "0..*" Reserva
|
Almacen "1" --> "0..*" Reserva
|
||||||
@@ -278,56 +97,11 @@ liberada
|
|||||||
consumida
|
consumida
|
||||||
}
|
}
|
||||||
|
|
||||||
class "Stock" as S {
|
|
||||||
RepuestoID: uint64
|
|
||||||
Cantidad: uint
|
|
||||||
CantidadReservada: uint
|
|
||||||
Repuesto: Repuesto
|
|
||||||
Observacion: string
|
|
||||||
Movimientos: MovimientosStock[]
|
|
||||||
}
|
|
||||||
|
|
||||||
Stock "1" *--> "1..*" 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
|
CuentaContable "1" <-- "1..*" MovimientoContable
|
||||||
AsientoContable "1" --> "1..*" MovimientoContable
|
AsientoContable "1" --> "1..*" MovimientoContable
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' Relación polimórfica con los comprobantes
|
' Relación polimórfica con los comprobantes
|
||||||
AsientoContable "1..*" --> "1" Comprobante
|
AsientoContable "1..*" --> "1" Comprobante
|
||||||
/'
|
/'
|
||||||
@@ -347,70 +121,10 @@ Comprobante --|> NotaDebito
|
|||||||
Comprobante --|> OrdenCompra
|
Comprobante --|> OrdenCompra
|
||||||
Comprobante --|> Devolucion
|
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
|
|
||||||
Imagen: string
|
|
||||||
CreatedAt: Time
|
|
||||||
UpdatedAt: Time
|
|
||||||
DeletedAt: Time
|
|
||||||
}
|
|
||||||
|
|
||||||
class "Grupo" as GRR {
|
|
||||||
ID: uint
|
|
||||||
Nombre: string
|
|
||||||
Descripcion: string
|
|
||||||
Imagen: 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 "1" *--> "1..*" LogDetalle
|
||||||
Logs "0..*" --> "1" Usuario
|
Logs "0..*" --> "1" Usuario
|
||||||
|
|
||||||
Grupo ..|> IPermisosComponent
|
|
||||||
Grupo "1" o--> "0..*" IPermisosComponent
|
|
||||||
Permiso ..|> IPermisosComponent
|
|
||||||
|
|
||||||
Usuario "0..*" --> "0..*" Grupo
|
Usuario "0..*" --> "0..*" Grupo
|
||||||
Comprobante "0..*" --> "1" Usuario
|
Comprobante "0..*" --> "1" Usuario
|
||||||
|
|
||||||
@@ -418,4 +132,3 @@ Comprobante "0..*" --> "1" Usuario
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
[[file:../png/D-CLA-DOM-001.png]]
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user