//
using System;
using ERP.TallerAutomotriz.Infrastructure.Persistence;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ERP.TallerAutomotriz.Infrastructure.Persistence.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20260425115332_InitialCreate")]
partial class InitialCreate
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("dbo")
.HasAnnotation("ProductVersion", "8.0.10")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Customers.Cliente", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Activo")
.HasColumnType("bit");
b.Property("CargoContacto")
.HasColumnType("nvarchar(max)");
b.Property("Ciudad")
.HasColumnType("nvarchar(max)");
b.Property("Codigo")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("ContactoPrincipal")
.HasColumnType("nvarchar(max)");
b.Property("CreadoPor")
.HasColumnType("nvarchar(max)");
b.Property("Direccion")
.HasColumnType("nvarchar(max)");
b.Property("DocumentoIdentidad")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("Email")
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property("FechaCreacion")
.HasColumnType("datetime2");
b.Property("FechaModificacion")
.HasColumnType("datetime2");
b.Property("LimiteCredito")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property("ModificadoPor")
.HasColumnType("nvarchar(max)");
b.Property("NombreComercial")
.HasColumnType("nvarchar(max)");
b.Property("NombreRazonSocial")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("Notas")
.HasColumnType("nvarchar(max)");
b.Property("RecibeNotificaciones")
.HasColumnType("bit");
b.Property("SaldoPendiente")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property("TecnicoConfianzaId")
.HasColumnType("int");
b.Property("TelefonoPrincipal")
.HasColumnType("nvarchar(max)");
b.Property("TelefonoSecundario")
.HasColumnType("nvarchar(max)");
b.Property("Tipo")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("Codigo")
.IsUnique();
b.HasIndex("DocumentoIdentidad");
b.ToTable("Clientes", "crm");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Customers.Vehiculo", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Activo")
.HasColumnType("bit");
b.Property("Anio")
.HasColumnType("int");
b.Property("ClienteId")
.HasColumnType("int");
b.Property("Color")
.HasColumnType("nvarchar(max)");
b.Property("Combustible")
.HasColumnType("int");
b.Property("CreadoPor")
.HasColumnType("nvarchar(max)");
b.Property("FechaCreacion")
.HasColumnType("datetime2");
b.Property("FechaModificacion")
.HasColumnType("datetime2");
b.Property("KilometrajeActual")
.HasColumnType("int");
b.Property("KilometrajeUltimoServicio")
.HasColumnType("int");
b.Property("Marca")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("Modelo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("ModificadoPor")
.HasColumnType("nvarchar(max)");
b.Property("Motor")
.HasColumnType("nvarchar(max)");
b.Property("Notas")
.HasColumnType("nvarchar(max)");
b.Property("NumeroChasis")
.HasColumnType("nvarchar(max)");
b.Property("Placa")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("ProximoServicioFecha")
.HasColumnType("datetime2");
b.Property("ProximoServicioKm")
.HasColumnType("int");
b.Property("Transmision")
.HasColumnType("int");
b.Property("UltimoServicio")
.HasColumnType("datetime2");
b.Property("VIN")
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("ClienteId");
b.HasIndex("Placa")
.IsUnique();
b.HasIndex("VIN");
b.ToTable("Vehiculos", "crm");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Inventory.Almacen", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Activo")
.HasColumnType("bit");
b.Property("Codigo")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("CreadoPor")
.HasColumnType("nvarchar(max)");
b.Property("Direccion")
.HasColumnType("nvarchar(max)");
b.Property("EsPrincipal")
.HasColumnType("bit");
b.Property("FechaCreacion")
.HasColumnType("datetime2");
b.Property("FechaModificacion")
.HasColumnType("datetime2");
b.Property("ModificadoPor")
.HasColumnType("nvarchar(max)");
b.Property("Nombre")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("Responsable")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("Codigo")
.IsUnique();
b.ToTable("Almacenes", "inventario");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Inventory.CategoriaRepuesto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Activo")
.HasColumnType("bit");
b.Property("CategoriaPadreId")
.HasColumnType("int");
b.Property("CreadoPor")
.HasColumnType("nvarchar(max)");
b.Property("Descripcion")
.HasColumnType("nvarchar(max)");
b.Property("FechaCreacion")
.HasColumnType("datetime2");
b.Property("FechaModificacion")
.HasColumnType("datetime2");
b.Property("ModificadoPor")
.HasColumnType("nvarchar(max)");
b.Property("Nombre")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.HasKey("Id");
b.HasIndex("CategoriaPadreId");
b.ToTable("CategoriasRepuesto", "inventario");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Inventory.CompatibilidadRepuesto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("AnioDesde")
.HasColumnType("int");
b.Property("AnioHasta")
.HasColumnType("int");
b.Property("Marca")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Modelo")
.HasColumnType("nvarchar(max)");
b.Property("Notas")
.HasColumnType("nvarchar(max)");
b.Property("RepuestoId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("RepuestoId");
b.ToTable("CompatibilidadesRepuesto", "inventario");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Inventory.MovimientoInventario", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("AlmacenId")
.HasColumnType("int");
b.Property("Cantidad")
.HasPrecision(18, 4)
.HasColumnType("decimal(18,4)");
b.Property("CostoUnitario")
.HasPrecision(18, 4)
.HasColumnType("decimal(18,4)");
b.Property("DocumentoReferenciaId")
.HasColumnType("int");
b.Property("Fecha")
.HasColumnType("datetime2");
b.Property("FechaVencimiento")
.HasColumnType("datetime2");
b.Property("Justificacion")
.HasColumnType("nvarchar(max)");
b.Property("Lote")
.HasColumnType("nvarchar(max)");
b.Property("NumeroDocumento")
.HasColumnType("nvarchar(max)");
b.Property("NumeroSerie")
.HasColumnType("nvarchar(max)");
b.Property("RepuestoId")
.HasColumnType("int");
b.Property("SaldoAnterior")
.HasPrecision(18, 4)
.HasColumnType("decimal(18,4)");
b.Property("SaldoNuevo")
.HasPrecision(18, 4)
.HasColumnType("decimal(18,4)");
b.Property("Tipo")
.HasColumnType("int");
b.Property("TipoDocumento")
.HasColumnType("nvarchar(max)");
b.Property("Usuario")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("AlmacenId");
b.HasIndex("RepuestoId");
b.ToTable("MovimientosInventario", "inventario");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Inventory.Repuesto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Activo")
.HasColumnType("bit");
b.Property("CategoriaId")
.HasColumnType("int");
b.Property("CodigoBarras")
.HasColumnType("nvarchar(450)");
b.Property("CodigoInterno")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property("CodigoOEM")
.HasColumnType("nvarchar(450)");
b.Property("CostoPromedio")
.HasPrecision(18, 4)
.HasColumnType("decimal(18,4)");
b.Property("CostoUltimo")
.HasPrecision(18, 4)
.HasColumnType("decimal(18,4)");
b.Property("CreadoPor")
.HasColumnType("nvarchar(max)");
b.Property("Descripcion")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("DescripcionLarga")
.HasColumnType("nvarchar(max)");
b.Property("FechaCreacion")
.HasColumnType("datetime2");
b.Property("FechaModificacion")
.HasColumnType("datetime2");
b.Property("ManejaLote")
.HasColumnType("bit");
b.Property("ManejaSerie")
.HasColumnType("bit");
b.Property("MesesGarantia")
.HasColumnType("int");
b.Property("MetodoCosteo")
.HasColumnType("int");
b.Property("ModificadoPor")
.HasColumnType("nvarchar(max)");
b.Property("PrecioVenta")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property("StockActual")
.HasPrecision(18, 4)
.HasColumnType("decimal(18,4)");
b.Property("StockMaximo")
.HasPrecision(18, 4)
.HasColumnType("decimal(18,4)");
b.Property("StockMinimo")
.HasPrecision(18, 4)
.HasColumnType("decimal(18,4)");
b.Property("TieneGarantia")
.HasColumnType("bit");
b.Property("Ubicacion")
.HasColumnType("nvarchar(max)");
b.Property("UnidadMedida")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("UrlImagen")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("CategoriaId");
b.HasIndex("CodigoBarras");
b.HasIndex("CodigoInterno")
.IsUnique();
b.HasIndex("CodigoOEM");
b.ToTable("Repuestos", "inventario");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Inventory.StockAlmacen", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("AlmacenId")
.HasColumnType("int");
b.Property("Cantidad")
.HasPrecision(18, 4)
.HasColumnType("decimal(18,4)");
b.Property("RepuestoId")
.HasColumnType("int");
b.Property("Ubicacion")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("AlmacenId");
b.HasIndex("RepuestoId", "AlmacenId")
.IsUnique();
b.ToTable("StockAlmacenes", "inventario");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Personnel.Comision", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Fecha")
.HasColumnType("datetime2");
b.Property("FechaPago")
.HasColumnType("datetime2");
b.Property("MontoBase")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property("MontoComision")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property("OrdenTrabajoId")
.HasColumnType("int");
b.Property("Pagada")
.HasColumnType("bit");
b.Property("Porcentaje")
.HasPrecision(5, 2)
.HasColumnType("decimal(5,2)");
b.Property("TecnicoId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("TecnicoId");
b.ToTable("Comisiones", "personal");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Personnel.RegistroAsistencia", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Fecha")
.HasColumnType("datetime2");
b.Property("HoraEntrada")
.HasColumnType("datetime2");
b.Property("HoraSalida")
.HasColumnType("datetime2");
b.Property("HorasExtras")
.HasPrecision(5, 2)
.HasColumnType("decimal(5,2)");
b.Property("HorasTrabajadas")
.HasPrecision(5, 2)
.HasColumnType("decimal(5,2)");
b.Property("Observaciones")
.HasColumnType("nvarchar(max)");
b.Property("TecnicoId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("TecnicoId");
b.ToTable("RegistrosAsistencia", "personal");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Personnel.Tecnico", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Activo")
.HasColumnType("bit");
b.Property("Apellidos")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("Codigo")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("CreadoPor")
.HasColumnType("nvarchar(max)");
b.Property("Direccion")
.HasColumnType("nvarchar(max)");
b.Property("DocumentoIdentidad")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Email")
.HasColumnType("nvarchar(max)");
b.Property("Especialidades")
.HasColumnType("nvarchar(max)");
b.Property("FechaCreacion")
.HasColumnType("datetime2");
b.Property("FechaIngreso")
.HasColumnType("datetime2");
b.Property("FechaModificacion")
.HasColumnType("datetime2");
b.Property("ModificadoPor")
.HasColumnType("nvarchar(max)");
b.Property("Nivel")
.HasColumnType("int");
b.Property("Nombres")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("PorcentajeComision")
.HasPrecision(5, 2)
.HasColumnType("decimal(5,2)");
b.Property("TarifaHora")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property("Telefono")
.HasColumnType("nvarchar(max)");
b.Property("UrlFoto")
.HasColumnType("nvarchar(max)");
b.Property("UsuarioIdentityId")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("Codigo")
.IsUnique();
b.ToTable("Tecnicos", "personal");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Purchases.CuentaPagar", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Activo")
.HasColumnType("bit");
b.Property("CreadoPor")
.HasColumnType("nvarchar(max)");
b.Property("Estado")
.HasColumnType("int");
b.Property("FechaCreacion")
.HasColumnType("datetime2");
b.Property("FechaEmision")
.HasColumnType("datetime2");
b.Property("FechaModificacion")
.HasColumnType("datetime2");
b.Property("FechaVencimiento")
.HasColumnType("datetime2");
b.Property("ModificadoPor")
.HasColumnType("nvarchar(max)");
b.Property("Monto")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property("MontoPagado")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property("NumeroFactura")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Observaciones")
.HasColumnType("nvarchar(max)");
b.Property("OrdenCompraId")
.HasColumnType("int");
b.Property("ProveedorId")
.HasColumnType("int");
b.Property("Saldo")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.HasKey("Id");
b.HasIndex("OrdenCompraId");
b.HasIndex("ProveedorId");
b.ToTable("CuentasPagar", "compras");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Purchases.DetalleOrdenCompra", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Cantidad")
.HasPrecision(18, 4)
.HasColumnType("decimal(18,4)");
b.Property("CantidadRecibida")
.HasPrecision(18, 4)
.HasColumnType("decimal(18,4)");
b.Property("Descuento")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property("OrdenCompraId")
.HasColumnType("int");
b.Property("PrecioUnitario")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property("RepuestoId")
.HasColumnType("int");
b.Property("Subtotal")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.HasKey("Id");
b.HasIndex("OrdenCompraId");
b.HasIndex("RepuestoId");
b.ToTable("DetallesOrdenCompra", "compras");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Purchases.OrdenCompra", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Activo")
.HasColumnType("bit");
b.Property("AlmacenDestinoId")
.HasColumnType("int");
b.Property("AprobadaPor")
.HasColumnType("nvarchar(max)");
b.Property("CreadoPor")
.HasColumnType("nvarchar(max)");
b.Property("Estado")
.HasColumnType("int");
b.Property("Fecha")
.HasColumnType("datetime2");
b.Property("FechaAprobacion")
.HasColumnType("datetime2");
b.Property("FechaCreacion")
.HasColumnType("datetime2");
b.Property("FechaEntregaEsperada")
.HasColumnType("datetime2");
b.Property("FechaModificacion")
.HasColumnType("datetime2");
b.Property("Impuesto")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property("ModificadoPor")
.HasColumnType("nvarchar(max)");
b.Property("Numero")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("Observaciones")
.HasColumnType("nvarchar(max)");
b.Property("ProveedorId")
.HasColumnType("int");
b.Property("Subtotal")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property("Total")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.HasKey("Id");
b.HasIndex("AlmacenDestinoId");
b.HasIndex("Numero")
.IsUnique();
b.HasIndex("ProveedorId");
b.ToTable("OrdenesCompra", "compras");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Purchases.Proveedor", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Activo")
.HasColumnType("bit");
b.Property("CalificacionCalidad")
.HasPrecision(3, 1)
.HasColumnType("decimal(3,1)");
b.Property("CalificacionPrecio")
.HasPrecision(3, 1)
.HasColumnType("decimal(3,1)");
b.Property("CalificacionTiempo")
.HasPrecision(3, 1)
.HasColumnType("decimal(3,1)");
b.Property("Codigo")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("Contacto")
.HasColumnType("nvarchar(max)");
b.Property("CreadoPor")
.HasColumnType("nvarchar(max)");
b.Property("DiasCredito")
.HasColumnType("int");
b.Property("DiasEntrega")
.HasColumnType("int");
b.Property("Direccion")
.HasColumnType("nvarchar(max)");
b.Property("DocumentoIdentidad")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Email")
.HasColumnType("nvarchar(max)");
b.Property("FechaCreacion")
.HasColumnType("datetime2");
b.Property("FechaModificacion")
.HasColumnType("datetime2");
b.Property("ModificadoPor")
.HasColumnType("nvarchar(max)");
b.Property("NombreComercial")
.HasColumnType("nvarchar(max)");
b.Property("Notas")
.HasColumnType("nvarchar(max)");
b.Property("RazonSocial")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("Telefono")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("Codigo")
.IsUnique();
b.ToTable("Proveedores", "compras");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Sales.Caja", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Abierta")
.HasColumnType("bit");
b.Property("Activo")
.HasColumnType("bit");
b.Property("Codigo")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("CreadoPor")
.HasColumnType("nvarchar(max)");
b.Property("FechaApertura")
.HasColumnType("datetime2");
b.Property("FechaCierre")
.HasColumnType("datetime2");
b.Property("FechaCreacion")
.HasColumnType("datetime2");
b.Property("FechaModificacion")
.HasColumnType("datetime2");
b.Property("ModificadoPor")
.HasColumnType("nvarchar(max)");
b.Property("MontoApertura")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property("MontoCierre")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property("Nombre")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("Observaciones")
.HasColumnType("nvarchar(max)");
b.Property("UsuarioApertura")
.HasColumnType("nvarchar(max)");
b.Property("UsuarioCierre")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("Codigo")
.IsUnique();
b.ToTable("Cajas", "ventas");
});
modelBuilder.Entity("ERP.TallerAutomotriz.Domain.Entities.Sales.Cotizacion", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property