arreglado diagrama de clases

This commit is contained in:
2024-08-11 20:06:55 -03:00
parent b19399b64c
commit d11016fe50
4 changed files with 9 additions and 211 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

View File

@@ -1,207 +1,6 @@
#+title: Diagrama De Clases #+title: Diagrama De Clases
#+LATEX_HEADER: \usepackage{svg} #+LATEX_HEADER: \usepackage{svg}
* Diagrama de clases con Repositorios
#+begin_src plantuml :file DiagramaConRepos.jpg
@startuml
skinparam groupInheritance 2
class RepositorioLotes {
+ Añadir(detalle): bool
+ Modificar(detalle): bool
+ Eliminar(detalle): bool
}
RepositorioLotes "1" *-- "0..*" Lote
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
RepositorioLotes ..|> 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
enum EnvaseTipo {
Plastico,
Enlatado,
Cartón,
}
ProductoNoPercedero --> EnvaseTipo
class ProductoNoPercedero {
+ TipoDeEnvase: EnvaseTipo
}
class ProductoPercedero {
+ MesesHastaConsumoPreferente: int
+ MesesHastaVencimiento: int
}
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 <-- 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
+ FechaVencimiento: DateTime
}
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 * Diagrama de clases sin Repositorios
#+begin_src plantuml :file DiagramaSinRepos.jpg #+begin_src plantuml :file DiagramaSinRepos.jpg
@startuml @startuml
@@ -224,6 +23,7 @@ class Producto {
+ Precio: double + Precio: double
- Categorias: List<Categoria>? - Categorias: List<Categoria>?
+ Habilitado: bool + Habilitado: bool
+ EsPecedero: bool
+ MostrarCategoriasDeProductos(): ReadOnlyCollection<Categoria> + MostrarCategoriasDeProductos(): ReadOnlyCollection<Categoria>
+ AñadirCategoriasStock(): bool + AñadirCategoriasStock(): bool
@@ -248,7 +48,7 @@ class Presupuesto {
} }
class Proveedor { class Proveedor {
+ Id: int + Cuit: int
+ Nombre: string + Nombre: string
+ RazónSocial: string + RazónSocial: string
+ Habilitado: bool + Habilitado: bool
@@ -256,8 +56,7 @@ class Proveedor {
class DetalleFactura { class DetalleFactura {
+ IdFactura: int + IdFactura: int
+ PrecioUnitario: double + Subtotal(): double
+ Subtotal: double
} }
class Cliente { class Cliente {
@@ -266,6 +65,7 @@ class Cliente {
+ ApellIdo: string + ApellIdo: string
+ Direccion: string + Direccion: string
+ Correo: string + Correo: string
+ Habilitado: bool
} }
class Detalle <where T: Producto>{ class Detalle <where T: Producto>{
@@ -275,6 +75,7 @@ class Detalle <where T: Producto>{
} }
class Factura { class Factura {
+ Id: int
+ Total: double + Total: double
+ Fecha: DateTime + Fecha: DateTime
+ Cliente: Cliente + Cliente: Cliente
@@ -296,6 +97,7 @@ enum EnvaseTipo {
Plastico, Plastico,
Enlatado, Enlatado,
Cartón, Cartón,
NoTiene,
} }
class DetallePresupuesto { class DetallePresupuesto {
@@ -307,6 +109,7 @@ class OrdenDeCompra {
+ Id: int + Id: int
- Productos: List<DetalleOrdenDeCompra> - Productos: List<DetalleOrdenDeCompra>
+ Proveedor: Proveedor + Proveedor: Proveedor
+ Entregado: bool
+ MostrarDetalles(): ReadOnlyCollection<DetalleOrdenDeCompra> + MostrarDetalles(): ReadOnlyCollection<DetalleOrdenDeCompra>
+ AñadirDetalle(DetalleOrdenDeCompra): bool + AñadirDetalle(DetalleOrdenDeCompra): bool
@@ -316,6 +119,8 @@ class OrdenDeCompra {
class DetalleOrdenDeCompra { class DetalleOrdenDeCompra {
+ IdOrdenDeCompra: int + IdOrdenDeCompra: int
+ Presupuesto: Presupuesto
+ MontoCU: double
} }
class Remito { class Remito {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 KiB

After

Width:  |  Height:  |  Size: 186 KiB

View File

@@ -9,8 +9,6 @@ namespace Entidades
public string Apellido { get; set; } public string Apellido { get; set; }
public string Direccion { get; set; } public string Direccion { get; set; }
public string Correo { get; set; } public string Correo { get; set; }
[Browsable(false)]
public bool Habilitado { get; set; } public bool Habilitado { get; set; }
public string NombreCompleto public string NombreCompleto
@@ -18,10 +16,5 @@ namespace Entidades
get { return $"{Nombre} {Apellido}"; } get { return $"{Nombre} {Apellido}"; }
} }
// Sobreescribir ToString() para mostrar el nombre completo
public override string ToString()
{
return NombreCompleto;
}
} }
} }