// using System; using GestorFacturas.API.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace GestorFacturas.API.Migrations { [DbContext(typeof(ApplicationDbContext))] partial class ApplicationDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(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(500) .HasColumnType("nvarchar(500)"); 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(500) .HasColumnType("nvarchar(500)"); 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(500) .HasColumnType("nvarchar(500)"); 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(500) .HasColumnType("nvarchar(500)"); 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("GestorFacturas.API.Models.RefreshToken", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Created") .HasColumnType("datetime2"); b.Property("Expires") .HasColumnType("datetime2"); b.Property("IsPersistent") .HasColumnType("bit"); b.Property("Revoked") .HasColumnType("datetime2"); b.Property("Token") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("UsuarioId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("UsuarioId"); b.ToTable("RefreshTokens"); }); modelBuilder.Entity("GestorFacturas.API.Models.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$l5UnZIE8bVWSUhYorVqlW.f0qgvK2zsD8aYDyTRXKjtFwwdiAfAvW", Username = "admin" }); }); modelBuilder.Entity("GestorFacturas.API.Models.RefreshToken", b => { b.HasOne("GestorFacturas.API.Models.Usuario", "Usuario") .WithMany() .HasForeignKey("UsuarioId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Usuario"); }); #pragma warning restore 612, 618 } } }