más cambios ahora funciona el tema de las facturas pero no el emailer
This commit is contained in:
@@ -1,437 +0,0 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,8 @@ using Modelo;
|
||||
namespace Modelo.Migrations
|
||||
{
|
||||
[DbContext(typeof(Context))]
|
||||
[Migration("20240908172708_Cambie_nombre_de_key2")]
|
||||
partial class Cambie_nombre_de_key2
|
||||
[Migration("20240930233807_initial-migration")]
|
||||
partial class initialmigration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
@@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace Modelo.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class mepaseasqlite : Migration
|
||||
public partial class initialmigration : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
553
Modelo/Migrations/ContextModelSnapshot.cs
Normal file
553
Modelo/Migrations/ContextModelSnapshot.cs
Normal file
@@ -0,0 +1,553 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Modelo;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Modelo.Migrations
|
||||
{
|
||||
[DbContext(typeof(Context))]
|
||||
partial class ContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user