diff --git a/Dockerfile b/Dockerfile
index be79cd9..48678f1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,9 +13,9 @@ COPY ["src/WebAPI/WebAPI.csproj", "src/WebAPI/"]
COPY ["src/Application/Application.csproj", "src/Application/"]
COPY ["src/Domain/Domain.csproj", "src/Domain/"]
COPY ["src/Infraestructure/Infraestructure.csproj", "src/Infraestructure/"]
-RUN dotnet restore "./src/WebAPI/WebAPI.csproj"
+RUN dotnet restore "/src/WebAPI/WebAPI.csproj"
COPY . .
-WORKDIR ./src/WebAPI
+WORKDIR /src/WebAPI
RUN dotnet build ./WebAPI.csproj -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
diff --git a/src/Infraestructure/DependencyInjection.cs b/src/Infraestructure/DependencyInjection.cs
index b2679b8..782c995 100644
--- a/src/Infraestructure/DependencyInjection.cs
+++ b/src/Infraestructure/DependencyInjection.cs
@@ -14,7 +14,7 @@ public static IServiceCollection AddInfraestructure(
this IServiceCollection services,
IConfiguration configuration)
{
- var connectionString = Environment.GetEnvironmentVariable("DATABASE_URL") ?? configuration.GetConnectionString("FreeASP");
+ var connectionString = Environment.GetEnvironmentVariable("DATABASE_URL") ?? configuration.GetConnectionString("AzureSQL");
Console.WriteLine(connectionString);
diff --git a/src/Infraestructure/Migrations/20240220231628_agrego-genero-empleado.Designer.cs b/src/Infraestructure/Migrations/20240220231628_agrego-genero-empleado.Designer.cs
deleted file mode 100644
index 3baed79..0000000
--- a/src/Infraestructure/Migrations/20240220231628_agrego-genero-empleado.Designer.cs
+++ /dev/null
@@ -1,959 +0,0 @@
-//
-using System;
-using Infraestructure.Data;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace Infraestructure.Migrations
-{
- [DbContext(typeof(TiendaContext))]
- [Migration("20240220231628_agrego-genero-empleado")]
- partial class agregogeneroempleado
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.2")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("Domain.Models.Articulo", b =>
- {
- b.Property("IdArticulo")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdArticulo"));
-
- b.Property("Codigo")
- .HasColumnType("int");
-
- b.Property("Costo")
- .HasPrecision(18, 2)
- .HasColumnType("decimal(18,2)");
-
- b.Property("Descripcion")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("IdCategoria")
- .HasColumnType("int");
-
- b.Property("IdMarca")
- .HasColumnType("int");
-
- b.Property("IdTipoTalle")
- .HasColumnType("int");
-
- b.Property("MargenGanancia")
- .HasColumnType("int");
-
- b.HasKey("IdArticulo");
-
- b.HasIndex("IdCategoria");
-
- b.HasIndex("IdMarca");
-
- b.HasIndex("IdTipoTalle");
-
- b.ToTable("Articulo", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.Categoria", b =>
- {
- b.Property("IdCategoria")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdCategoria"));
-
- b.Property("Descripcion")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdCategoria");
-
- b.ToTable("Categoria", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.Cliente", b =>
- {
- b.Property("IdCliente")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdCliente"));
-
- b.Property("Apellido")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Cuil")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Dni")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Domicilio")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Email")
- .HasColumnType("nvarchar(max)");
-
- b.Property("IdCondicionTributaria")
- .HasColumnType("int");
-
- b.Property("Nombre")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Telefono")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdCliente");
-
- b.HasIndex("IdCondicionTributaria");
-
- b.ToTable("Cliente", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Color", b =>
- {
- b.Property("IdColor")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdColor"));
-
- b.Property("Nombre")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdColor");
-
- b.ToTable("Color", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.Comprobante", b =>
- {
- b.Property("IdComprobante")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdComprobante"));
-
- b.Property("IdVenta")
- .HasColumnType("int");
-
- b.HasKey("IdComprobante");
-
- b.HasIndex("IdVenta")
- .IsUnique();
-
- b.ToTable("Comprobante", "Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.CondicionTributaria", b =>
- {
- b.Property("IdCondicionTributaria")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdCondicionTributaria"));
-
- b.Property("Descripcion")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("IdTipoDeComprobante")
- .HasColumnType("int");
-
- b.HasKey("IdCondicionTributaria");
-
- b.HasIndex("IdTipoDeComprobante");
-
- b.ToTable("CondicionTributaria", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Empleado", b =>
- {
- b.Property("IdEmpleado")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdEmpleado"));
-
- b.Property("Apellido")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Domicilio")
- .HasColumnType("nvarchar(max)");
-
- b.Property("Email")
- .HasColumnType("nvarchar(max)");
-
- b.Property("Genero")
- .HasColumnType("nvarchar(max)");
-
- b.Property("IdSucursal")
- .HasColumnType("int");
-
- b.Property("Legajo")
- .HasColumnType("int");
-
- b.Property("Nombre")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdEmpleado");
-
- b.HasIndex("IdSucursal");
-
- b.ToTable("Empleado", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Inventario", b =>
- {
- b.Property("IdInventario")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdInventario"));
-
- b.Property("Cantidad")
- .HasColumnType("int");
-
- b.Property("IdArticulo")
- .HasColumnType("int");
-
- b.Property("IdColor")
- .HasColumnType("int");
-
- b.Property("IdSucursal")
- .HasColumnType("int");
-
- b.Property("IdTalle")
- .HasColumnType("int");
-
- b.HasKey("IdInventario");
-
- b.HasIndex("IdArticulo");
-
- b.HasIndex("IdColor");
-
- b.HasIndex("IdSucursal");
-
- b.HasIndex("IdTalle");
-
- b.ToTable("Inventario", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.LineaDeVenta", b =>
- {
- b.Property("IdLineaDeVenta")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdLineaDeVenta"));
-
- b.Property("Cantidad")
- .HasColumnType("int");
-
- b.Property("IdInventario")
- .HasColumnType("int");
-
- b.Property("IdVenta")
- .HasColumnType("int");
-
- b.Property("MontoIVA")
- .HasPrecision(18, 2)
- .HasColumnType("decimal(18,2)");
-
- b.Property("NetoGravado")
- .HasPrecision(18, 2)
- .HasColumnType("decimal(18,2)");
-
- b.Property("PorcentajeIVA")
- .HasPrecision(18, 2)
- .HasColumnType("decimal(18,2)");
-
- b.Property("Subtotal")
- .HasPrecision(18, 2)
- .HasColumnType("decimal(18,2)");
-
- b.HasKey("IdLineaDeVenta");
-
- b.HasIndex("IdInventario");
-
- b.HasIndex("IdVenta");
-
- b.ToTable("LineaDeVenta", "Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.Marca", b =>
- {
- b.Property("IdMarca")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdMarca"));
-
- b.Property("Descripcion")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdMarca");
-
- b.ToTable("Marca", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.Pago", b =>
- {
- b.Property("IdPago")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdPago"));
-
- b.Property("Estado")
- .HasColumnType("nvarchar(max)");
-
- b.Property("Fecha")
- .HasColumnType("datetime2");
-
- b.Property("IdVenta")
- .HasColumnType("int");
-
- b.Property("Observaciones")
- .HasColumnType("nvarchar(max)");
-
- b.Property("Ticket")
- .HasColumnType("int");
-
- b.HasKey("IdPago");
-
- b.HasIndex("IdVenta")
- .IsUnique();
-
- b.ToTable("Pago", "Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.PuntoDeVenta", b =>
- {
- b.Property("IdPuntoDeVenta")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdPuntoDeVenta"));
-
- b.Property("Habilitado")
- .HasColumnType("bit");
-
- b.Property("IdSucursal")
- .HasColumnType("int");
-
- b.Property("NumeroPtoVenta")
- .HasColumnType("int");
-
- b.HasKey("IdPuntoDeVenta");
-
- b.HasIndex("IdSucursal");
-
- b.ToTable("PuntoDeVenta", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Rol", b =>
- {
- b.Property("IdRol")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdRol"));
-
- b.Property("Descripcion")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdRol");
-
- b.ToTable("Rol", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Sesion", b =>
- {
- b.Property("IdSesion")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdSesion"));
-
- b.Property("FechaFin")
- .HasColumnType("datetime2");
-
- b.Property("FechaInicio")
- .HasColumnType("datetime2");
-
- b.Property("IdPuntoDeVenta")
- .HasColumnType("int");
-
- b.Property("IdUsuario")
- .HasColumnType("int");
-
- b.HasKey("IdSesion");
-
- b.HasIndex("IdPuntoDeVenta");
-
- b.HasIndex("IdUsuario")
- .IsUnique();
-
- b.ToTable("Sesion", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Sucursal", b =>
- {
- b.Property("IdSucursal")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdSucursal"));
-
- b.Property("Ciudad")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Domicilio")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("IdTienda")
- .HasColumnType("int");
-
- b.Property("Nombre")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Telefono")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdSucursal");
-
- b.HasIndex("IdTienda");
-
- b.ToTable("Sucursal", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Talle", b =>
- {
- b.Property("IdTalle")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdTalle"));
-
- b.Property("IdTipoTalle")
- .HasColumnType("int");
-
- b.Property("Medida")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdTalle");
-
- b.HasIndex("IdTipoTalle");
-
- b.ToTable("Talle", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.Tienda", b =>
- {
- b.Property("IdTienda")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdTienda"));
-
- b.Property("Cuit")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("IdCondicionTributaria")
- .HasColumnType("int");
-
- b.HasKey("IdTienda");
-
- b.HasIndex("IdCondicionTributaria")
- .IsUnique();
-
- b.ToTable("Tienda", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.TipoDeComprobante", b =>
- {
- b.Property("IdTipoDeComprobante")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdTipoDeComprobante"));
-
- b.Property("Nombre")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdTipoDeComprobante");
-
- b.ToTable("TipoDeComprobante", "Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.TipoTalle", b =>
- {
- b.Property("IdTipoTalle")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdTipoTalle"));
-
- b.Property("Descripcion")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdTipoTalle");
-
- b.ToTable("TipoTalle", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.Usuario", b =>
- {
- b.Property("IdUsuario")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdUsuario"));
-
- b.Property("Contraseña")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("IdEmpleado")
- .HasColumnType("int");
-
- b.Property("IdRol")
- .HasColumnType("int");
-
- b.Property("NombreUsuario")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdUsuario");
-
- b.HasIndex("IdEmpleado")
- .IsUnique();
-
- b.HasIndex("IdRol");
-
- b.ToTable("Usuario", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Venta", b =>
- {
- b.Property("IdVenta")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdVenta"));
-
- b.Property("Estado")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Fecha")
- .HasColumnType("datetime2");
-
- b.Property("IdCliente")
- .HasColumnType("int");
-
- b.Property("IdPuntoVenta")
- .HasColumnType("int");
-
- b.Property("IdTipoDeComprobante")
- .HasColumnType("int");
-
- b.Property("IdUsuario")
- .HasColumnType("int");
-
- b.Property("Monto")
- .HasPrecision(18, 2)
- .HasColumnType("decimal(18,2)");
-
- b.Property("Observaciones")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdVenta");
-
- b.HasIndex("IdCliente");
-
- b.HasIndex("IdPuntoVenta");
-
- b.HasIndex("IdTipoDeComprobante");
-
- b.HasIndex("IdUsuario");
-
- b.ToTable("Venta", "Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.Articulo", b =>
- {
- b.HasOne("Domain.Models.Categoria", "Categoria")
- .WithMany("Articulos")
- .HasForeignKey("IdCategoria");
-
- b.HasOne("Domain.Models.Marca", "Marca")
- .WithMany("Articulos")
- .HasForeignKey("IdMarca");
-
- b.HasOne("Domain.Models.TipoTalle", "TipoTalle")
- .WithMany("Articulos")
- .HasForeignKey("IdTipoTalle");
-
- b.Navigation("Categoria");
-
- b.Navigation("Marca");
-
- b.Navigation("TipoTalle");
- });
-
- modelBuilder.Entity("Domain.Models.Cliente", b =>
- {
- b.HasOne("Domain.Models.CondicionTributaria", "CondicionTributaria")
- .WithMany("Clientes")
- .HasForeignKey("IdCondicionTributaria");
-
- b.Navigation("CondicionTributaria");
- });
-
- modelBuilder.Entity("Domain.Models.Comprobante", b =>
- {
- b.HasOne("Domain.Models.Venta", "Venta")
- .WithOne("Comprobante")
- .HasForeignKey("Domain.Models.Comprobante", "IdVenta")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Venta");
- });
-
- modelBuilder.Entity("Domain.Models.CondicionTributaria", b =>
- {
- b.HasOne("Domain.Models.TipoDeComprobante", "TipoDeComprobante")
- .WithMany("CondicionesTributarias")
- .HasForeignKey("IdTipoDeComprobante")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("TipoDeComprobante");
- });
-
- modelBuilder.Entity("Domain.Models.Empleado", b =>
- {
- b.HasOne("Domain.Models.Sucursal", "Sucursal")
- .WithMany("Empleados")
- .HasForeignKey("IdSucursal")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Sucursal");
- });
-
- modelBuilder.Entity("Domain.Models.Inventario", b =>
- {
- b.HasOne("Domain.Models.Articulo", "Articulo")
- .WithMany("Inventarios")
- .HasForeignKey("IdArticulo")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Domain.Models.Color", "Color")
- .WithMany("Inventarios")
- .HasForeignKey("IdColor")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Domain.Models.Sucursal", "Sucursal")
- .WithMany("Inventarios")
- .HasForeignKey("IdSucursal")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Domain.Models.Talle", "Talle")
- .WithMany("Inventarios")
- .HasForeignKey("IdTalle")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Articulo");
-
- b.Navigation("Color");
-
- b.Navigation("Sucursal");
-
- b.Navigation("Talle");
- });
-
- modelBuilder.Entity("Domain.Models.LineaDeVenta", b =>
- {
- b.HasOne("Domain.Models.Inventario", "Inventario")
- .WithMany("LineasDeVentas")
- .HasForeignKey("IdInventario")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Domain.Models.Venta", "Venta")
- .WithMany("LineasDeVentas")
- .HasForeignKey("IdVenta")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Inventario");
-
- b.Navigation("Venta");
- });
-
- modelBuilder.Entity("Domain.Models.Pago", b =>
- {
- b.HasOne("Domain.Models.Venta", "Venta")
- .WithOne("Pago")
- .HasForeignKey("Domain.Models.Pago", "IdVenta")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Venta");
- });
-
- modelBuilder.Entity("Domain.Models.PuntoDeVenta", b =>
- {
- b.HasOne("Domain.Models.Sucursal", "Sucursal")
- .WithMany("PuntosDeVentas")
- .HasForeignKey("IdSucursal")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Sucursal");
- });
-
- modelBuilder.Entity("Domain.Models.Sesion", b =>
- {
- b.HasOne("Domain.Models.PuntoDeVenta", "PuntoDeVenta")
- .WithMany("Sesiones")
- .HasForeignKey("IdPuntoDeVenta");
-
- b.HasOne("Domain.Models.Usuario", "Usuario")
- .WithOne("Sesion")
- .HasForeignKey("Domain.Models.Sesion", "IdUsuario")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("PuntoDeVenta");
-
- b.Navigation("Usuario");
- });
-
- modelBuilder.Entity("Domain.Models.Sucursal", b =>
- {
- b.HasOne("Domain.Models.Tienda", "Tienda")
- .WithMany("Sucursales")
- .HasForeignKey("IdTienda")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Tienda");
- });
-
- modelBuilder.Entity("Domain.Models.Talle", b =>
- {
- b.HasOne("Domain.Models.TipoTalle", "TipoTalle")
- .WithMany("Talles")
- .HasForeignKey("IdTipoTalle");
-
- b.Navigation("TipoTalle");
- });
-
- modelBuilder.Entity("Domain.Models.Tienda", b =>
- {
- b.HasOne("Domain.Models.CondicionTributaria", "CondicionTributaria")
- .WithOne("Tienda")
- .HasForeignKey("Domain.Models.Tienda", "IdCondicionTributaria")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("CondicionTributaria");
- });
-
- modelBuilder.Entity("Domain.Models.Usuario", b =>
- {
- b.HasOne("Domain.Models.Empleado", "Empleado")
- .WithOne("Usuario")
- .HasForeignKey("Domain.Models.Usuario", "IdEmpleado")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Domain.Models.Rol", "Rol")
- .WithMany("Usuarios")
- .HasForeignKey("IdRol");
-
- b.Navigation("Empleado");
-
- b.Navigation("Rol");
- });
-
- modelBuilder.Entity("Domain.Models.Venta", b =>
- {
- b.HasOne("Domain.Models.Cliente", "Cliente")
- .WithMany("Ventas")
- .HasForeignKey("IdCliente")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Domain.Models.PuntoDeVenta", "PuntoDeVenta")
- .WithMany("Ventas")
- .HasForeignKey("IdPuntoVenta")
- .IsRequired();
-
- b.HasOne("Domain.Models.TipoDeComprobante", "TipoDeComprobante")
- .WithMany("Ventas")
- .HasForeignKey("IdTipoDeComprobante")
- .IsRequired();
-
- b.HasOne("Domain.Models.Usuario", "Usuario")
- .WithMany("Ventas")
- .HasForeignKey("IdUsuario")
- .IsRequired();
-
- b.Navigation("Cliente");
-
- b.Navigation("PuntoDeVenta");
-
- b.Navigation("TipoDeComprobante");
-
- b.Navigation("Usuario");
- });
-
- modelBuilder.Entity("Domain.Models.Articulo", b =>
- {
- b.Navigation("Inventarios");
- });
-
- modelBuilder.Entity("Domain.Models.Categoria", b =>
- {
- b.Navigation("Articulos");
- });
-
- modelBuilder.Entity("Domain.Models.Cliente", b =>
- {
- b.Navigation("Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.Color", b =>
- {
- b.Navigation("Inventarios");
- });
-
- modelBuilder.Entity("Domain.Models.CondicionTributaria", b =>
- {
- b.Navigation("Clientes");
-
- b.Navigation("Tienda");
- });
-
- modelBuilder.Entity("Domain.Models.Empleado", b =>
- {
- b.Navigation("Usuario");
- });
-
- modelBuilder.Entity("Domain.Models.Inventario", b =>
- {
- b.Navigation("LineasDeVentas");
- });
-
- modelBuilder.Entity("Domain.Models.Marca", b =>
- {
- b.Navigation("Articulos");
- });
-
- modelBuilder.Entity("Domain.Models.PuntoDeVenta", b =>
- {
- b.Navigation("Sesiones");
-
- b.Navigation("Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.Rol", b =>
- {
- b.Navigation("Usuarios");
- });
-
- modelBuilder.Entity("Domain.Models.Sucursal", b =>
- {
- b.Navigation("Empleados");
-
- b.Navigation("Inventarios");
-
- b.Navigation("PuntosDeVentas");
- });
-
- modelBuilder.Entity("Domain.Models.Talle", b =>
- {
- b.Navigation("Inventarios");
- });
-
- modelBuilder.Entity("Domain.Models.Tienda", b =>
- {
- b.Navigation("Sucursales");
- });
-
- modelBuilder.Entity("Domain.Models.TipoDeComprobante", b =>
- {
- b.Navigation("CondicionesTributarias");
-
- b.Navigation("Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.TipoTalle", b =>
- {
- b.Navigation("Articulos");
-
- b.Navigation("Talles");
- });
-
- modelBuilder.Entity("Domain.Models.Usuario", b =>
- {
- b.Navigation("Sesion");
-
- b.Navigation("Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.Venta", b =>
- {
- b.Navigation("Comprobante");
-
- b.Navigation("LineasDeVentas");
-
- b.Navigation("Pago");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/src/Infraestructure/Migrations/20240220231628_agrego-genero-empleado.cs b/src/Infraestructure/Migrations/20240220231628_agrego-genero-empleado.cs
deleted file mode 100644
index a253878..0000000
--- a/src/Infraestructure/Migrations/20240220231628_agrego-genero-empleado.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace Infraestructure.Migrations
-{
- ///
- public partial class agregogeneroempleado : Migration
- {
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn(
- name: "Genero",
- schema: "Admin",
- table: "Empleado",
- type: "nvarchar(max)",
- nullable: true);
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropColumn(
- name: "Genero",
- schema: "Admin",
- table: "Empleado");
- }
- }
-}
diff --git a/src/Infraestructure/Migrations/20240220231920_saco-genero-empleado.Designer.cs b/src/Infraestructure/Migrations/20240220231920_saco-genero-empleado.Designer.cs
deleted file mode 100644
index a92791f..0000000
--- a/src/Infraestructure/Migrations/20240220231920_saco-genero-empleado.Designer.cs
+++ /dev/null
@@ -1,956 +0,0 @@
-//
-using System;
-using Infraestructure.Data;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace Infraestructure.Migrations
-{
- [DbContext(typeof(TiendaContext))]
- [Migration("20240220231920_saco-genero-empleado")]
- partial class sacogeneroempleado
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.2")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("Domain.Models.Articulo", b =>
- {
- b.Property("IdArticulo")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdArticulo"));
-
- b.Property("Codigo")
- .HasColumnType("int");
-
- b.Property("Costo")
- .HasPrecision(18, 2)
- .HasColumnType("decimal(18,2)");
-
- b.Property("Descripcion")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("IdCategoria")
- .HasColumnType("int");
-
- b.Property("IdMarca")
- .HasColumnType("int");
-
- b.Property("IdTipoTalle")
- .HasColumnType("int");
-
- b.Property("MargenGanancia")
- .HasColumnType("int");
-
- b.HasKey("IdArticulo");
-
- b.HasIndex("IdCategoria");
-
- b.HasIndex("IdMarca");
-
- b.HasIndex("IdTipoTalle");
-
- b.ToTable("Articulo", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.Categoria", b =>
- {
- b.Property("IdCategoria")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdCategoria"));
-
- b.Property("Descripcion")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdCategoria");
-
- b.ToTable("Categoria", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.Cliente", b =>
- {
- b.Property("IdCliente")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdCliente"));
-
- b.Property("Apellido")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Cuil")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Dni")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Domicilio")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Email")
- .HasColumnType("nvarchar(max)");
-
- b.Property("IdCondicionTributaria")
- .HasColumnType("int");
-
- b.Property("Nombre")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Telefono")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdCliente");
-
- b.HasIndex("IdCondicionTributaria");
-
- b.ToTable("Cliente", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Color", b =>
- {
- b.Property("IdColor")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdColor"));
-
- b.Property("Nombre")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdColor");
-
- b.ToTable("Color", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.Comprobante", b =>
- {
- b.Property("IdComprobante")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdComprobante"));
-
- b.Property("IdVenta")
- .HasColumnType("int");
-
- b.HasKey("IdComprobante");
-
- b.HasIndex("IdVenta")
- .IsUnique();
-
- b.ToTable("Comprobante", "Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.CondicionTributaria", b =>
- {
- b.Property("IdCondicionTributaria")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdCondicionTributaria"));
-
- b.Property("Descripcion")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("IdTipoDeComprobante")
- .HasColumnType("int");
-
- b.HasKey("IdCondicionTributaria");
-
- b.HasIndex("IdTipoDeComprobante");
-
- b.ToTable("CondicionTributaria", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Empleado", b =>
- {
- b.Property("IdEmpleado")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdEmpleado"));
-
- b.Property("Apellido")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Domicilio")
- .HasColumnType("nvarchar(max)");
-
- b.Property("Email")
- .HasColumnType("nvarchar(max)");
-
- b.Property("IdSucursal")
- .HasColumnType("int");
-
- b.Property("Legajo")
- .HasColumnType("int");
-
- b.Property("Nombre")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdEmpleado");
-
- b.HasIndex("IdSucursal");
-
- b.ToTable("Empleado", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Inventario", b =>
- {
- b.Property("IdInventario")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdInventario"));
-
- b.Property("Cantidad")
- .HasColumnType("int");
-
- b.Property("IdArticulo")
- .HasColumnType("int");
-
- b.Property("IdColor")
- .HasColumnType("int");
-
- b.Property("IdSucursal")
- .HasColumnType("int");
-
- b.Property("IdTalle")
- .HasColumnType("int");
-
- b.HasKey("IdInventario");
-
- b.HasIndex("IdArticulo");
-
- b.HasIndex("IdColor");
-
- b.HasIndex("IdSucursal");
-
- b.HasIndex("IdTalle");
-
- b.ToTable("Inventario", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.LineaDeVenta", b =>
- {
- b.Property("IdLineaDeVenta")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdLineaDeVenta"));
-
- b.Property("Cantidad")
- .HasColumnType("int");
-
- b.Property("IdInventario")
- .HasColumnType("int");
-
- b.Property("IdVenta")
- .HasColumnType("int");
-
- b.Property("MontoIVA")
- .HasPrecision(18, 2)
- .HasColumnType("decimal(18,2)");
-
- b.Property("NetoGravado")
- .HasPrecision(18, 2)
- .HasColumnType("decimal(18,2)");
-
- b.Property("PorcentajeIVA")
- .HasPrecision(18, 2)
- .HasColumnType("decimal(18,2)");
-
- b.Property("Subtotal")
- .HasPrecision(18, 2)
- .HasColumnType("decimal(18,2)");
-
- b.HasKey("IdLineaDeVenta");
-
- b.HasIndex("IdInventario");
-
- b.HasIndex("IdVenta");
-
- b.ToTable("LineaDeVenta", "Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.Marca", b =>
- {
- b.Property("IdMarca")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdMarca"));
-
- b.Property("Descripcion")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdMarca");
-
- b.ToTable("Marca", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.Pago", b =>
- {
- b.Property("IdPago")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdPago"));
-
- b.Property("Estado")
- .HasColumnType("nvarchar(max)");
-
- b.Property("Fecha")
- .HasColumnType("datetime2");
-
- b.Property("IdVenta")
- .HasColumnType("int");
-
- b.Property("Observaciones")
- .HasColumnType("nvarchar(max)");
-
- b.Property("Ticket")
- .HasColumnType("int");
-
- b.HasKey("IdPago");
-
- b.HasIndex("IdVenta")
- .IsUnique();
-
- b.ToTable("Pago", "Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.PuntoDeVenta", b =>
- {
- b.Property("IdPuntoDeVenta")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdPuntoDeVenta"));
-
- b.Property("Habilitado")
- .HasColumnType("bit");
-
- b.Property("IdSucursal")
- .HasColumnType("int");
-
- b.Property("NumeroPtoVenta")
- .HasColumnType("int");
-
- b.HasKey("IdPuntoDeVenta");
-
- b.HasIndex("IdSucursal");
-
- b.ToTable("PuntoDeVenta", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Rol", b =>
- {
- b.Property("IdRol")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdRol"));
-
- b.Property("Descripcion")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdRol");
-
- b.ToTable("Rol", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Sesion", b =>
- {
- b.Property("IdSesion")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdSesion"));
-
- b.Property("FechaFin")
- .HasColumnType("datetime2");
-
- b.Property("FechaInicio")
- .HasColumnType("datetime2");
-
- b.Property("IdPuntoDeVenta")
- .HasColumnType("int");
-
- b.Property("IdUsuario")
- .HasColumnType("int");
-
- b.HasKey("IdSesion");
-
- b.HasIndex("IdPuntoDeVenta");
-
- b.HasIndex("IdUsuario")
- .IsUnique();
-
- b.ToTable("Sesion", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Sucursal", b =>
- {
- b.Property("IdSucursal")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdSucursal"));
-
- b.Property("Ciudad")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Domicilio")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("IdTienda")
- .HasColumnType("int");
-
- b.Property("Nombre")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Telefono")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdSucursal");
-
- b.HasIndex("IdTienda");
-
- b.ToTable("Sucursal", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Talle", b =>
- {
- b.Property("IdTalle")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdTalle"));
-
- b.Property("IdTipoTalle")
- .HasColumnType("int");
-
- b.Property("Medida")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdTalle");
-
- b.HasIndex("IdTipoTalle");
-
- b.ToTable("Talle", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.Tienda", b =>
- {
- b.Property("IdTienda")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdTienda"));
-
- b.Property("Cuit")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("IdCondicionTributaria")
- .HasColumnType("int");
-
- b.HasKey("IdTienda");
-
- b.HasIndex("IdCondicionTributaria")
- .IsUnique();
-
- b.ToTable("Tienda", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.TipoDeComprobante", b =>
- {
- b.Property("IdTipoDeComprobante")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdTipoDeComprobante"));
-
- b.Property("Nombre")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdTipoDeComprobante");
-
- b.ToTable("TipoDeComprobante", "Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.TipoTalle", b =>
- {
- b.Property("IdTipoTalle")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdTipoTalle"));
-
- b.Property("Descripcion")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdTipoTalle");
-
- b.ToTable("TipoTalle", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.Usuario", b =>
- {
- b.Property("IdUsuario")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdUsuario"));
-
- b.Property("Contraseña")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("IdEmpleado")
- .HasColumnType("int");
-
- b.Property("IdRol")
- .HasColumnType("int");
-
- b.Property("NombreUsuario")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdUsuario");
-
- b.HasIndex("IdEmpleado")
- .IsUnique();
-
- b.HasIndex("IdRol");
-
- b.ToTable("Usuario", "Admin");
- });
-
- modelBuilder.Entity("Domain.Models.Venta", b =>
- {
- b.Property("IdVenta")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdVenta"));
-
- b.Property("Estado")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Fecha")
- .HasColumnType("datetime2");
-
- b.Property("IdCliente")
- .HasColumnType("int");
-
- b.Property("IdPuntoVenta")
- .HasColumnType("int");
-
- b.Property("IdTipoDeComprobante")
- .HasColumnType("int");
-
- b.Property("IdUsuario")
- .HasColumnType("int");
-
- b.Property("Monto")
- .HasPrecision(18, 2)
- .HasColumnType("decimal(18,2)");
-
- b.Property("Observaciones")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdVenta");
-
- b.HasIndex("IdCliente");
-
- b.HasIndex("IdPuntoVenta");
-
- b.HasIndex("IdTipoDeComprobante");
-
- b.HasIndex("IdUsuario");
-
- b.ToTable("Venta", "Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.Articulo", b =>
- {
- b.HasOne("Domain.Models.Categoria", "Categoria")
- .WithMany("Articulos")
- .HasForeignKey("IdCategoria");
-
- b.HasOne("Domain.Models.Marca", "Marca")
- .WithMany("Articulos")
- .HasForeignKey("IdMarca");
-
- b.HasOne("Domain.Models.TipoTalle", "TipoTalle")
- .WithMany("Articulos")
- .HasForeignKey("IdTipoTalle");
-
- b.Navigation("Categoria");
-
- b.Navigation("Marca");
-
- b.Navigation("TipoTalle");
- });
-
- modelBuilder.Entity("Domain.Models.Cliente", b =>
- {
- b.HasOne("Domain.Models.CondicionTributaria", "CondicionTributaria")
- .WithMany("Clientes")
- .HasForeignKey("IdCondicionTributaria");
-
- b.Navigation("CondicionTributaria");
- });
-
- modelBuilder.Entity("Domain.Models.Comprobante", b =>
- {
- b.HasOne("Domain.Models.Venta", "Venta")
- .WithOne("Comprobante")
- .HasForeignKey("Domain.Models.Comprobante", "IdVenta")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Venta");
- });
-
- modelBuilder.Entity("Domain.Models.CondicionTributaria", b =>
- {
- b.HasOne("Domain.Models.TipoDeComprobante", "TipoDeComprobante")
- .WithMany("CondicionesTributarias")
- .HasForeignKey("IdTipoDeComprobante")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("TipoDeComprobante");
- });
-
- modelBuilder.Entity("Domain.Models.Empleado", b =>
- {
- b.HasOne("Domain.Models.Sucursal", "Sucursal")
- .WithMany("Empleados")
- .HasForeignKey("IdSucursal")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Sucursal");
- });
-
- modelBuilder.Entity("Domain.Models.Inventario", b =>
- {
- b.HasOne("Domain.Models.Articulo", "Articulo")
- .WithMany("Inventarios")
- .HasForeignKey("IdArticulo")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Domain.Models.Color", "Color")
- .WithMany("Inventarios")
- .HasForeignKey("IdColor")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Domain.Models.Sucursal", "Sucursal")
- .WithMany("Inventarios")
- .HasForeignKey("IdSucursal")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Domain.Models.Talle", "Talle")
- .WithMany("Inventarios")
- .HasForeignKey("IdTalle")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Articulo");
-
- b.Navigation("Color");
-
- b.Navigation("Sucursal");
-
- b.Navigation("Talle");
- });
-
- modelBuilder.Entity("Domain.Models.LineaDeVenta", b =>
- {
- b.HasOne("Domain.Models.Inventario", "Inventario")
- .WithMany("LineasDeVentas")
- .HasForeignKey("IdInventario")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Domain.Models.Venta", "Venta")
- .WithMany("LineasDeVentas")
- .HasForeignKey("IdVenta")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Inventario");
-
- b.Navigation("Venta");
- });
-
- modelBuilder.Entity("Domain.Models.Pago", b =>
- {
- b.HasOne("Domain.Models.Venta", "Venta")
- .WithOne("Pago")
- .HasForeignKey("Domain.Models.Pago", "IdVenta")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Venta");
- });
-
- modelBuilder.Entity("Domain.Models.PuntoDeVenta", b =>
- {
- b.HasOne("Domain.Models.Sucursal", "Sucursal")
- .WithMany("PuntosDeVentas")
- .HasForeignKey("IdSucursal")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Sucursal");
- });
-
- modelBuilder.Entity("Domain.Models.Sesion", b =>
- {
- b.HasOne("Domain.Models.PuntoDeVenta", "PuntoDeVenta")
- .WithMany("Sesiones")
- .HasForeignKey("IdPuntoDeVenta");
-
- b.HasOne("Domain.Models.Usuario", "Usuario")
- .WithOne("Sesion")
- .HasForeignKey("Domain.Models.Sesion", "IdUsuario")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("PuntoDeVenta");
-
- b.Navigation("Usuario");
- });
-
- modelBuilder.Entity("Domain.Models.Sucursal", b =>
- {
- b.HasOne("Domain.Models.Tienda", "Tienda")
- .WithMany("Sucursales")
- .HasForeignKey("IdTienda")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Tienda");
- });
-
- modelBuilder.Entity("Domain.Models.Talle", b =>
- {
- b.HasOne("Domain.Models.TipoTalle", "TipoTalle")
- .WithMany("Talles")
- .HasForeignKey("IdTipoTalle");
-
- b.Navigation("TipoTalle");
- });
-
- modelBuilder.Entity("Domain.Models.Tienda", b =>
- {
- b.HasOne("Domain.Models.CondicionTributaria", "CondicionTributaria")
- .WithOne("Tienda")
- .HasForeignKey("Domain.Models.Tienda", "IdCondicionTributaria")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("CondicionTributaria");
- });
-
- modelBuilder.Entity("Domain.Models.Usuario", b =>
- {
- b.HasOne("Domain.Models.Empleado", "Empleado")
- .WithOne("Usuario")
- .HasForeignKey("Domain.Models.Usuario", "IdEmpleado")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Domain.Models.Rol", "Rol")
- .WithMany("Usuarios")
- .HasForeignKey("IdRol");
-
- b.Navigation("Empleado");
-
- b.Navigation("Rol");
- });
-
- modelBuilder.Entity("Domain.Models.Venta", b =>
- {
- b.HasOne("Domain.Models.Cliente", "Cliente")
- .WithMany("Ventas")
- .HasForeignKey("IdCliente")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Domain.Models.PuntoDeVenta", "PuntoDeVenta")
- .WithMany("Ventas")
- .HasForeignKey("IdPuntoVenta")
- .IsRequired();
-
- b.HasOne("Domain.Models.TipoDeComprobante", "TipoDeComprobante")
- .WithMany("Ventas")
- .HasForeignKey("IdTipoDeComprobante")
- .IsRequired();
-
- b.HasOne("Domain.Models.Usuario", "Usuario")
- .WithMany("Ventas")
- .HasForeignKey("IdUsuario")
- .IsRequired();
-
- b.Navigation("Cliente");
-
- b.Navigation("PuntoDeVenta");
-
- b.Navigation("TipoDeComprobante");
-
- b.Navigation("Usuario");
- });
-
- modelBuilder.Entity("Domain.Models.Articulo", b =>
- {
- b.Navigation("Inventarios");
- });
-
- modelBuilder.Entity("Domain.Models.Categoria", b =>
- {
- b.Navigation("Articulos");
- });
-
- modelBuilder.Entity("Domain.Models.Cliente", b =>
- {
- b.Navigation("Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.Color", b =>
- {
- b.Navigation("Inventarios");
- });
-
- modelBuilder.Entity("Domain.Models.CondicionTributaria", b =>
- {
- b.Navigation("Clientes");
-
- b.Navigation("Tienda");
- });
-
- modelBuilder.Entity("Domain.Models.Empleado", b =>
- {
- b.Navigation("Usuario");
- });
-
- modelBuilder.Entity("Domain.Models.Inventario", b =>
- {
- b.Navigation("LineasDeVentas");
- });
-
- modelBuilder.Entity("Domain.Models.Marca", b =>
- {
- b.Navigation("Articulos");
- });
-
- modelBuilder.Entity("Domain.Models.PuntoDeVenta", b =>
- {
- b.Navigation("Sesiones");
-
- b.Navigation("Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.Rol", b =>
- {
- b.Navigation("Usuarios");
- });
-
- modelBuilder.Entity("Domain.Models.Sucursal", b =>
- {
- b.Navigation("Empleados");
-
- b.Navigation("Inventarios");
-
- b.Navigation("PuntosDeVentas");
- });
-
- modelBuilder.Entity("Domain.Models.Talle", b =>
- {
- b.Navigation("Inventarios");
- });
-
- modelBuilder.Entity("Domain.Models.Tienda", b =>
- {
- b.Navigation("Sucursales");
- });
-
- modelBuilder.Entity("Domain.Models.TipoDeComprobante", b =>
- {
- b.Navigation("CondicionesTributarias");
-
- b.Navigation("Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.TipoTalle", b =>
- {
- b.Navigation("Articulos");
-
- b.Navigation("Talles");
- });
-
- modelBuilder.Entity("Domain.Models.Usuario", b =>
- {
- b.Navigation("Sesion");
-
- b.Navigation("Ventas");
- });
-
- modelBuilder.Entity("Domain.Models.Venta", b =>
- {
- b.Navigation("Comprobante");
-
- b.Navigation("LineasDeVentas");
-
- b.Navigation("Pago");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/src/Infraestructure/Migrations/20240220231920_saco-genero-empleado.cs b/src/Infraestructure/Migrations/20240220231920_saco-genero-empleado.cs
deleted file mode 100644
index 6bf3089..0000000
--- a/src/Infraestructure/Migrations/20240220231920_saco-genero-empleado.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace Infraestructure.Migrations
-{
- ///
- public partial class sacogeneroempleado : Migration
- {
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropColumn(
- name: "Genero",
- schema: "Admin",
- table: "Empleado");
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn(
- name: "Genero",
- schema: "Admin",
- table: "Empleado",
- type: "nvarchar(max)",
- nullable: true);
- }
- }
-}
diff --git a/src/Infraestructure/Migrations/20240221142742_New.Designer.cs b/src/Infraestructure/Migrations/20240221142742_New.Designer.cs
deleted file mode 100644
index a88be29..0000000
--- a/src/Infraestructure/Migrations/20240221142742_New.Designer.cs
+++ /dev/null
@@ -1,956 +0,0 @@
-//
-using System;
-using Infraestructure.Data;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace Infraestructure.Migrations
-{
- [DbContext(typeof(TiendaContext))]
- [Migration("20240221142742_New")]
- partial class New
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.2")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("Domain.Models.Articulo", b =>
- {
- b.Property("IdArticulo")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdArticulo"));
-
- b.Property("Codigo")
- .HasColumnType("int");
-
- b.Property("Costo")
- .HasPrecision(18, 2)
- .HasColumnType("decimal(18,2)");
-
- b.Property("Descripcion")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("IdCategoria")
- .HasColumnType("int");
-
- b.Property("IdMarca")
- .HasColumnType("int");
-
- b.Property("IdTipoTalle")
- .HasColumnType("int");
-
- b.Property("MargenGanancia")
- .HasColumnType("int");
-
- b.HasKey("IdArticulo");
-
- b.HasIndex("IdCategoria");
-
- b.HasIndex("IdMarca");
-
- b.HasIndex("IdTipoTalle");
-
- b.ToTable("Articulo", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.Categoria", b =>
- {
- b.Property("IdCategoria")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdCategoria"));
-
- b.Property("Descripcion")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("IdCategoria");
-
- b.ToTable("Categoria", "Articulo");
- });
-
- modelBuilder.Entity("Domain.Models.Cliente", b =>
- {
- b.Property("IdCliente")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("IdCliente"));
-
- b.Property("Apellido")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property