// using System; using GestorFacturas.API.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace GestorFacturas.API.Migrations { [DbContext(typeof(ApplicationDbContext))] [Migration("20251210155728_AgregaAutenticacion")] partial class AgregaAutenticacion { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "10.0.1") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("GestorFacturas.API.Models.Configuracion", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("AvisoMail") .HasColumnType("bit"); b.Property("DBClave") .HasMaxLength(200) .HasColumnType("nvarchar(200)"); b.Property("DBNombre") .IsRequired() .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("DBServidor") .IsRequired() .HasMaxLength(200) .HasColumnType("nvarchar(200)"); b.Property("DBTrusted") .HasColumnType("bit"); b.Property("DBUsuario") .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("EnEjecucion") .HasColumnType("bit"); b.Property("Estado") .HasColumnType("bit"); b.Property("HoraEjecucion") .IsRequired() .HasMaxLength(10) .HasColumnType("nvarchar(10)"); b.Property("Periodicidad") .IsRequired() .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.Property("RutaDestino") .IsRequired() .HasMaxLength(500) .HasColumnType("nvarchar(500)"); b.Property("RutaFacturas") .IsRequired() .HasMaxLength(500) .HasColumnType("nvarchar(500)"); b.Property("SMTPClave") .HasMaxLength(200) .HasColumnType("nvarchar(200)"); b.Property("SMTPDestinatario") .HasMaxLength(200) .HasColumnType("nvarchar(200)"); b.Property("SMTPPuerto") .HasColumnType("int"); b.Property("SMTPSSL") .HasColumnType("bit"); b.Property("SMTPServidor") .HasMaxLength(200) .HasColumnType("nvarchar(200)"); b.Property("SMTPUsuario") .HasMaxLength(200) .HasColumnType("nvarchar(200)"); b.Property("UltimaEjecucion") .HasColumnType("datetime2"); b.Property("ValorPeriodicidad") .HasColumnType("int"); b.HasKey("Id"); b.ToTable("Configuraciones", (string)null); b.HasData( new { Id = 1, AvisoMail = false, DBNombre = "", DBServidor = "TECNICA3", DBTrusted = true, EnEjecucion = false, Estado = true, HoraEjecucion = "00:00:00", Periodicidad = "Dias", RutaDestino = "", RutaFacturas = "", SMTPPuerto = 587, SMTPSSL = true, ValorPeriodicidad = 1 }); }); modelBuilder.Entity("GestorFacturas.API.Models.Evento", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Enviado") .HasColumnType("bit"); b.Property("Fecha") .HasColumnType("datetime2"); b.Property("Mensaje") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Tipo") .IsRequired() .HasMaxLength(20) .HasColumnType("nvarchar(20)"); b.HasKey("Id"); b.HasIndex("Fecha"); b.HasIndex("Tipo"); b.ToTable("Eventos", (string)null); }); modelBuilder.Entity("Usuario", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Nombre") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("PasswordHash") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Username") .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); b.ToTable("Usuarios"); b.HasData( new { Id = 1, Nombre = "Administrador", PasswordHash = "$2a$11$Z5.Cg.y.u.e.t.c.h.a.n.g.e.m.e", Username = "admin" }); }); #pragma warning restore 612, 618 } } }