Private
Public Access
246 lines
5.2 KiB
Org Mode
246 lines
5.2 KiB
Org Mode
|
|
* D-CLA-DOM-001
|
|
#+begin_src plantuml :file ../png/D-CLA-DOM-001.png
|
|
@startuml D-CLA-DOM-001
|
|
|
|
title SAP-TFI-2026 — Diagrama de Dominio (iteracion 1)
|
|
skinparam classAttributeIconSize 0
|
|
|
|
class "Almacen" as A {
|
|
ID: string
|
|
Razon: string
|
|
Stock: []Stock
|
|
}
|
|
|
|
Almacen -- Stock
|
|
|
|
class "Factura" as F {
|
|
ID: uint64
|
|
UsuarioID: uint64
|
|
Fecha: time.Time
|
|
ClienteID uint64
|
|
Cliente Cliente
|
|
Total: float64
|
|
Detalles: []FacturaDetalle
|
|
ComprobanteID: uint64
|
|
Comprobante: Comprobante
|
|
Usuario: Usuario
|
|
}
|
|
|
|
Factura -- FacturaDetalle
|
|
Factura -- Comprobante
|
|
Factura -- Cliente
|
|
|
|
class "Cliente" as CL {
|
|
ID: uint
|
|
Nombre: uint
|
|
Facturas: []Factura
|
|
}
|
|
|
|
class "FacturaDetalle" as FD {
|
|
RepuestoID: uint64
|
|
Cantidad: uint
|
|
PrecioUnitario: float64
|
|
Subtotal: float64
|
|
}
|
|
|
|
FacturaDetalle -- Repuesto
|
|
|
|
class "Marca" as M {
|
|
ID: uint
|
|
Nombre: string
|
|
Repuestos: []Repuesto
|
|
CreatedAt: time.Time
|
|
UpdatedAt: time.Time
|
|
DeletedAt: gorm.DeletedAt
|
|
}
|
|
Marca -- Repuesto
|
|
|
|
class "OrdenCompra" as O {
|
|
ID: uint64
|
|
UsuarioID: uint64
|
|
Fecha: time.Time
|
|
Total: float64
|
|
Detalles: []OrdenCompraDetalle
|
|
Usuario: Usuario
|
|
ProveedorId: uint
|
|
Proveedor: Proveedor
|
|
ComprobanteID: uint64
|
|
Comprobante: Comprobante
|
|
}
|
|
|
|
OrdenCompra -- OrdenCompraDetalle
|
|
OrdenCompra -- Proveedor
|
|
OrdenCompra -- Comprobante
|
|
|
|
class "Proveedor" as PR {
|
|
ID: uint
|
|
Nombre: uint
|
|
Facturas: []Factura
|
|
}
|
|
|
|
class "OrdenCompraDetalle" as OD {
|
|
RepuestoID: uint64
|
|
Cantidad: uint
|
|
PrecioUnitario: float64
|
|
Subtotal: float64
|
|
}
|
|
|
|
OrdenCompraDetalle -- Repuesto
|
|
|
|
class "Repuesto" as R {
|
|
ID: uint64
|
|
Nombre: string
|
|
Precio: float64
|
|
StockMinimo: int64
|
|
Descripcion: string
|
|
MarcaID: string
|
|
Aliases: []string
|
|
Stocks: []Stock
|
|
CreatedAt: time.Time
|
|
UpdatedAt: time.Time
|
|
DeletedAt: gorm.DeletedAt
|
|
}
|
|
|
|
Repuesto -- Stock
|
|
|
|
class "Stock" as S {
|
|
ID: uint64
|
|
RepuestoID: uint64
|
|
CajonID: string
|
|
Cantidad: uint
|
|
Repuesto: Repuesto
|
|
Cajon: Cajon
|
|
}
|
|
|
|
package Contabilidad {
|
|
|
|
class "CuentaContable" as CC {
|
|
ID: uint
|
|
Codigo: string
|
|
Nombre: string
|
|
Tipo: TipoCuenta
|
|
Movimientos: []MovimientoContable
|
|
CreatedAt: time.Time
|
|
UpdatedAt: time.Time
|
|
DeletedAt: gorm.DeletedAt
|
|
}
|
|
|
|
class "AsientoContable" as AC {
|
|
ID: uint
|
|
Fecha: time.Time
|
|
Descripcion: string
|
|
ComprobanteID: uint
|
|
Movimientos: []MovimientoContable
|
|
CreatedAt: time.Time
|
|
UpdatedAt: time.Time
|
|
DeletedAt: gorm.DeletedAt
|
|
}
|
|
|
|
class "MovimientoContable" as MC {
|
|
ID: uint
|
|
AsientoID: uint
|
|
Asiento: AsientoContable
|
|
CuentaID: uint
|
|
Cuenta: CuentaContable
|
|
Debe: float64
|
|
Haber: float64
|
|
Descripcion: string
|
|
CreatedAt: time.Time
|
|
UpdatedAt: time.Time
|
|
DeletedAt: gorm.DeletedAt
|
|
}
|
|
class "Comprobante" as CB{
|
|
ID: uint
|
|
Tipo TipoComprobante
|
|
Numero string
|
|
Fecha time.Time
|
|
Estado EstadoComprobante
|
|
Total decimal.Decimal
|
|
AsientoID *uint
|
|
Asiento *AsientoContable
|
|
CreatedAt: time.Time
|
|
UpdatedAt: time.Time
|
|
DeletedAt: gorm.DeletedAt
|
|
}
|
|
|
|
class "Recibo" as RC {
|
|
ID: uint
|
|
Cliente: string
|
|
Fecha: time.Time
|
|
Total: float64
|
|
ComprobanteID: uint64
|
|
Comprobante: Comprobante
|
|
Pagos: []Pago
|
|
CreatedAt: time.Time
|
|
UpdatedAt: time.Time
|
|
DeletedAt: gorm.DeletedAt
|
|
}
|
|
|
|
class "OrdenPago" as OP {
|
|
ID: uint64
|
|
Proveedor: string
|
|
Fecha: time.Time
|
|
Total: float64
|
|
ComprobanteID: uint64
|
|
Comprobante: Comprobante
|
|
Pagos: []Pago
|
|
CreatedAt: time.Time
|
|
UpdatedAt: time.Time
|
|
DeletedAt: gorm.DeletedAt
|
|
}
|
|
|
|
class "NotaCredito" as NC {
|
|
ID: uint64
|
|
Motivo: string
|
|
Fecha: time.Time
|
|
Total: float64
|
|
ComprobanteID: uint64
|
|
Comprobante: Comprobante
|
|
ComprobanteOrigenID: uint64
|
|
CreatedAt: time.Time
|
|
UpdatedAt: time.Time
|
|
DeletedAt: gorm.DeletedAt
|
|
}
|
|
|
|
class "NotaDebito" as ND {
|
|
ID: uint64
|
|
Motivo: string
|
|
Fecha: time.Time
|
|
Total: float64
|
|
ComprobanteID: uint64
|
|
Comprobante: Comprobante
|
|
ComprobanteOrigenID: uint64
|
|
CreatedAt: time.Time
|
|
UpdatedAt: time.Time
|
|
DeletedAt: gorm.DeletedAt
|
|
}
|
|
|
|
class "Pago" as PG {
|
|
ID: uint64
|
|
FormaPago: FormaPago
|
|
Importe: float64
|
|
CreatedAt: time.Time
|
|
UpdatedAt: time.Time
|
|
DeletedAt: gorm.DeletedAt
|
|
}
|
|
|
|
}
|
|
|
|
CuentaContable -- MovimientoContable
|
|
AsientoContable -- MovimientoContable
|
|
Comprobante -- AsientoContable
|
|
|
|
Recibo -- Pago
|
|
OrdenPago -- Pago
|
|
|
|
Recibo -- Comprobante
|
|
OrdenPago -- Comprobante
|
|
NotaCredito -- Comprobante
|
|
NotaDebito -- Comprobante
|
|
@enduml
|
|
#+end_src
|
|
|
|
#+RESULTS:
|
|
[[file:../png/D-CLA-DOM-001.png]]
|