Private
Public Access
docs: correjidos campos
This commit is contained in:
1 parent
009a32fcf0
commit
88361d6939
3 files changed
+31
-238
No files matched your search
@@ -5,7 +5,10 @@
|
|||||||
|
|
||||||
title SAP-TFI-2026 — Diagrama de Dominio (iteracion 1)
|
title SAP-TFI-2026 — Diagrama de Dominio (iteracion 1)
|
||||||
skinparam classAttributeIconSize 0
|
skinparam classAttributeIconSize 0
|
||||||
skinparam linetype polyline
|
hide circle
|
||||||
|
/'
|
||||||
|
' skinparam linetype ortho
|
||||||
|
'/
|
||||||
|
|
||||||
class "gorm.Model" {
|
class "gorm.Model" {
|
||||||
ID: uint
|
ID: uint
|
||||||
@@ -19,6 +22,7 @@ Las siguientes entidades heredan de gorm.Model
|
|||||||
|
|
||||||
- Cliente
|
- Cliente
|
||||||
- FormaPago
|
- FormaPago
|
||||||
|
- Comprobante
|
||||||
- Factura
|
- Factura
|
||||||
- NotaCredito
|
- NotaCredito
|
||||||
- NotaDebito
|
- NotaDebito
|
||||||
@@ -34,7 +38,7 @@ Las siguientes entidades heredan de gorm.Model
|
|||||||
end note
|
end note
|
||||||
|
|
||||||
|
|
||||||
class "Comprobante" as CBT <<embedded>> {
|
class "Comprobante" as CBT {
|
||||||
Numero: string
|
Numero: string
|
||||||
Estado: string
|
Estado: string
|
||||||
Total: float64
|
Total: float64
|
||||||
@@ -42,12 +46,14 @@ ResponsableID: uint
|
|||||||
Responsable: Usuario
|
Responsable: Usuario
|
||||||
}
|
}
|
||||||
|
|
||||||
note right of CBT
|
/'
|
||||||
Struct embebido utilizado para
|
' note right of CBT
|
||||||
componer los distintos comprobantes.
|
' Struct embebido utilizado para
|
||||||
|
' componer los distintos comprobantes.
|
||||||
No posee ID ni tabla propia.
|
'
|
||||||
end note
|
' No posee ID ni tabla propia.
|
||||||
|
' end note
|
||||||
|
'/
|
||||||
|
|
||||||
|
|
||||||
class "Almacen" as A {
|
class "Almacen" as A {
|
||||||
@@ -70,16 +76,15 @@ Cliente "1" --> "0..*" Recibo
|
|||||||
|
|
||||||
|
|
||||||
class "Factura" as F {
|
class "Factura" as F {
|
||||||
ID: uint
|
|
||||||
Numero: string
|
|
||||||
Estado: string
|
|
||||||
Total: float64
|
|
||||||
ResponsableID: uint
|
|
||||||
ClienteID: uint64
|
ClienteID: uint64
|
||||||
Cliente: Cliente
|
Cliente: Cliente
|
||||||
|
ReciboID: uint
|
||||||
|
Recibo: Recibo
|
||||||
|
Avisado: bool
|
||||||
Detalles: []FacturaDetalle
|
Detalles: []FacturaDetalle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Factura "1" --> "0..1" Recibo
|
||||||
Factura "1" --> "1..*" FacturaDetalle
|
Factura "1" --> "1..*" FacturaDetalle
|
||||||
|
|
||||||
|
|
||||||
@@ -103,15 +108,9 @@ Nombre: string
|
|||||||
Repuestos: []Repuesto
|
Repuestos: []Repuesto
|
||||||
}
|
}
|
||||||
|
|
||||||
Marca "1" <-- "0..*" Repuesto
|
|
||||||
|
|
||||||
|
|
||||||
class "NotaCredito" as NC {
|
class "NotaCredito" as NC {
|
||||||
ID: uint
|
|
||||||
Numero: string
|
|
||||||
Estado: string
|
|
||||||
Total: float64
|
|
||||||
ResponsableID: uint
|
|
||||||
Motivo: string
|
Motivo: string
|
||||||
FacturaOrigenID: uint
|
FacturaOrigenID: uint
|
||||||
FacturaOrigen: Factura
|
FacturaOrigen: Factura
|
||||||
@@ -121,11 +120,6 @@ NotaCredito "1" --> "1" Factura
|
|||||||
|
|
||||||
|
|
||||||
class "NotaDebito" as ND {
|
class "NotaDebito" as ND {
|
||||||
ID: uint
|
|
||||||
Numero: string
|
|
||||||
Estado: string
|
|
||||||
Total: float64
|
|
||||||
ResponsableID: uint
|
|
||||||
Motivo: string
|
Motivo: string
|
||||||
FacturaOrigenID: uint
|
FacturaOrigenID: uint
|
||||||
FacturaOrigen: Factura
|
FacturaOrigen: Factura
|
||||||
@@ -135,11 +129,6 @@ NotaDebito "1" --> "1" Factura
|
|||||||
|
|
||||||
|
|
||||||
class "OrdenCompra" as O {
|
class "OrdenCompra" as O {
|
||||||
ID: uint
|
|
||||||
Numero: string
|
|
||||||
Estado: string
|
|
||||||
Total: float64
|
|
||||||
ResponsableID: uint
|
|
||||||
ProveedorId: uint
|
ProveedorId: uint
|
||||||
Proveedor: Proveedor
|
Proveedor: Proveedor
|
||||||
Detalles: []OrdenCompraDetalle
|
Detalles: []OrdenCompraDetalle
|
||||||
@@ -175,10 +164,6 @@ OrdenCompraDetalle "1" --> "1" Repuesto
|
|||||||
|
|
||||||
|
|
||||||
class "Recibo" as RC {
|
class "Recibo" as RC {
|
||||||
ID: uint
|
|
||||||
Numero: string
|
|
||||||
Estado: string
|
|
||||||
Total: float64
|
|
||||||
ResponsableID: uint
|
ResponsableID: uint
|
||||||
Pagos: []Pago
|
Pagos: []Pago
|
||||||
}
|
}
|
||||||
@@ -241,19 +226,22 @@ AsientoContable "1" --> "1..*" MovimientoContable
|
|||||||
|
|
||||||
|
|
||||||
' Relación polimórfica con los comprobantes
|
' Relación polimórfica con los comprobantes
|
||||||
AsientoContable ..> Factura : Tipo + ID
|
AsientoContable "1..*" --> "1" Comprobante : Tipo + ID
|
||||||
AsientoContable ..> Recibo : Tipo + ID
|
/'
|
||||||
AsientoContable ..> NotaCredito : Tipo + ID
|
' AsientoContable ..> Factura : Tipo + ID
|
||||||
AsientoContable ..> NotaDebito : Tipo + ID
|
' AsientoContable ..> Recibo : Tipo + ID
|
||||||
AsientoContable ..> OrdenCompra : Tipo + ID
|
' AsientoContable ..> NotaCredito : Tipo + ID
|
||||||
|
' AsientoContable ..> NotaDebito : Tipo + ID
|
||||||
|
' AsientoContable ..> OrdenCompra : Tipo + ID
|
||||||
|
'/
|
||||||
|
|
||||||
|
|
||||||
' Composición conceptual de Comprobante
|
' Composición conceptual de Comprobante
|
||||||
CBT ..> Factura : embebido
|
Comprobante --|> Factura
|
||||||
CBT ..> Recibo : embebido
|
Comprobante --|> Recibo
|
||||||
CBT ..> NotaCredito : embebido
|
Comprobante --|> NotaCredito
|
||||||
CBT ..> NotaDebito : embebido
|
Comprobante --|> NotaDebito
|
||||||
CBT ..> OrdenCompra : embebido
|
Comprobante --|> OrdenCompra
|
||||||
|
|
||||||
|
|
||||||
@enduml
|
@enduml
|
||||||
@@ -261,198 +249,3 @@ CBT ..> OrdenCompra : embebido
|
|||||||
|
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
[[file:../png/D-CLA-DOM-001.png]]
|
[[file:../png/D-CLA-DOM-001.png]]
|
||||||
|
|
||||||
* D-CLA-DOM-002
|
|
||||||
#+begin_src plantuml :file ../png/D-CLA-DOM-002.png
|
|
||||||
@startuml D-CLA-DOM-002
|
|
||||||
|
|
||||||
title SAP-TFI-2026 — Diagrama de Dominio (iteracion 1 Tiene la clase Comprobante)
|
|
||||||
skinparam classAttributeIconSize 0
|
|
||||||
skinparam linetype polyline
|
|
||||||
|
|
||||||
class "gorm.Model" {
|
|
||||||
ID: uint
|
|
||||||
CreatedAt: Time
|
|
||||||
UpdatedAt: Time
|
|
||||||
DeletedAt: Time
|
|
||||||
}
|
|
||||||
note top of "gorm.Model"
|
|
||||||
Las siguientes entidades heredan de gorm.Model
|
|
||||||
|
|
||||||
- Cliente --|> gorm.Model
|
|
||||||
- FormaPago --|> gorm.Model
|
|
||||||
- Comprobante --|> gorm.Model
|
|
||||||
- Marca --|> gorm.Model
|
|
||||||
- Pago --|> gorm.Model
|
|
||||||
- Proveedor --|> gorm.Model
|
|
||||||
- AsientoContable --|> gorm.Model
|
|
||||||
- MovimientoContable --|> gorm.Model
|
|
||||||
- CuentaContable --|> gorm.Model
|
|
||||||
end note
|
|
||||||
|
|
||||||
class "Almacen" as A {
|
|
||||||
ID: string
|
|
||||||
Ubicacion: string
|
|
||||||
Stocks: []Stock
|
|
||||||
}
|
|
||||||
|
|
||||||
Almacen "1" --> "*" Stock
|
|
||||||
|
|
||||||
class "Cliente" as CC {
|
|
||||||
Nombre: string
|
|
||||||
Facturas: []Factura
|
|
||||||
Recibos: []Recibo
|
|
||||||
}
|
|
||||||
Cliente "1" <-- "0..*" Factura
|
|
||||||
Cliente "1" <-- "0..*" Recibo
|
|
||||||
|
|
||||||
class "Comprobante" as CBT {
|
|
||||||
Numero: string
|
|
||||||
Estado: string
|
|
||||||
Total: float64
|
|
||||||
ResponsableID: uint
|
|
||||||
Responsable: Usuario
|
|
||||||
}
|
|
||||||
Comprobante "0..*" --> "1" Usuario
|
|
||||||
|
|
||||||
class "Factura" as F {
|
|
||||||
ClienteID uint64
|
|
||||||
Cliente Cliente
|
|
||||||
Detalles: []FacturaDetalle
|
|
||||||
}
|
|
||||||
|
|
||||||
Factura "1" --> "1..*" FacturaDetalle
|
|
||||||
Factura --|> Comprobante
|
|
||||||
|
|
||||||
|
|
||||||
class "FacturaDetalle" as FD {
|
|
||||||
RepuestoID: uint64
|
|
||||||
Cantidad: uint
|
|
||||||
PrecioUnitario: float64
|
|
||||||
Subtotal: float64
|
|
||||||
}
|
|
||||||
|
|
||||||
FacturaDetalle "1" --> "1" Repuesto
|
|
||||||
|
|
||||||
class "FormaPago" as FPF {
|
|
||||||
Descripcion: string
|
|
||||||
}
|
|
||||||
|
|
||||||
class "Marca" as M {
|
|
||||||
Nombre: string
|
|
||||||
Repuestos: []Repuesto
|
|
||||||
}
|
|
||||||
Marca "1" <-- "0..*" Repuesto
|
|
||||||
|
|
||||||
class "NotaCredito" as NC {
|
|
||||||
Motivo: string
|
|
||||||
FacturaOrigenID: uint
|
|
||||||
FacturaOrigen: Factura
|
|
||||||
}
|
|
||||||
NotaCredito --|> Comprobante
|
|
||||||
NotaCredito "1" --> "1" Factura
|
|
||||||
|
|
||||||
class "NotaDebito" as NC {
|
|
||||||
Motivo: string
|
|
||||||
FacturaOrigenID: uint
|
|
||||||
FacturaOrigen: Factura
|
|
||||||
}
|
|
||||||
NotaDebito --|> Comprobante
|
|
||||||
NotaDebito "1" --> "1" Factura
|
|
||||||
|
|
||||||
class "OrdenCompra" as O {
|
|
||||||
ProveedorId: uint
|
|
||||||
Proveedor: Proveedor
|
|
||||||
Detalles: []OrdenCompraDetalle
|
|
||||||
}
|
|
||||||
|
|
||||||
OrdenCompra "1" --> "1..*" OrdenCompraDetalle
|
|
||||||
OrdenCompra "1" --> "1" Proveedor
|
|
||||||
OrdenCompra --|> Comprobante
|
|
||||||
|
|
||||||
class "Pago" as PPP {
|
|
||||||
FormaDePagoID: uint
|
|
||||||
FormaDePago: FormaPago
|
|
||||||
Importe: float64
|
|
||||||
}
|
|
||||||
|
|
||||||
class "Proveedor" as PR {
|
|
||||||
Nombre: uint
|
|
||||||
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 {
|
|
||||||
Pagos: []Pago
|
|
||||||
}
|
|
||||||
Recibo "1" --> "0..1" Pago
|
|
||||||
Recibo --|> Comprobante
|
|
||||||
|
|
||||||
class "Repuesto" as R {
|
|
||||||
Nombre: string
|
|
||||||
Precio: float64
|
|
||||||
StockMinimo: int64
|
|
||||||
Descripcion: string
|
|
||||||
MarcaID: uint
|
|
||||||
Marca: Marca
|
|
||||||
Aliases: []string
|
|
||||||
Stocks: []Stock
|
|
||||||
}
|
|
||||||
Repuesto --|> Comprobante
|
|
||||||
Repuesto "1" <-- "1" Stock
|
|
||||||
Repuesto "0..*" --> "1" Marca
|
|
||||||
|
|
||||||
class "Stock" as S {
|
|
||||||
ID: uint64
|
|
||||||
RepuestoID: uint64
|
|
||||||
Cantidad: uint
|
|
||||||
Repuesto: Repuesto
|
|
||||||
}
|
|
||||||
|
|
||||||
package Contabilidad {
|
|
||||||
|
|
||||||
class "CuentaContable" as CC {
|
|
||||||
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
|
|
||||||
AsientoContable "1" ..> "1" Comprobante : Tipo + ID
|
|
||||||
|
|
||||||
|
|
||||||
@enduml
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+RESULTS:
|
|
||||||
[[file:../png/D-CLA-DOM-002.png]]
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 296 KiB After Width: | Height: | Size: 227 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 259 KiB |
Reference in new issue
Block a user