oh hell no
This commit is contained in:
573
Modelo/.Migrations_old/20240908160636_eliminadocamporedundante.Designer.cs
generated
Normal file
573
Modelo/.Migrations_old/20240908160636_eliminadocamporedundante.Designer.cs
generated
Normal file
@@ -0,0 +1,573 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Modelo;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Modelo.Migrations
|
||||
{
|
||||
[DbContext(typeof(Context))]
|
||||
[Migration("20240908160636_eliminadocamporedundante")]
|
||||
partial class eliminadocamporedundante
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "8.0.8")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Entidades.Categoria", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Descripcion")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Categoria", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Cliente", b =>
|
||||
{
|
||||
b.Property<long>("Cuit")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Apellido")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
|
||||
b.Property<string>("Correo")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
b.Property<string>("Direccion")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<string>("Nombre")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
|
||||
b.HasKey("Cuit");
|
||||
|
||||
b.ToTable("Clientes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetalleFactura", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdFactura")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id", "IdFactura");
|
||||
|
||||
b.HasIndex("IdFactura");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("DetallesFacturas", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetalleOrdenDeCompra", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdOrdenDeCompra")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdPresupuesto")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("MontoCU")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id", "IdOrdenDeCompra");
|
||||
|
||||
b.HasIndex("IdOrdenDeCompra");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("DetalleOrdenDeCompras");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetallePresupuesto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdPresupuesto")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("MontoCUPropuesto")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id", "IdPresupuesto");
|
||||
|
||||
b.HasIndex("IdPresupuesto");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("DetallePresupuestos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Factura", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<long>("ClienteCuit")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("Fecha")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long>("IdCliente")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<double>("Total")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClienteCuit");
|
||||
|
||||
b.ToTable("Facturas", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Lote", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdRemito")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("Fecha")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id", "IdRemito");
|
||||
|
||||
b.HasIndex("IdRemito");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("Lotes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.OrdenDeCompra", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<bool>("Entregado")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<long>("IdProveedor")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("ProveedorCuit")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProveedorCuit");
|
||||
|
||||
b.ToTable("OrdenDeCompras");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Presupuesto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<bool>("Aceptado")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("Fecha")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<long>("IdProveedor")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("ProveedorCuit")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProveedorCuit");
|
||||
|
||||
b.ToTable("Presupuestos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Producto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired()
|
||||
.HasMaxLength(21)
|
||||
.HasColumnType("nvarchar(21)");
|
||||
|
||||
b.Property<bool>("EsPerecedero")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<string>("Nombre")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
|
||||
b.Property<double>("Precio")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Producto");
|
||||
|
||||
b.HasDiscriminator().HasValue("Producto");
|
||||
|
||||
b.UseTphMappingStrategy();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Proveedor", b =>
|
||||
{
|
||||
b.Property<long>("Cuit")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Direccion")
|
||||
.IsRequired()
|
||||
.HasMaxLength(60)
|
||||
.HasColumnType("nvarchar(60)");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<string>("Nombre")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
|
||||
b.Property<string>("RazonSocial")
|
||||
.IsRequired()
|
||||
.HasMaxLength(60)
|
||||
.HasColumnType("nvarchar(60)");
|
||||
|
||||
b.HasKey("Cuit");
|
||||
|
||||
b.ToTable("Proveedores");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Remito", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<long>("ProveedorCuit")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProveedorCuit");
|
||||
|
||||
b.ToTable("Remitos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ProductoCategoria", b =>
|
||||
{
|
||||
b.Property<int>("CategoriaId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("CategoriaId", "ProductoId");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("ProductoCategoria");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ProductoProveedor", b =>
|
||||
{
|
||||
b.Property<long>("ProveedorId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ProveedorId", "ProductoId");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("ProductoProveedor");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.ProductoNoPercedero", b =>
|
||||
{
|
||||
b.HasBaseType("Entidades.Producto");
|
||||
|
||||
b.Property<string>("TipoDeEnvase")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasDiscriminator().HasValue("ProductoNoPercedero");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.ProductoPercedero", b =>
|
||||
{
|
||||
b.HasBaseType("Entidades.Producto");
|
||||
|
||||
b.Property<int>("MesesHastaConsumoPreferente")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("MesesHastaVencimiento")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasDiscriminator().HasValue("ProductoPercedero");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetalleFactura", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Factura", null)
|
||||
.WithMany("Detalles")
|
||||
.HasForeignKey("IdFactura")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Producto", "Producto")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Producto");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetalleOrdenDeCompra", b =>
|
||||
{
|
||||
b.HasOne("Entidades.OrdenDeCompra", null)
|
||||
.WithMany("detalles")
|
||||
.HasForeignKey("IdOrdenDeCompra")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Producto", "Producto")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Producto");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetallePresupuesto", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Presupuesto", null)
|
||||
.WithMany("detalles")
|
||||
.HasForeignKey("IdPresupuesto")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Producto", "Producto")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Producto");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Factura", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Cliente", "Cliente")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClienteCuit")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Cliente");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Lote", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Remito", null)
|
||||
.WithMany("Lotes")
|
||||
.HasForeignKey("IdRemito")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Producto", "Producto")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Producto");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.OrdenDeCompra", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Proveedor", "Proveedor")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProveedorCuit")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Proveedor");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Presupuesto", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Proveedor", "Proveedor")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProveedorCuit")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Proveedor");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Remito", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Proveedor", "Proveedor")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProveedorCuit")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Proveedor");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ProductoCategoria", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Categoria", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("CategoriaId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Producto", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ProductoProveedor", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Producto", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Proveedor", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("ProveedorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Factura", b =>
|
||||
{
|
||||
b.Navigation("Detalles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.OrdenDeCompra", b =>
|
||||
{
|
||||
b.Navigation("detalles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Presupuesto", b =>
|
||||
{
|
||||
b.Navigation("detalles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Remito", b =>
|
||||
{
|
||||
b.Navigation("Lotes");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Modelo.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class eliminadocamporedundante : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IdProveedor",
|
||||
table: "Remitos");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "IdProveedor",
|
||||
table: "Remitos",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
556
Modelo/.Migrations_old/20240908162248_mepaseasqlite.Designer.cs
generated
Normal file
556
Modelo/.Migrations_old/20240908162248_mepaseasqlite.Designer.cs
generated
Normal file
@@ -0,0 +1,556 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Modelo;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Modelo.Migrations
|
||||
{
|
||||
[DbContext(typeof(Context))]
|
||||
[Migration("20240908162248_mepaseasqlite")]
|
||||
partial class mepaseasqlite
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.8");
|
||||
|
||||
modelBuilder.Entity("Entidades.Categoria", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Descripcion")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Categoria", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Cliente", b =>
|
||||
{
|
||||
b.Property<long>("Cuit")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Apellido")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Correo")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Direccion")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<string>("Nombre")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Cuit");
|
||||
|
||||
b.ToTable("Clientes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetalleFactura", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("IdFactura")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id", "IdFactura");
|
||||
|
||||
b.HasIndex("IdFactura");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("DetallesFacturas", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetalleOrdenDeCompra", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("IdOrdenDeCompra")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("IdPresupuesto")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<double>("MontoCU")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id", "IdOrdenDeCompra");
|
||||
|
||||
b.HasIndex("IdOrdenDeCompra");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("DetalleOrdenDeCompras");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetallePresupuesto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("IdPresupuesto")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<double>("MontoCUPropuesto")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id", "IdPresupuesto");
|
||||
|
||||
b.HasIndex("IdPresupuesto");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("DetallePresupuestos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Factura", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ClienteCuit")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Fecha")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("IdCliente")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<double>("Total")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClienteCuit");
|
||||
|
||||
b.ToTable("Facturas", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Lote", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("IdRemito")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Fecha")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id", "IdRemito");
|
||||
|
||||
b.HasIndex("IdRemito");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("Lotes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.OrdenDeCompra", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("Entregado")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("IdProveedor")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ProveedorCuit")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProveedorCuit");
|
||||
|
||||
b.ToTable("OrdenDeCompras");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Presupuesto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("Aceptado")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Fecha")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("IdProveedor")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ProveedorCuit")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProveedorCuit");
|
||||
|
||||
b.ToTable("Presupuestos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Producto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired()
|
||||
.HasMaxLength(21)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("EsPerecedero")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<string>("Nombre")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<double>("Precio")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Producto");
|
||||
|
||||
b.HasDiscriminator().HasValue("Producto");
|
||||
|
||||
b.UseTphMappingStrategy();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Proveedor", b =>
|
||||
{
|
||||
b.Property<long>("Cuit")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Direccion")
|
||||
.IsRequired()
|
||||
.HasMaxLength(60)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<string>("Nombre")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("RazonSocial")
|
||||
.IsRequired()
|
||||
.HasMaxLength(60)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Cuit");
|
||||
|
||||
b.ToTable("Proveedores");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Remito", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ProveedorCuit")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProveedorCuit");
|
||||
|
||||
b.ToTable("Remitos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ProductoCategoria", b =>
|
||||
{
|
||||
b.Property<int>("CategoriaId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("CategoriaId", "ProductoId");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("ProductoCategoria");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ProductoProveedor", b =>
|
||||
{
|
||||
b.Property<long>("ProveedorId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("ProveedorId", "ProductoId");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("ProductoProveedor");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.ProductoNoPercedero", b =>
|
||||
{
|
||||
b.HasBaseType("Entidades.Producto");
|
||||
|
||||
b.Property<string>("TipoDeEnvase")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasDiscriminator().HasValue("ProductoNoPercedero");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.ProductoPercedero", b =>
|
||||
{
|
||||
b.HasBaseType("Entidades.Producto");
|
||||
|
||||
b.Property<int>("MesesHastaConsumoPreferente")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("MesesHastaVencimiento")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasDiscriminator().HasValue("ProductoPercedero");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetalleFactura", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Factura", null)
|
||||
.WithMany("Detalles")
|
||||
.HasForeignKey("IdFactura")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Producto", "Producto")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Producto");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetalleOrdenDeCompra", b =>
|
||||
{
|
||||
b.HasOne("Entidades.OrdenDeCompra", null)
|
||||
.WithMany("detalles")
|
||||
.HasForeignKey("IdOrdenDeCompra")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Producto", "Producto")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Producto");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetallePresupuesto", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Presupuesto", null)
|
||||
.WithMany("detalles")
|
||||
.HasForeignKey("IdPresupuesto")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Producto", "Producto")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Producto");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Factura", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Cliente", "Cliente")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClienteCuit")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Cliente");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Lote", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Remito", null)
|
||||
.WithMany("Lotes")
|
||||
.HasForeignKey("IdRemito")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Producto", "Producto")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Producto");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.OrdenDeCompra", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Proveedor", "Proveedor")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProveedorCuit")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Proveedor");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Presupuesto", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Proveedor", "Proveedor")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProveedorCuit")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Proveedor");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Remito", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Proveedor", "Proveedor")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProveedorCuit")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Proveedor");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ProductoCategoria", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Categoria", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("CategoriaId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Producto", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ProductoProveedor", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Producto", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Proveedor", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("ProveedorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Factura", b =>
|
||||
{
|
||||
b.Navigation("Detalles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.OrdenDeCompra", b =>
|
||||
{
|
||||
b.Navigation("detalles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Presupuesto", b =>
|
||||
{
|
||||
b.Navigation("detalles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Remito", b =>
|
||||
{
|
||||
b.Navigation("Lotes");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
1109
Modelo/.Migrations_old/20240908162248_mepaseasqlite.cs
Normal file
1109
Modelo/.Migrations_old/20240908162248_mepaseasqlite.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,6 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Modelo;
|
||||
|
||||
@@ -16,24 +15,18 @@ namespace Modelo.Migrations
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "8.0.8")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.8");
|
||||
|
||||
modelBuilder.Entity("Entidades.Categoria", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Descripcion")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -43,32 +36,32 @@ namespace Modelo.Migrations
|
||||
modelBuilder.Entity("Entidades.Cliente", b =>
|
||||
{
|
||||
b.Property<long>("Cuit")
|
||||
.HasColumnType("bigint");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Apellido")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Correo")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Direccion")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<string>("Nombre")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Cuit");
|
||||
|
||||
@@ -78,16 +71,16 @@ namespace Modelo.Migrations
|
||||
modelBuilder.Entity("Entidades.DetalleFactura", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("IdFactura")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id", "IdFactura");
|
||||
|
||||
@@ -101,22 +94,22 @@ namespace Modelo.Migrations
|
||||
modelBuilder.Entity("Entidades.DetalleOrdenDeCompra", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("IdOrdenDeCompra")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("IdPresupuesto")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<double>("MontoCU")
|
||||
.HasColumnType("float");
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id", "IdOrdenDeCompra");
|
||||
|
||||
@@ -124,25 +117,25 @@ namespace Modelo.Migrations
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("DetalleOrdenDeCompras", (string)null);
|
||||
b.ToTable("DetalleOrdenDeCompras");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetallePresupuesto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("IdPresupuesto")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<double>("MontoCUPropuesto")
|
||||
.HasColumnType("float");
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id", "IdPresupuesto");
|
||||
|
||||
@@ -150,28 +143,26 @@ namespace Modelo.Migrations
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("DetallePresupuestos", (string)null);
|
||||
b.ToTable("DetallePresupuestos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Factura", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ClienteCuit")
|
||||
.HasColumnType("bigint");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Fecha")
|
||||
.HasColumnType("datetime2");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("IdCliente")
|
||||
.HasColumnType("bigint");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<double>("Total")
|
||||
.HasColumnType("float");
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -183,22 +174,22 @@ namespace Modelo.Migrations
|
||||
modelBuilder.Entity("Entidades.Lote", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("IdRemito")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Fecha")
|
||||
.HasColumnType("datetime2");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.HasColumnType("bit");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id", "IdRemito");
|
||||
|
||||
@@ -206,95 +197,89 @@ namespace Modelo.Migrations
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("Lotes", (string)null);
|
||||
b.ToTable("Lotes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.OrdenDeCompra", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("Entregado")
|
||||
.HasColumnType("bit");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("IdProveedor")
|
||||
.HasColumnType("bigint");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ProveedorCuit")
|
||||
.HasColumnType("bigint");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProveedorCuit");
|
||||
|
||||
b.ToTable("OrdenDeCompras", (string)null);
|
||||
b.ToTable("OrdenDeCompras");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Presupuesto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("Aceptado")
|
||||
.HasColumnType("bit");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Fecha")
|
||||
.HasColumnType("datetime2");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.HasColumnType("bit");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("IdProveedor")
|
||||
.HasColumnType("bigint");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ProveedorCuit")
|
||||
.HasColumnType("bigint");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProveedorCuit");
|
||||
|
||||
b.ToTable("Presupuestos", (string)null);
|
||||
b.ToTable("Presupuestos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Producto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired()
|
||||
.HasMaxLength(21)
|
||||
.HasColumnType("nvarchar(21)");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("EsPerecedero")
|
||||
.HasColumnType("bit");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<string>("Nombre")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<double>("Precio")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Producto", (string)null);
|
||||
b.ToTable("Producto");
|
||||
|
||||
b.HasDiscriminator().HasValue("Producto");
|
||||
|
||||
@@ -304,82 +289,77 @@ namespace Modelo.Migrations
|
||||
modelBuilder.Entity("Entidades.Proveedor", b =>
|
||||
{
|
||||
b.Property<long>("Cuit")
|
||||
.HasColumnType("bigint");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Direccion")
|
||||
.IsRequired()
|
||||
.HasMaxLength(60)
|
||||
.HasColumnType("nvarchar(60)");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<string>("Nombre")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("RazonSocial")
|
||||
.IsRequired()
|
||||
.HasMaxLength(60)
|
||||
.HasColumnType("nvarchar(60)");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Cuit");
|
||||
|
||||
b.ToTable("Proveedores", (string)null);
|
||||
b.ToTable("Proveedores");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Remito", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("IdProveedor")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ProveedorCuit")
|
||||
.HasColumnType("bigint");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProveedorCuit");
|
||||
|
||||
b.ToTable("Remitos", (string)null);
|
||||
b.ToTable("Remitos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ProductoCategoria", b =>
|
||||
{
|
||||
b.Property<int>("CategoriaId")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("CategoriaId", "ProductoId");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("ProductoCategoria", (string)null);
|
||||
b.ToTable("ProductoCategoria");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ProductoProveedor", b =>
|
||||
{
|
||||
b.Property<long>("ProveedorId")
|
||||
.HasColumnType("bigint");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("ProveedorId", "ProductoId");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("ProductoProveedor", (string)null);
|
||||
b.ToTable("ProductoProveedor");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.ProductoNoPercedero", b =>
|
||||
@@ -388,7 +368,7 @@ namespace Modelo.Migrations
|
||||
|
||||
b.Property<string>("TipoDeEnvase")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasDiscriminator().HasValue("ProductoNoPercedero");
|
||||
});
|
||||
@@ -398,10 +378,10 @@ namespace Modelo.Migrations
|
||||
b.HasBaseType("Entidades.Producto");
|
||||
|
||||
b.Property<int>("MesesHastaConsumoPreferente")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("MesesHastaVencimiento")
|
||||
.HasColumnType("int");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasDiscriminator().HasValue("ProductoPercedero");
|
||||
});
|
||||
@@ -426,7 +406,7 @@ namespace Modelo.Migrations
|
||||
modelBuilder.Entity("Entidades.DetalleOrdenDeCompra", b =>
|
||||
{
|
||||
b.HasOne("Entidades.OrdenDeCompra", null)
|
||||
.WithMany("Detalles")
|
||||
.WithMany("detalles")
|
||||
.HasForeignKey("IdOrdenDeCompra")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
@@ -555,7 +535,7 @@ namespace Modelo.Migrations
|
||||
|
||||
modelBuilder.Entity("Entidades.OrdenDeCompra", b =>
|
||||
{
|
||||
b.Navigation("Detalles");
|
||||
b.Navigation("detalles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Presupuesto", b =>
|
||||
@@ -18,10 +18,16 @@ public class Context : Microsoft.EntityFrameworkCore.DbContext
|
||||
public DbSet<ProductoNoPercedero> ProductoNoPercederos { get; set; }
|
||||
public DbSet<Proveedor> Proveedores { get; set; }
|
||||
public DbSet<Remito> Remitos { get; set; }
|
||||
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{ // Esto de poner credenciales sueltas está mal
|
||||
optionsBuilder.UseSqlServer(@"Server=fedesrv.ddns.net,1433;Database=ControlStockDAS;User Id=ProyectoDas;Password=<IL-:aQI?TK{uRw:AU>A?5?~*=Gux'}JT0me,z5Cf^f(s'-gy[G#-jt%b&uHe+/,$Gl>qkXl-c[@&e(\.V?[3)\w|aMH+<GnkIo*99MNJ}:L=j<T,^$`8J\dXw6>^67x;Trusted_Connection=False;Encrypt=False;Connection Timeout=5;");
|
||||
{
|
||||
var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||
|
||||
// Definir la ruta completa del archivo SQLite en el directorio del usuario
|
||||
var dbPath = System.IO.Path.Combine(homeDirectory, "app.db");
|
||||
|
||||
// Configurar SQLite con la ruta a la base de datos en el directorio del usuario
|
||||
optionsBuilder.UseSqlite($"Data Source={dbPath}");
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
@@ -128,13 +134,15 @@ public class Context : Microsoft.EntityFrameworkCore.DbContext
|
||||
j => j.HasOne<Categoria>().WithMany().HasForeignKey("CategoriaId"),
|
||||
j => j.HasOne<Producto>().WithMany().HasForeignKey("ProductoId"),
|
||||
j => j.HasKey("CategoriaId", "ProductoId"));
|
||||
});
|
||||
});
|
||||
|
||||
// Mapeo para ProductoNoPercedero
|
||||
modelBuilder.Entity<ProductoNoPercedero>(entity =>
|
||||
{
|
||||
entity.Property(e => e.TipoDeEnvase)
|
||||
.HasConversion<string>();
|
||||
entity.Property(p => p.TipoDeEnvase)
|
||||
.HasColumnType("TEXT");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Proveedor>(entity =>
|
||||
@@ -164,7 +172,7 @@ public class Context : Microsoft.EntityFrameworkCore.DbContext
|
||||
.HasKey(df => new { df.Id, df.IdOrdenDeCompra });
|
||||
|
||||
modelBuilder.Entity<OrdenDeCompra>()
|
||||
.HasKey(x => x.Id);
|
||||
.HasKey(x => x.Id);
|
||||
|
||||
modelBuilder.Entity<OrdenDeCompra>()
|
||||
.HasMany(x => x.detalles)
|
||||
|
||||
437
Modelo/Migrations/20240908162625_mepaseasqlite.cs
Normal file
437
Modelo/Migrations/20240908162625_mepaseasqlite.cs
Normal file
@@ -0,0 +1,437 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Modelo.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class mepaseasqlite : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Categoria",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Descripcion = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Categoria", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Clientes",
|
||||
columns: table => new
|
||||
{
|
||||
Cuit = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
Nombre = table.Column<string>(type: "TEXT", maxLength: 30, nullable: false),
|
||||
Apellido = table.Column<string>(type: "TEXT", maxLength: 30, nullable: false),
|
||||
Direccion = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
|
||||
Correo = table.Column<string>(type: "TEXT", maxLength: 150, nullable: false),
|
||||
Habilitado = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Clientes", x => x.Cuit);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Producto",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Nombre = table.Column<string>(type: "TEXT", maxLength: 30, nullable: false),
|
||||
Precio = table.Column<double>(type: "float", nullable: false),
|
||||
Habilitado = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: true),
|
||||
EsPerecedero = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
Discriminator = table.Column<string>(type: "TEXT", maxLength: 21, nullable: false),
|
||||
TipoDeEnvase = table.Column<string>(type: "TEXT", nullable: true),
|
||||
MesesHastaConsumoPreferente = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
MesesHastaVencimiento = table.Column<int>(type: "INTEGER", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Producto", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Proveedores",
|
||||
columns: table => new
|
||||
{
|
||||
Cuit = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
Nombre = table.Column<string>(type: "TEXT", maxLength: 30, nullable: false),
|
||||
RazonSocial = table.Column<string>(type: "TEXT", maxLength: 60, nullable: false),
|
||||
Direccion = table.Column<string>(type: "TEXT", maxLength: 60, nullable: false),
|
||||
Habilitado = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Proveedores", x => x.Cuit);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Facturas",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Total = table.Column<double>(type: "REAL", nullable: false),
|
||||
Fecha = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
IdCliente = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
ClienteCuit = table.Column<long>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Facturas", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Facturas_Clientes_ClienteCuit",
|
||||
column: x => x.ClienteCuit,
|
||||
principalTable: "Clientes",
|
||||
principalColumn: "Cuit",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ProductoCategoria",
|
||||
columns: table => new
|
||||
{
|
||||
CategoriaId = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ProductoId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ProductoCategoria", x => new { x.CategoriaId, x.ProductoId });
|
||||
table.ForeignKey(
|
||||
name: "FK_ProductoCategoria_Categoria_CategoriaId",
|
||||
column: x => x.CategoriaId,
|
||||
principalTable: "Categoria",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProductoCategoria_Producto_ProductoId",
|
||||
column: x => x.ProductoId,
|
||||
principalTable: "Producto",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "OrdenDeCompras",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
ProveedorCuit = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
IdProveedor = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
Entregado = table.Column<bool>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OrdenDeCompras", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrdenDeCompras_Proveedores_ProveedorCuit",
|
||||
column: x => x.ProveedorCuit,
|
||||
principalTable: "Proveedores",
|
||||
principalColumn: "Cuit",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Presupuestos",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Fecha = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
Habilitado = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
Aceptado = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
ProveedorCuit = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
IdProveedor = table.Column<long>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Presupuestos", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Presupuestos_Proveedores_ProveedorCuit",
|
||||
column: x => x.ProveedorCuit,
|
||||
principalTable: "Proveedores",
|
||||
principalColumn: "Cuit",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ProductoProveedor",
|
||||
columns: table => new
|
||||
{
|
||||
ProveedorId = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
ProductoId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ProductoProveedor", x => new { x.ProveedorId, x.ProductoId });
|
||||
table.ForeignKey(
|
||||
name: "FK_ProductoProveedor_Producto_ProductoId",
|
||||
column: x => x.ProductoId,
|
||||
principalTable: "Producto",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProductoProveedor_Proveedores_ProveedorId",
|
||||
column: x => x.ProveedorId,
|
||||
principalTable: "Proveedores",
|
||||
principalColumn: "Cuit",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Remitos",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
ProveedorCuit = table.Column<long>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Remitos", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Remitos_Proveedores_ProveedorCuit",
|
||||
column: x => x.ProveedorCuit,
|
||||
principalTable: "Proveedores",
|
||||
principalColumn: "Cuit",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DetallesFacturas",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
IdFactura = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Cantidad = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ProductoId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DetallesFacturas", x => new { x.Id, x.IdFactura });
|
||||
table.ForeignKey(
|
||||
name: "FK_DetallesFacturas_Facturas_IdFactura",
|
||||
column: x => x.IdFactura,
|
||||
principalTable: "Facturas",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_DetallesFacturas_Producto_ProductoId",
|
||||
column: x => x.ProductoId,
|
||||
principalTable: "Producto",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DetalleOrdenDeCompras",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
IdOrdenDeCompra = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
MontoCU = table.Column<double>(type: "REAL", nullable: false),
|
||||
IdPresupuesto = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Cantidad = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ProductoId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DetalleOrdenDeCompras", x => new { x.Id, x.IdOrdenDeCompra });
|
||||
table.ForeignKey(
|
||||
name: "FK_DetalleOrdenDeCompras_OrdenDeCompras_IdOrdenDeCompra",
|
||||
column: x => x.IdOrdenDeCompra,
|
||||
principalTable: "OrdenDeCompras",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_DetalleOrdenDeCompras_Producto_ProductoId",
|
||||
column: x => x.ProductoId,
|
||||
principalTable: "Producto",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DetallePresupuestos",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
IdPresupuesto = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
MontoCUPropuesto = table.Column<double>(type: "REAL", nullable: false),
|
||||
Cantidad = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ProductoId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DetallePresupuestos", x => new { x.Id, x.IdPresupuesto });
|
||||
table.ForeignKey(
|
||||
name: "FK_DetallePresupuestos_Presupuestos_IdPresupuesto",
|
||||
column: x => x.IdPresupuesto,
|
||||
principalTable: "Presupuestos",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_DetallePresupuestos_Producto_ProductoId",
|
||||
column: x => x.ProductoId,
|
||||
principalTable: "Producto",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Lotes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
IdRemito = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Fecha = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
Habilitado = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
Cantidad = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ProductoId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Lotes", x => new { x.Id, x.IdRemito });
|
||||
table.ForeignKey(
|
||||
name: "FK_Lotes_Producto_ProductoId",
|
||||
column: x => x.ProductoId,
|
||||
principalTable: "Producto",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Lotes_Remitos_IdRemito",
|
||||
column: x => x.IdRemito,
|
||||
principalTable: "Remitos",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DetalleOrdenDeCompras_IdOrdenDeCompra",
|
||||
table: "DetalleOrdenDeCompras",
|
||||
column: "IdOrdenDeCompra");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DetalleOrdenDeCompras_ProductoId",
|
||||
table: "DetalleOrdenDeCompras",
|
||||
column: "ProductoId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DetallePresupuestos_IdPresupuesto",
|
||||
table: "DetallePresupuestos",
|
||||
column: "IdPresupuesto");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DetallePresupuestos_ProductoId",
|
||||
table: "DetallePresupuestos",
|
||||
column: "ProductoId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DetallesFacturas_IdFactura",
|
||||
table: "DetallesFacturas",
|
||||
column: "IdFactura");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DetallesFacturas_ProductoId",
|
||||
table: "DetallesFacturas",
|
||||
column: "ProductoId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Facturas_ClienteCuit",
|
||||
table: "Facturas",
|
||||
column: "ClienteCuit");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Lotes_IdRemito",
|
||||
table: "Lotes",
|
||||
column: "IdRemito");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Lotes_ProductoId",
|
||||
table: "Lotes",
|
||||
column: "ProductoId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrdenDeCompras_ProveedorCuit",
|
||||
table: "OrdenDeCompras",
|
||||
column: "ProveedorCuit");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Presupuestos_ProveedorCuit",
|
||||
table: "Presupuestos",
|
||||
column: "ProveedorCuit");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProductoCategoria_ProductoId",
|
||||
table: "ProductoCategoria",
|
||||
column: "ProductoId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProductoProveedor_ProductoId",
|
||||
table: "ProductoProveedor",
|
||||
column: "ProductoId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Remitos_ProveedorCuit",
|
||||
table: "Remitos",
|
||||
column: "ProveedorCuit");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "DetalleOrdenDeCompras");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "DetallePresupuestos");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "DetallesFacturas");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Lotes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ProductoCategoria");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ProductoProveedor");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "OrdenDeCompras");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Presupuestos");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Facturas");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Remitos");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Categoria");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Producto");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Clientes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Proveedores");
|
||||
}
|
||||
}
|
||||
}
|
||||
556
Modelo/Migrations/20240908172708_Cambie_nombre_de_key2.Designer.cs
generated
Normal file
556
Modelo/Migrations/20240908172708_Cambie_nombre_de_key2.Designer.cs
generated
Normal file
@@ -0,0 +1,556 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Modelo;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Modelo.Migrations
|
||||
{
|
||||
[DbContext(typeof(Context))]
|
||||
[Migration("20240908172708_Cambie_nombre_de_key2")]
|
||||
partial class Cambie_nombre_de_key2
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.8");
|
||||
|
||||
modelBuilder.Entity("Entidades.Categoria", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Descripcion")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Categoria", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Cliente", b =>
|
||||
{
|
||||
b.Property<long>("Cuit")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Apellido")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Correo")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Direccion")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<string>("Nombre")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Cuit");
|
||||
|
||||
b.ToTable("Clientes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetalleFactura", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("IdFactura")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id", "IdFactura");
|
||||
|
||||
b.HasIndex("IdFactura");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("DetallesFacturas", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetalleOrdenDeCompra", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("IdOrdenDeCompra")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("IdPresupuesto")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<double>("MontoCU")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id", "IdOrdenDeCompra");
|
||||
|
||||
b.HasIndex("IdOrdenDeCompra");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("DetalleOrdenDeCompras");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetallePresupuesto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("IdPresupuesto")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<double>("MontoCUPropuesto")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id", "IdPresupuesto");
|
||||
|
||||
b.HasIndex("IdPresupuesto");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("DetallePresupuestos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Factura", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ClienteCuit")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Fecha")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("IdCliente")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<double>("Total")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClienteCuit");
|
||||
|
||||
b.ToTable("Facturas", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Lote", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("IdRemito")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Cantidad")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Fecha")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id", "IdRemito");
|
||||
|
||||
b.HasIndex("IdRemito");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("Lotes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.OrdenDeCompra", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("Entregado")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("IdProveedor")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ProveedorCuit")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProveedorCuit");
|
||||
|
||||
b.ToTable("OrdenDeCompras");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Presupuesto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("Aceptado")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Fecha")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("IdProveedor")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ProveedorCuit")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProveedorCuit");
|
||||
|
||||
b.ToTable("Presupuestos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Producto", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired()
|
||||
.HasMaxLength(21)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("EsPerecedero")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<string>("Nombre")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<double>("Precio")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Producto");
|
||||
|
||||
b.HasDiscriminator().HasValue("Producto");
|
||||
|
||||
b.UseTphMappingStrategy();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Proveedor", b =>
|
||||
{
|
||||
b.Property<long>("Cuit")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Direccion")
|
||||
.IsRequired()
|
||||
.HasMaxLength(60)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("Habilitado")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<string>("Nombre")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("RazonSocial")
|
||||
.IsRequired()
|
||||
.HasMaxLength(60)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Cuit");
|
||||
|
||||
b.ToTable("Proveedores");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Remito", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ProveedorCuit")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProveedorCuit");
|
||||
|
||||
b.ToTable("Remitos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ProductoCategoria", b =>
|
||||
{
|
||||
b.Property<int>("CategoriaId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("CategoriaId", "ProductoId");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("ProductoCategoria");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ProductoProveedor", b =>
|
||||
{
|
||||
b.Property<long>("ProveedorId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ProductoId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("ProveedorId", "ProductoId");
|
||||
|
||||
b.HasIndex("ProductoId");
|
||||
|
||||
b.ToTable("ProductoProveedor");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.ProductoNoPercedero", b =>
|
||||
{
|
||||
b.HasBaseType("Entidades.Producto");
|
||||
|
||||
b.Property<string>("TipoDeEnvase")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasDiscriminator().HasValue("ProductoNoPercedero");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.ProductoPercedero", b =>
|
||||
{
|
||||
b.HasBaseType("Entidades.Producto");
|
||||
|
||||
b.Property<int>("MesesHastaConsumoPreferente")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("MesesHastaVencimiento")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasDiscriminator().HasValue("ProductoPercedero");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetalleFactura", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Factura", null)
|
||||
.WithMany("Detalles")
|
||||
.HasForeignKey("IdFactura")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Producto", "Producto")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Producto");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetalleOrdenDeCompra", b =>
|
||||
{
|
||||
b.HasOne("Entidades.OrdenDeCompra", null)
|
||||
.WithMany("detalles")
|
||||
.HasForeignKey("IdOrdenDeCompra")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Producto", "Producto")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Producto");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.DetallePresupuesto", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Presupuesto", null)
|
||||
.WithMany("detalles")
|
||||
.HasForeignKey("IdPresupuesto")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Producto", "Producto")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Producto");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Factura", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Cliente", "Cliente")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClienteCuit")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Cliente");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Lote", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Remito", null)
|
||||
.WithMany("Lotes")
|
||||
.HasForeignKey("IdRemito")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Producto", "Producto")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Producto");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.OrdenDeCompra", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Proveedor", "Proveedor")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProveedorCuit")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Proveedor");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Presupuesto", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Proveedor", "Proveedor")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProveedorCuit")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Proveedor");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Remito", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Proveedor", "Proveedor")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProveedorCuit")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Proveedor");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ProductoCategoria", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Categoria", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("CategoriaId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Producto", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ProductoProveedor", b =>
|
||||
{
|
||||
b.HasOne("Entidades.Producto", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Entidades.Proveedor", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("ProveedorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Factura", b =>
|
||||
{
|
||||
b.Navigation("Detalles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.OrdenDeCompra", b =>
|
||||
{
|
||||
b.Navigation("detalles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Presupuesto", b =>
|
||||
{
|
||||
b.Navigation("detalles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Entidades.Remito", b =>
|
||||
{
|
||||
b.Navigation("Lotes");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
437
Modelo/Migrations/20240908172708_Cambie_nombre_de_key2.cs
Normal file
437
Modelo/Migrations/20240908172708_Cambie_nombre_de_key2.cs
Normal file
@@ -0,0 +1,437 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Modelo.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Cambie_nombre_de_key2 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Categoria",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Descripcion = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Categoria", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Clientes",
|
||||
columns: table => new
|
||||
{
|
||||
Cuit = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
Nombre = table.Column<string>(type: "TEXT", maxLength: 30, nullable: false),
|
||||
Apellido = table.Column<string>(type: "TEXT", maxLength: 30, nullable: false),
|
||||
Direccion = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
|
||||
Correo = table.Column<string>(type: "TEXT", maxLength: 150, nullable: false),
|
||||
Habilitado = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Clientes", x => x.Cuit);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Producto",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Nombre = table.Column<string>(type: "TEXT", maxLength: 30, nullable: false),
|
||||
Precio = table.Column<double>(type: "float", nullable: false),
|
||||
Habilitado = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: true),
|
||||
EsPerecedero = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
Discriminator = table.Column<string>(type: "TEXT", maxLength: 21, nullable: false),
|
||||
TipoDeEnvase = table.Column<string>(type: "TEXT", nullable: true),
|
||||
MesesHastaConsumoPreferente = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
MesesHastaVencimiento = table.Column<int>(type: "INTEGER", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Producto", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Proveedores",
|
||||
columns: table => new
|
||||
{
|
||||
Cuit = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
Nombre = table.Column<string>(type: "TEXT", maxLength: 30, nullable: false),
|
||||
RazonSocial = table.Column<string>(type: "TEXT", maxLength: 60, nullable: false),
|
||||
Direccion = table.Column<string>(type: "TEXT", maxLength: 60, nullable: false),
|
||||
Habilitado = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Proveedores", x => x.Cuit);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Facturas",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Total = table.Column<double>(type: "REAL", nullable: false),
|
||||
Fecha = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
IdCliente = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
ClienteCuit = table.Column<long>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Facturas", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Facturas_Clientes_ClienteCuit",
|
||||
column: x => x.ClienteCuit,
|
||||
principalTable: "Clientes",
|
||||
principalColumn: "Cuit",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ProductoCategoria",
|
||||
columns: table => new
|
||||
{
|
||||
CategoriaId = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ProductoId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ProductoCategoria", x => new { x.CategoriaId, x.ProductoId });
|
||||
table.ForeignKey(
|
||||
name: "FK_ProductoCategoria_Categoria_CategoriaId",
|
||||
column: x => x.CategoriaId,
|
||||
principalTable: "Categoria",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProductoCategoria_Producto_ProductoId",
|
||||
column: x => x.ProductoId,
|
||||
principalTable: "Producto",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "OrdenDeCompras",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
ProveedorCuit = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
IdProveedor = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
Entregado = table.Column<bool>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OrdenDeCompras", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrdenDeCompras_Proveedores_ProveedorCuit",
|
||||
column: x => x.ProveedorCuit,
|
||||
principalTable: "Proveedores",
|
||||
principalColumn: "Cuit",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Presupuestos",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Fecha = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
Habilitado = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
Aceptado = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
ProveedorCuit = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
IdProveedor = table.Column<long>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Presupuestos", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Presupuestos_Proveedores_ProveedorCuit",
|
||||
column: x => x.ProveedorCuit,
|
||||
principalTable: "Proveedores",
|
||||
principalColumn: "Cuit",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ProductoProveedor",
|
||||
columns: table => new
|
||||
{
|
||||
ProveedorId = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
ProductoId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ProductoProveedor", x => new { x.ProveedorId, x.ProductoId });
|
||||
table.ForeignKey(
|
||||
name: "FK_ProductoProveedor_Producto_ProductoId",
|
||||
column: x => x.ProductoId,
|
||||
principalTable: "Producto",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProductoProveedor_Proveedores_ProveedorId",
|
||||
column: x => x.ProveedorId,
|
||||
principalTable: "Proveedores",
|
||||
principalColumn: "Cuit",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Remitos",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
ProveedorCuit = table.Column<long>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Remitos", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Remitos_Proveedores_ProveedorCuit",
|
||||
column: x => x.ProveedorCuit,
|
||||
principalTable: "Proveedores",
|
||||
principalColumn: "Cuit",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DetallesFacturas",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
IdFactura = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Cantidad = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ProductoId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DetallesFacturas", x => new { x.Id, x.IdFactura });
|
||||
table.ForeignKey(
|
||||
name: "FK_DetallesFacturas_Facturas_IdFactura",
|
||||
column: x => x.IdFactura,
|
||||
principalTable: "Facturas",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_DetallesFacturas_Producto_ProductoId",
|
||||
column: x => x.ProductoId,
|
||||
principalTable: "Producto",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DetalleOrdenDeCompras",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
IdOrdenDeCompra = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
MontoCU = table.Column<double>(type: "REAL", nullable: false),
|
||||
IdPresupuesto = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Cantidad = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ProductoId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DetalleOrdenDeCompras", x => new { x.Id, x.IdOrdenDeCompra });
|
||||
table.ForeignKey(
|
||||
name: "FK_DetalleOrdenDeCompras_OrdenDeCompras_IdOrdenDeCompra",
|
||||
column: x => x.IdOrdenDeCompra,
|
||||
principalTable: "OrdenDeCompras",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_DetalleOrdenDeCompras_Producto_ProductoId",
|
||||
column: x => x.ProductoId,
|
||||
principalTable: "Producto",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DetallePresupuestos",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
IdPresupuesto = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
MontoCUPropuesto = table.Column<double>(type: "REAL", nullable: false),
|
||||
Cantidad = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ProductoId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DetallePresupuestos", x => new { x.Id, x.IdPresupuesto });
|
||||
table.ForeignKey(
|
||||
name: "FK_DetallePresupuestos_Presupuestos_IdPresupuesto",
|
||||
column: x => x.IdPresupuesto,
|
||||
principalTable: "Presupuestos",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_DetallePresupuestos_Producto_ProductoId",
|
||||
column: x => x.ProductoId,
|
||||
principalTable: "Producto",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Lotes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
IdRemito = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Fecha = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
Habilitado = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
Cantidad = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ProductoId = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Lotes", x => new { x.Id, x.IdRemito });
|
||||
table.ForeignKey(
|
||||
name: "FK_Lotes_Producto_ProductoId",
|
||||
column: x => x.ProductoId,
|
||||
principalTable: "Producto",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Lotes_Remitos_IdRemito",
|
||||
column: x => x.IdRemito,
|
||||
principalTable: "Remitos",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DetalleOrdenDeCompras_IdOrdenDeCompra",
|
||||
table: "DetalleOrdenDeCompras",
|
||||
column: "IdOrdenDeCompra");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DetalleOrdenDeCompras_ProductoId",
|
||||
table: "DetalleOrdenDeCompras",
|
||||
column: "ProductoId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DetallePresupuestos_IdPresupuesto",
|
||||
table: "DetallePresupuestos",
|
||||
column: "IdPresupuesto");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DetallePresupuestos_ProductoId",
|
||||
table: "DetallePresupuestos",
|
||||
column: "ProductoId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DetallesFacturas_IdFactura",
|
||||
table: "DetallesFacturas",
|
||||
column: "IdFactura");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DetallesFacturas_ProductoId",
|
||||
table: "DetallesFacturas",
|
||||
column: "ProductoId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Facturas_ClienteCuit",
|
||||
table: "Facturas",
|
||||
column: "ClienteCuit");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Lotes_IdRemito",
|
||||
table: "Lotes",
|
||||
column: "IdRemito");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Lotes_ProductoId",
|
||||
table: "Lotes",
|
||||
column: "ProductoId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrdenDeCompras_ProveedorCuit",
|
||||
table: "OrdenDeCompras",
|
||||
column: "ProveedorCuit");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Presupuestos_ProveedorCuit",
|
||||
table: "Presupuestos",
|
||||
column: "ProveedorCuit");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProductoCategoria_ProductoId",
|
||||
table: "ProductoCategoria",
|
||||
column: "ProductoId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProductoProveedor_ProductoId",
|
||||
table: "ProductoProveedor",
|
||||
column: "ProductoId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Remitos_ProveedorCuit",
|
||||
table: "Remitos",
|
||||
column: "ProveedorCuit");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "DetalleOrdenDeCompras");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "DetallePresupuestos");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "DetallesFacturas");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Lotes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ProductoCategoria");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ProductoProveedor");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "OrdenDeCompras");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Presupuestos");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Facturas");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Remitos");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Categoria");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Producto");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Clientes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Proveedores");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.8">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
||||
@@ -26,15 +26,19 @@ namespace Modelo
|
||||
}
|
||||
public void Add(Remito rem)
|
||||
{
|
||||
if (rem.Lotes.Count <= 0) return;
|
||||
foreach (var detalle in rem.Lotes)
|
||||
{
|
||||
detalle.IdRemito = rem.Id;
|
||||
Add(detalle);
|
||||
}
|
||||
}
|
||||
public override void Add(Lote t)
|
||||
{
|
||||
t.Producto = (t.Producto.EsPerecedero) ?
|
||||
context.ProductoPercederos.First(x => x.Id == t.Producto.Id) :
|
||||
context.ProductoNoPercederos.First(x => x.Id == t.Producto.Id);
|
||||
context.Lotes.Add(t);
|
||||
Guardar();
|
||||
}
|
||||
|
||||
public override void Del(Lote t)
|
||||
|
||||
@@ -49,6 +49,15 @@ namespace Modelo
|
||||
|
||||
public override void Mod(OrdenDeCompra t)
|
||||
{
|
||||
|
||||
t.Proveedor = context.Proveedores.First(x => x.Cuit == t.Proveedor.Cuit);
|
||||
|
||||
foreach (var detalle in t.detalles)
|
||||
{
|
||||
detalle.Producto = (detalle.Producto.EsPerecedero) ?
|
||||
context.ProductoPercederos.First(x => x.Id == detalle.Producto.Id) :
|
||||
context.ProductoNoPercederos.First(x => x.Id == detalle.Producto.Id);
|
||||
}
|
||||
context.OrdenDeCompras.Update(t);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,12 +32,17 @@ namespace Modelo
|
||||
|
||||
public override void Add(ProductoNoPercedero t)
|
||||
{
|
||||
foreach (var prov in t.proveedores)
|
||||
var listcat = t.categorias.ToList();
|
||||
var listpro = t.proveedores.ToList();
|
||||
t.categorias.Clear();
|
||||
t.proveedores.Clear();
|
||||
|
||||
foreach (var prov in listpro)
|
||||
{
|
||||
var prove = context.Proveedores.First(x => x.Cuit == prov.Cuit);
|
||||
t.proveedores.Add(prove);
|
||||
}
|
||||
foreach (var categoria in t.categorias)
|
||||
foreach (var categoria in listcat)
|
||||
{
|
||||
var cat = context.Categorias.First(x => x.Id == categoria.Id);
|
||||
t.categorias.Add(cat);
|
||||
|
||||
@@ -27,12 +27,17 @@ namespace Modelo
|
||||
|
||||
public override void Add(ProductoPercedero t)
|
||||
{
|
||||
foreach (var prov in t.proveedores)
|
||||
var listcat = t.categorias.ToList();
|
||||
var listpro = t.proveedores.ToList();
|
||||
t.categorias.Clear();
|
||||
t.proveedores.Clear();
|
||||
|
||||
foreach (var prov in listpro)
|
||||
{
|
||||
var prove = context.Proveedores.First(x => x.Cuit == prov.Cuit);
|
||||
t.proveedores.Add(prove);
|
||||
}
|
||||
foreach (var categoria in t.categorias)
|
||||
foreach (var categoria in listcat)
|
||||
{
|
||||
var cat = context.Categorias.First(x => x.Id == categoria.Id);
|
||||
t.categorias.Add(cat);
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace Modelo
|
||||
|
||||
public override void Add(Remito t)
|
||||
{
|
||||
t.Lotes = context.Lotes.Where(x => x.IdRemito == t.Id).ToList();
|
||||
t.Proveedor = context.Proveedores.First(x => x.Cuit == t.Proveedor.Cuit);
|
||||
context.Remitos.Add(t);
|
||||
}
|
||||
|
||||
|
||||
@@ -119,6 +119,10 @@
|
||||
"target": "Package",
|
||||
"version": "[8.0.8, )"
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Sqlite": {
|
||||
"target": "Package",
|
||||
"version": "[8.0.8, )"
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Tools": {
|
||||
"include": "Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive",
|
||||
"suppressParent": "All",
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<Import Project="$(NuGetPackageRoot)system.text.json\8.0.4\buildTransitive\net6.0\System.Text.Json.targets" Condition="Exists('$(NuGetPackageRoot)system.text.json\8.0.4\buildTransitive\net6.0\System.Text.Json.targets')" />
|
||||
<Import Project="$(NuGetPackageRoot)sqlitepclraw.lib.e_sqlite3\2.1.6\buildTransitive\net8.0\SQLitePCLRaw.lib.e_sqlite3.targets" Condition="Exists('$(NuGetPackageRoot)sqlitepclraw.lib.e_sqlite3\2.1.6\buildTransitive\net8.0\SQLitePCLRaw.lib.e_sqlite3.targets')" />
|
||||
<Import Project="$(NuGetPackageRoot)microsoft.extensions.options\8.0.0\buildTransitive\net6.0\Microsoft.Extensions.Options.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.options\8.0.0\buildTransitive\net6.0\Microsoft.Extensions.Options.targets')" />
|
||||
<Import Project="$(NuGetPackageRoot)microsoft.extensions.logging.abstractions\8.0.0\buildTransitive\net6.0\Microsoft.Extensions.Logging.Abstractions.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.logging.abstractions\8.0.0\buildTransitive\net6.0\Microsoft.Extensions.Logging.Abstractions.targets')" />
|
||||
</ImportGroup>
|
||||
|
||||
@@ -386,6 +386,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Data.Sqlite.Core/8.0.8": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"SQLitePCLRaw.core": "2.1.6"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net8.0/Microsoft.Data.Sqlite.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.Data.Sqlite.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore/8.0.8": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
@@ -470,6 +486,37 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Sqlite/8.0.8": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Microsoft.EntityFrameworkCore.Sqlite.Core": "8.0.8",
|
||||
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.6"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net8.0/_._": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/_._": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Sqlite.Core/8.0.8": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Microsoft.Data.Sqlite.Core": "8.0.8",
|
||||
"Microsoft.EntityFrameworkCore.Relational": "8.0.8",
|
||||
"Microsoft.Extensions.DependencyModel": "8.0.1"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net8.0/Microsoft.EntityFrameworkCore.Sqlite.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.EntityFrameworkCore.Sqlite.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.SqlServer/8.0.8": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
@@ -602,7 +649,7 @@
|
||||
"System.Text.Json": "8.0.4"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net8.0/_._": {
|
||||
"lib/net8.0/Microsoft.Extensions.DependencyModel.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
@@ -890,6 +937,137 @@
|
||||
"lib/netstandard2.0/Mono.TextTemplating.dll": {}
|
||||
}
|
||||
},
|
||||
"SQLitePCLRaw.bundle_e_sqlite3/2.1.6": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"SQLitePCLRaw.lib.e_sqlite3": "2.1.6",
|
||||
"SQLitePCLRaw.provider.e_sqlite3": "2.1.6"
|
||||
},
|
||||
"compile": {
|
||||
"lib/netstandard2.0/SQLitePCLRaw.batteries_v2.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/SQLitePCLRaw.batteries_v2.dll": {}
|
||||
}
|
||||
},
|
||||
"SQLitePCLRaw.core/2.1.6": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"System.Memory": "4.5.3"
|
||||
},
|
||||
"compile": {
|
||||
"lib/netstandard2.0/SQLitePCLRaw.core.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/SQLitePCLRaw.core.dll": {}
|
||||
}
|
||||
},
|
||||
"SQLitePCLRaw.lib.e_sqlite3/2.1.6": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/netstandard2.0/_._": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/_._": {}
|
||||
},
|
||||
"build": {
|
||||
"buildTransitive/net8.0/SQLitePCLRaw.lib.e_sqlite3.targets": {}
|
||||
},
|
||||
"runtimeTargets": {
|
||||
"runtimes/browser-wasm/nativeassets/net8.0/e_sqlite3.a": {
|
||||
"assetType": "native",
|
||||
"rid": "browser-wasm"
|
||||
},
|
||||
"runtimes/linux-arm/native/libe_sqlite3.so": {
|
||||
"assetType": "native",
|
||||
"rid": "linux-arm"
|
||||
},
|
||||
"runtimes/linux-arm64/native/libe_sqlite3.so": {
|
||||
"assetType": "native",
|
||||
"rid": "linux-arm64"
|
||||
},
|
||||
"runtimes/linux-armel/native/libe_sqlite3.so": {
|
||||
"assetType": "native",
|
||||
"rid": "linux-armel"
|
||||
},
|
||||
"runtimes/linux-mips64/native/libe_sqlite3.so": {
|
||||
"assetType": "native",
|
||||
"rid": "linux-mips64"
|
||||
},
|
||||
"runtimes/linux-musl-arm/native/libe_sqlite3.so": {
|
||||
"assetType": "native",
|
||||
"rid": "linux-musl-arm"
|
||||
},
|
||||
"runtimes/linux-musl-arm64/native/libe_sqlite3.so": {
|
||||
"assetType": "native",
|
||||
"rid": "linux-musl-arm64"
|
||||
},
|
||||
"runtimes/linux-musl-x64/native/libe_sqlite3.so": {
|
||||
"assetType": "native",
|
||||
"rid": "linux-musl-x64"
|
||||
},
|
||||
"runtimes/linux-ppc64le/native/libe_sqlite3.so": {
|
||||
"assetType": "native",
|
||||
"rid": "linux-ppc64le"
|
||||
},
|
||||
"runtimes/linux-s390x/native/libe_sqlite3.so": {
|
||||
"assetType": "native",
|
||||
"rid": "linux-s390x"
|
||||
},
|
||||
"runtimes/linux-x64/native/libe_sqlite3.so": {
|
||||
"assetType": "native",
|
||||
"rid": "linux-x64"
|
||||
},
|
||||
"runtimes/linux-x86/native/libe_sqlite3.so": {
|
||||
"assetType": "native",
|
||||
"rid": "linux-x86"
|
||||
},
|
||||
"runtimes/maccatalyst-arm64/native/libe_sqlite3.dylib": {
|
||||
"assetType": "native",
|
||||
"rid": "maccatalyst-arm64"
|
||||
},
|
||||
"runtimes/maccatalyst-x64/native/libe_sqlite3.dylib": {
|
||||
"assetType": "native",
|
||||
"rid": "maccatalyst-x64"
|
||||
},
|
||||
"runtimes/osx-arm64/native/libe_sqlite3.dylib": {
|
||||
"assetType": "native",
|
||||
"rid": "osx-arm64"
|
||||
},
|
||||
"runtimes/osx-x64/native/libe_sqlite3.dylib": {
|
||||
"assetType": "native",
|
||||
"rid": "osx-x64"
|
||||
},
|
||||
"runtimes/win-arm/native/e_sqlite3.dll": {
|
||||
"assetType": "native",
|
||||
"rid": "win-arm"
|
||||
},
|
||||
"runtimes/win-arm64/native/e_sqlite3.dll": {
|
||||
"assetType": "native",
|
||||
"rid": "win-arm64"
|
||||
},
|
||||
"runtimes/win-x64/native/e_sqlite3.dll": {
|
||||
"assetType": "native",
|
||||
"rid": "win-x64"
|
||||
},
|
||||
"runtimes/win-x86/native/e_sqlite3.dll": {
|
||||
"assetType": "native",
|
||||
"rid": "win-x86"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SQLitePCLRaw.provider.e_sqlite3/2.1.6": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"SQLitePCLRaw.core": "2.1.6"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net6.0/SQLitePCLRaw.provider.e_sqlite3.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/SQLitePCLRaw.provider.e_sqlite3.dll": {}
|
||||
}
|
||||
},
|
||||
"System.CodeDom/4.4.0": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
@@ -2173,6 +2351,25 @@
|
||||
"runtimes/win-x86/native/Microsoft.Data.SqlClient.SNI.dll"
|
||||
]
|
||||
},
|
||||
"Microsoft.Data.Sqlite.Core/8.0.8": {
|
||||
"sha512": "qHInO2EvOcPhjgboP0TGnXM7rASdvWXrw6jAH8Yuz5YP82VTje7d/NKiX1i+dVbE3+G3JuW1kqNVB8yLvsqgYA==",
|
||||
"type": "package",
|
||||
"path": "microsoft.data.sqlite.core/8.0.8",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"Icon.png",
|
||||
"PACKAGE.md",
|
||||
"lib/net6.0/Microsoft.Data.Sqlite.dll",
|
||||
"lib/net6.0/Microsoft.Data.Sqlite.xml",
|
||||
"lib/net8.0/Microsoft.Data.Sqlite.dll",
|
||||
"lib/net8.0/Microsoft.Data.Sqlite.xml",
|
||||
"lib/netstandard2.0/Microsoft.Data.Sqlite.dll",
|
||||
"lib/netstandard2.0/Microsoft.Data.Sqlite.xml",
|
||||
"microsoft.data.sqlite.core.8.0.8.nupkg.sha512",
|
||||
"microsoft.data.sqlite.core.nuspec"
|
||||
]
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore/8.0.8": {
|
||||
"sha512": "iK+jrJzkfbIxutB7or808BPmJtjUEi5O+eSM7cLDwsyde6+3iOujCSfWnrHrLxY3u+EQrJD+aD8DJ6ogPA2Rtw==",
|
||||
"type": "package",
|
||||
@@ -2250,6 +2447,35 @@
|
||||
"microsoft.entityframeworkcore.relational.nuspec"
|
||||
]
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Sqlite/8.0.8": {
|
||||
"sha512": "IDB7Xs16hN/3VkWFCCa4r3fqoJxMVezwq418gr8dBkRBO0pxH+BX/Kjk/U3PYXDvzVLkXqUgJsHv1XoFrJbZPQ==",
|
||||
"type": "package",
|
||||
"path": "microsoft.entityframeworkcore.sqlite/8.0.8",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"Icon.png",
|
||||
"PACKAGE.md",
|
||||
"lib/net8.0/_._",
|
||||
"microsoft.entityframeworkcore.sqlite.8.0.8.nupkg.sha512",
|
||||
"microsoft.entityframeworkcore.sqlite.nuspec"
|
||||
]
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Sqlite.Core/8.0.8": {
|
||||
"sha512": "w5k/ENj3+BPbmggqh83RRuPhhKcJmW7CmdJuGwdX1eFrmptJwnzKiHfQCPkJAu9df16PSs5YFeWrDgepfqnltA==",
|
||||
"type": "package",
|
||||
"path": "microsoft.entityframeworkcore.sqlite.core/8.0.8",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"Icon.png",
|
||||
"PACKAGE.md",
|
||||
"lib/net8.0/Microsoft.EntityFrameworkCore.Sqlite.dll",
|
||||
"lib/net8.0/Microsoft.EntityFrameworkCore.Sqlite.xml",
|
||||
"microsoft.entityframeworkcore.sqlite.core.8.0.8.nupkg.sha512",
|
||||
"microsoft.entityframeworkcore.sqlite.core.nuspec"
|
||||
]
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.SqlServer/8.0.8": {
|
||||
"sha512": "A2F52W+hnGqvprx37HcAnYnJv4QoFFdc9cxd/QGNSd1vCu1I0eAEKRd0r9KS3E5I5RRj/m9XJfYCyTdy1cdn5Q==",
|
||||
"type": "package",
|
||||
@@ -2934,6 +3160,95 @@
|
||||
"mono.texttemplating.nuspec"
|
||||
]
|
||||
},
|
||||
"SQLitePCLRaw.bundle_e_sqlite3/2.1.6": {
|
||||
"sha512": "BmAf6XWt4TqtowmiWe4/5rRot6GerAeklmOPfviOvwLoF5WwgxcJHAxZtySuyW9r9w+HLILnm8VfJFLCUJYW8A==",
|
||||
"type": "package",
|
||||
"path": "sqlitepclraw.bundle_e_sqlite3/2.1.6",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"lib/monoandroid90/SQLitePCLRaw.batteries_v2.dll",
|
||||
"lib/net461/SQLitePCLRaw.batteries_v2.dll",
|
||||
"lib/net6.0-android31.0/SQLitePCLRaw.batteries_v2.dll",
|
||||
"lib/net6.0-android31.0/SQLitePCLRaw.batteries_v2.xml",
|
||||
"lib/net6.0-ios14.0/SQLitePCLRaw.batteries_v2.dll",
|
||||
"lib/net6.0-ios14.2/SQLitePCLRaw.batteries_v2.dll",
|
||||
"lib/net6.0-tvos10.0/SQLitePCLRaw.batteries_v2.dll",
|
||||
"lib/netstandard2.0/SQLitePCLRaw.batteries_v2.dll",
|
||||
"lib/xamarinios10/SQLitePCLRaw.batteries_v2.dll",
|
||||
"sqlitepclraw.bundle_e_sqlite3.2.1.6.nupkg.sha512",
|
||||
"sqlitepclraw.bundle_e_sqlite3.nuspec"
|
||||
]
|
||||
},
|
||||
"SQLitePCLRaw.core/2.1.6": {
|
||||
"sha512": "wO6v9GeMx9CUngAet8hbO7xdm+M42p1XeJq47ogyRoYSvNSp0NGLI+MgC0bhrMk9C17MTVFlLiN6ylyExLCc5w==",
|
||||
"type": "package",
|
||||
"path": "sqlitepclraw.core/2.1.6",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"lib/netstandard2.0/SQLitePCLRaw.core.dll",
|
||||
"sqlitepclraw.core.2.1.6.nupkg.sha512",
|
||||
"sqlitepclraw.core.nuspec"
|
||||
]
|
||||
},
|
||||
"SQLitePCLRaw.lib.e_sqlite3/2.1.6": {
|
||||
"sha512": "2ObJJLkIUIxRpOUlZNGuD4rICpBnrBR5anjyfUFQep4hMOIeqW+XGQYzrNmHSVz5xSWZ3klSbh7sFR6UyDj68Q==",
|
||||
"type": "package",
|
||||
"path": "sqlitepclraw.lib.e_sqlite3/2.1.6",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"buildTransitive/net461/SQLitePCLRaw.lib.e_sqlite3.targets",
|
||||
"buildTransitive/net6.0/SQLitePCLRaw.lib.e_sqlite3.targets",
|
||||
"buildTransitive/net7.0/SQLitePCLRaw.lib.e_sqlite3.targets",
|
||||
"buildTransitive/net8.0/SQLitePCLRaw.lib.e_sqlite3.targets",
|
||||
"lib/net461/_._",
|
||||
"lib/netstandard2.0/_._",
|
||||
"runtimes/browser-wasm/nativeassets/net6.0/e_sqlite3.a",
|
||||
"runtimes/browser-wasm/nativeassets/net7.0/e_sqlite3.a",
|
||||
"runtimes/browser-wasm/nativeassets/net8.0/e_sqlite3.a",
|
||||
"runtimes/linux-arm/native/libe_sqlite3.so",
|
||||
"runtimes/linux-arm64/native/libe_sqlite3.so",
|
||||
"runtimes/linux-armel/native/libe_sqlite3.so",
|
||||
"runtimes/linux-mips64/native/libe_sqlite3.so",
|
||||
"runtimes/linux-musl-arm/native/libe_sqlite3.so",
|
||||
"runtimes/linux-musl-arm64/native/libe_sqlite3.so",
|
||||
"runtimes/linux-musl-x64/native/libe_sqlite3.so",
|
||||
"runtimes/linux-ppc64le/native/libe_sqlite3.so",
|
||||
"runtimes/linux-s390x/native/libe_sqlite3.so",
|
||||
"runtimes/linux-x64/native/libe_sqlite3.so",
|
||||
"runtimes/linux-x86/native/libe_sqlite3.so",
|
||||
"runtimes/maccatalyst-arm64/native/libe_sqlite3.dylib",
|
||||
"runtimes/maccatalyst-x64/native/libe_sqlite3.dylib",
|
||||
"runtimes/osx-arm64/native/libe_sqlite3.dylib",
|
||||
"runtimes/osx-x64/native/libe_sqlite3.dylib",
|
||||
"runtimes/win-arm/native/e_sqlite3.dll",
|
||||
"runtimes/win-arm64/native/e_sqlite3.dll",
|
||||
"runtimes/win-x64/native/e_sqlite3.dll",
|
||||
"runtimes/win-x86/native/e_sqlite3.dll",
|
||||
"runtimes/win10-arm/nativeassets/uap10.0/e_sqlite3.dll",
|
||||
"runtimes/win10-arm64/nativeassets/uap10.0/e_sqlite3.dll",
|
||||
"runtimes/win10-x64/nativeassets/uap10.0/e_sqlite3.dll",
|
||||
"runtimes/win10-x86/nativeassets/uap10.0/e_sqlite3.dll",
|
||||
"sqlitepclraw.lib.e_sqlite3.2.1.6.nupkg.sha512",
|
||||
"sqlitepclraw.lib.e_sqlite3.nuspec"
|
||||
]
|
||||
},
|
||||
"SQLitePCLRaw.provider.e_sqlite3/2.1.6": {
|
||||
"sha512": "PQ2Oq3yepLY4P7ll145P3xtx2bX8xF4PzaKPRpw9jZlKvfe4LE/saAV82inND9usn1XRpmxXk7Lal3MTI+6CNg==",
|
||||
"type": "package",
|
||||
"path": "sqlitepclraw.provider.e_sqlite3/2.1.6",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"lib/net6.0-windows7.0/SQLitePCLRaw.provider.e_sqlite3.dll",
|
||||
"lib/net6.0/SQLitePCLRaw.provider.e_sqlite3.dll",
|
||||
"lib/netstandard2.0/SQLitePCLRaw.provider.e_sqlite3.dll",
|
||||
"sqlitepclraw.provider.e_sqlite3.2.1.6.nupkg.sha512",
|
||||
"sqlitepclraw.provider.e_sqlite3.nuspec"
|
||||
]
|
||||
},
|
||||
"System.CodeDom/4.4.0": {
|
||||
"sha512": "2sCCb7doXEwtYAbqzbF/8UAeDRMNmPaQbU2q50Psg1J9KzumyVVCgKQY8s53WIPTufNT0DpSe9QRvVjOzfDWBA==",
|
||||
"type": "package",
|
||||
@@ -4118,6 +4433,7 @@
|
||||
"Entidades >= 1.0.0",
|
||||
"Microsoft.EntityFrameworkCore >= 8.0.8",
|
||||
"Microsoft.EntityFrameworkCore.SqlServer >= 8.0.8",
|
||||
"Microsoft.EntityFrameworkCore.Sqlite >= 8.0.8",
|
||||
"Microsoft.EntityFrameworkCore.Tools >= 8.0.8"
|
||||
]
|
||||
},
|
||||
@@ -4178,6 +4494,10 @@
|
||||
"target": "Package",
|
||||
"version": "[8.0.8, )"
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Sqlite": {
|
||||
"target": "Package",
|
||||
"version": "[8.0.8, )"
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Tools": {
|
||||
"include": "Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive",
|
||||
"suppressParent": "All",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "RfnM8S6586M=",
|
||||
"dgSpecHash": "NhK3CE/FFk0=",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Users\\fedpo\\source\\repos\\Final_Das\\Modelo\\Modelo.csproj",
|
||||
"expectedPackageFiles": [
|
||||
@@ -16,11 +16,14 @@
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.csharp\\4.5.0\\microsoft.csharp.4.5.0.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.data.sqlclient\\5.1.5\\microsoft.data.sqlclient.5.1.5.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.data.sqlclient.sni.runtime\\5.1.1\\microsoft.data.sqlclient.sni.runtime.5.1.1.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.data.sqlite.core\\8.0.8\\microsoft.data.sqlite.core.8.0.8.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.entityframeworkcore\\8.0.8\\microsoft.entityframeworkcore.8.0.8.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.entityframeworkcore.abstractions\\8.0.8\\microsoft.entityframeworkcore.abstractions.8.0.8.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.entityframeworkcore.analyzers\\8.0.8\\microsoft.entityframeworkcore.analyzers.8.0.8.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.entityframeworkcore.design\\8.0.8\\microsoft.entityframeworkcore.design.8.0.8.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.entityframeworkcore.relational\\8.0.8\\microsoft.entityframeworkcore.relational.8.0.8.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.entityframeworkcore.sqlite\\8.0.8\\microsoft.entityframeworkcore.sqlite.8.0.8.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.entityframeworkcore.sqlite.core\\8.0.8\\microsoft.entityframeworkcore.sqlite.core.8.0.8.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.entityframeworkcore.sqlserver\\8.0.8\\microsoft.entityframeworkcore.sqlserver.8.0.8.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.entityframeworkcore.tools\\8.0.8\\microsoft.entityframeworkcore.tools.8.0.8.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.extensions.caching.abstractions\\8.0.0\\microsoft.extensions.caching.abstractions.8.0.0.nupkg.sha512",
|
||||
@@ -46,6 +49,10 @@
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.sqlserver.server\\1.0.0\\microsoft.sqlserver.server.1.0.0.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\microsoft.win32.systemevents\\6.0.0\\microsoft.win32.systemevents.6.0.0.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\mono.texttemplating\\2.2.1\\mono.texttemplating.2.2.1.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\sqlitepclraw.bundle_e_sqlite3\\2.1.6\\sqlitepclraw.bundle_e_sqlite3.2.1.6.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\sqlitepclraw.core\\2.1.6\\sqlitepclraw.core.2.1.6.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\sqlitepclraw.lib.e_sqlite3\\2.1.6\\sqlitepclraw.lib.e_sqlite3.2.1.6.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\sqlitepclraw.provider.e_sqlite3\\2.1.6\\sqlitepclraw.provider.e_sqlite3.2.1.6.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\system.codedom\\4.4.0\\system.codedom.4.4.0.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\system.collections.immutable\\6.0.0\\system.collections.immutable.6.0.0.nupkg.sha512",
|
||||
"C:\\Users\\fedpo\\.nuget\\packages\\system.composition\\6.0.0\\system.composition.6.0.0.nupkg.sha512",
|
||||
|
||||
Reference in New Issue
Block a user