// using CSR.Infrastructure.Persistence; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace CSR.Infrastructure.Migrations { [DbContext(typeof(CSRDbContext))] partial class CSRDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "9.0.5"); modelBuilder.Entity("CSR.Infrastructure.Persistence.Role", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasColumnName("RoleId"); b.Property("Name") .IsRequired() .HasColumnType("TEXT") .HasColumnName("RoleName"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique(); b.ToTable("Roles"); }); modelBuilder.Entity("CSR.Infrastructure.Persistence.User", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Email") .IsRequired() .HasColumnType("TEXT"); b.Property("PasswordHash") .IsRequired() .HasColumnType("TEXT") .HasColumnName("Password"); b.Property("RoleId") .HasColumnType("INTEGER"); b.Property("Username") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("RoleId"); b.HasIndex("Username") .IsUnique(); b.ToTable("Users"); }); modelBuilder.Entity("CSR.Infrastructure.Persistence.User", b => { b.HasOne("CSR.Infrastructure.Persistence.Role", "Role") .WithMany("Users") .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Role"); }); modelBuilder.Entity("CSR.Infrastructure.Persistence.Role", b => { b.Navigation("Users"); }); #pragma warning restore 612, 618 } } }