Files
Final_Das/DiagramaDeClases.org
2024-01-15 15:12:52 -03:00

280 lines
5.0 KiB
Org Mode

#+title: Diagrama De Clases
#+LATEX_HEADER: \usepackage{svg}
* Diagrama de clases con Repositorios
#+begin_src plantuml :file DiagramaConRepos.jpg
@startuml
skinparam groupInheritance 2
class RepositorioDetalles {
+ Añadir(detalle): bool
+ Modificar(detalle): bool
+ Eliminar(detalle): bool
}
RepositorioDetalles "1" *-- "0..*" Detalle
class RepositorioFacturas {
+ Añadir(Factura): bool
+ Modificar(Factura): bool
+ Eliminar(Factura): bool
}
RepositorioFacturas "1" *-- "0..*" Factura
class RepositorioVentas {
+ Añadir(Venta): bool
+ Modificar(Venta): bool
+ Eliminar(Venta): bool
}
RepositorioVentas "1" *-- "0..*" Venta
class RepositorioClientes {
+ Añadir(Cliente): bool
+ Modificar(Cliente): bool
+ Eliminar(Cliente): bool
}
RepositorioClientes "1" *-- "0..*" Cliente
class RepositorioProveedores {
+ Añadir(Proveedor): bool
+ Modificar(Proveedor): bool
+ Eliminar(Proveedor): bool
}
class RepositorioPresupuestos {
+ Añadir(Presupuesto): bool
+ Modificar(Presupuesto): bool
+ Eliminar(Presupuesto): bool
}
class RepositorioProductos <where T: Producto> {
+ Añadir(T): bool
+ Modificar(T): bool
+ Eliminar(T): bool
}
RepositorioProductos ..|> Repositorio: Implementa
RepositorioPresupuestos ..|> Repositorio: Implementa
RepositorioFacturas ..|> Repositorio: Implementa
RepositorioClientes ..|> Repositorio: Implementa
RepositorioVentas ..|> Repositorio: Implementa
RepositorioDetalles ..|> Repositorio: Implementa
RepositorioProveedores ..|> Repositorio: Implementa
interface Repositorio<T> {
+ Añadir(T): bool
+ Modificar(T): bool
+ Eliminar(T): bool
}
RepositorioProductos "1" *--> "0..*" Producto
class ProductoNoPercedero {
+ FechaElaboracion: DateTime
}
class ProductoPercedero {
+ FechaConsumoPreferente: DateTime
+ FechaVencimiento: DateTime
}
Producto <|-- ProductoNoPercedero
Producto <|-- ProductoPercedero
class Producto {
+ id: int
+ Nombre: string
+ Precio: double
- PresupuestosStock: List<Presupuestos>?
- Lotes: List<Lote>?
+ Habilitado: bool
+ MostrarPresupuestos(): ReadOnlyCollection<Presupuesto>
+ AñadirPresupuesto(Presupuesto): bool
+ EliminarPresupuesto(Presupuesto): bool
+ MostrarLotesDeProductos(): ReadOnlyCollection<Lote>
+ AñadirLotesStock(): bool
+ EliminarLotesStock(): bool
+ MostrarStockRemanente(): long
}
class Presupuesto {
+ id: int
+ Proveedor: Proveedor
+ Monto: int
+ Cantidad: int
}
RepositorioPresupuestos "1" *-- "0..*" Presupuesto
RepositorioProveedores "1" *-- "0..*" Proveedor
Presupuesto "0..*" <--* "1" Producto
Proveedor "1" *-- "0..*" Presupuesto
class Proveedor {
+ id: int
+ Nombre: string
+ RazónSocial: string
}
class Venta {
+ id: int
- Detalles: List<Detalle>
+ MostrarDetalles(): ReadOnlyCollection<Detalle>
+ AñadirDetalle(Detalle): void
+ ModificarDetalle(Detalle): void
+ EliminarDetalle(Detalle): void
}
Lote <-- Producto
class Lote {
+ id: int
+ Producto: Producto
+ CantidadDeProductos: long
}
class Detalle <where T: Producto>{
+ id: int
+ Cantidad: int
+ PrecioUnitario: double
+ Subtotal: double
+ Producto: T
}
class Cliente {
+ Cuit: string
+ Nombre: string
+ Apellido: string
+ Direccion: string
+ Correo: string
}
class Factura {
+ Total: double
+ Fecha: DateTime
+ Cliente: Cliente
+ Venta: Venta
}
Cliente <-- Factura
Factura --> Venta
Venta "1" *-- "1..*" Detalle
Detalle --> Producto
@enduml
#+end_src
#+RESULTS:
[[file:DiagramaConRepos.jpg]]
* Diagrama de clases sin Repositorios
#+begin_src plantuml :file DiagramaSinRepos.jpg
@startuml
skinparam groupInheritance 2
class ProductoNoPercedero {
+ FechaElaboracion: DateTime
}
class ProductoPercedero {
+ FechaConsumoPreferente: DateTime
+ FechaVencimiento: DateTime
}
Producto <|-- ProductoNoPercedero
Producto <|-- ProductoPercedero
class Producto {
+ id: int
+ Nombre: string
+ Precio: double
- PresupuestosStock: List<Presupuestos>?
- Lotes: List<Lote>?
+ Habilitado: bool
+ MostrarPresupuestos(): ReadOnlyCollection<Presupuesto>
+ AñadirPresupuesto(Presupuesto): bool
+ EliminarPresupuesto(Presupuesto): bool
+ MostrarLotesDeProductos(): ReadOnlyCollection<Lote>
+ AñadirLotesStock(): bool
+ EliminarLotesStock(): bool
+ MostrarStockRemanente(): long
}
class Presupuesto {
+ id: int
+ Proveedor: Proveedor
+ Monto: int
+ Cantidad: int
}
Presupuesto "0..*" <--* "1" Producto
Proveedor "1" *--> "1..*" Presupuesto
class Proveedor {
+ id: int
+ Nombre: string
+ RazónSocial: string
}
class Venta {
+ id: int
- Detalles: List<Detalle>
+ MostrarDetalles(): ReadOnlyCollection<Detalle>
+ AñadirDetalle(Detalle): void
+ ModificarDetalle(Detalle): void
+ EliminarDetalle(Detalle): void
}
class Detalle <where T: Producto>{
+ id: int
+ Cantidad: int
+ PrecioUnitario: double
+ Subtotal: double
+ Producto: T
}
class Cliente {
+ Cuit: string
+ Nombre: string
+ Apellido: string
+ Direccion: string
+ Correo: string
}
class Factura {
+ Total: double
+ Fecha: DateTime
+ Cliente: Cliente
+ Venta: Venta
}
Cliente <-- Factura
Factura --> Venta
Venta "1" *-- "1..*" Detalle
Detalle --> Producto
Producto --> Lote
class Lote {
+ id: int
+ Producto: Producto
+ CantidadDeProductos: long
}
@enduml
#+end_src
#+RESULTS:
[[file:DiagramaSinRepos.jpg]]