// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Props.Data; namespace Props.Data.Migrations { [DbContext(typeof(ApplicationDbContext))] [Migration("20210817042955_InitialCreate")] partial class InitialCreate { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "5.0.8"); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("TEXT"); b.Property("Name") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("NormalizedName") .HasMaxLength(256) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("NormalizedName") .IsUnique() .HasDatabaseName("RoleNameIndex"); b.ToTable("AspNetRoles"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ClaimType") .HasColumnType("TEXT"); b.Property("ClaimValue") .HasColumnType("TEXT"); b.Property("RoleId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("RoleId"); b.ToTable("AspNetRoleClaims"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ClaimType") .HasColumnType("TEXT"); b.Property("ClaimValue") .HasColumnType("TEXT"); b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("AspNetUserClaims"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") .HasMaxLength(128) .HasColumnType("TEXT"); b.Property("ProviderKey") .HasMaxLength(128) .HasColumnType("TEXT"); b.Property("ProviderDisplayName") .HasColumnType("TEXT"); b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("LoginProvider", "ProviderKey"); b.HasIndex("UserId"); b.ToTable("AspNetUserLogins"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.Property("UserId") .HasColumnType("TEXT"); b.Property("RoleId") .HasColumnType("TEXT"); b.HasKey("UserId", "RoleId"); b.HasIndex("RoleId"); b.ToTable("AspNetUserRoles"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId") .HasColumnType("TEXT"); b.Property("LoginProvider") .HasMaxLength(128) .HasColumnType("TEXT"); b.Property("Name") .HasMaxLength(128) .HasColumnType("TEXT"); b.Property("Value") .HasColumnType("TEXT"); b.HasKey("UserId", "LoginProvider", "Name"); b.ToTable("AspNetUserTokens"); }); modelBuilder.Entity("Props.Models.ResultsPreferences", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ApplicationUserId") .IsRequired() .HasColumnType("TEXT"); b.Property("Order") .IsRequired() .HasColumnType("TEXT"); b.Property("ProfileName") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("ApplicationUserId") .IsUnique(); b.ToTable("ResultsPreferences"); }); modelBuilder.Entity("Props.Models.Search.ProductListingInfo", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Hits") .HasColumnType("INTEGER"); b.Property("ProductListing") .HasColumnType("TEXT"); b.Property("ProductListingIdentifier") .HasColumnType("TEXT"); b.Property("ShopName") .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("ProductListingInfos"); }); modelBuilder.Entity("Props.Models.Search.QueryWordInfo", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Hits") .HasColumnType("INTEGER"); b.Property("Word") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("QueryWords"); }); modelBuilder.Entity("Props.Models.Search.SearchOutline", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("DisabledShops") .IsRequired() .HasColumnType("TEXT"); b.Property("Filters") .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("SearchOutlinePreferencesId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("SearchOutlinePreferencesId"); b.ToTable("SearchOutline"); }); modelBuilder.Entity("Props.Models.User.ApplicationUser", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("AccessFailedCount") .HasColumnType("INTEGER"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("TEXT"); b.Property("Email") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("EmailConfirmed") .HasColumnType("INTEGER"); b.Property("LockoutEnabled") .HasColumnType("INTEGER"); b.Property("LockoutEnd") .HasColumnType("TEXT"); b.Property("NormalizedEmail") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("NormalizedUserName") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("PasswordHash") .HasColumnType("TEXT"); b.Property("PhoneNumber") .HasColumnType("TEXT"); b.Property("PhoneNumberConfirmed") .HasColumnType("INTEGER"); b.Property("SecurityStamp") .HasColumnType("TEXT"); b.Property("TwoFactorEnabled") .HasColumnType("INTEGER"); b.Property("UserName") .HasMaxLength(256) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("NormalizedEmail") .HasDatabaseName("EmailIndex"); b.HasIndex("NormalizedUserName") .IsUnique() .HasDatabaseName("UserNameIndex"); b.ToTable("AspNetUsers"); }); modelBuilder.Entity("Props.Models.User.SearchOutlinePreferences", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ApplicationUserId") .IsRequired() .HasColumnType("TEXT"); b.Property("NameOfLastUsed") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("ApplicationUserId") .IsUnique(); b.ToTable("SearchOutlinePreferences"); }); modelBuilder.Entity("Props.Shared.Models.User.ApplicationPreferences", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ApplicationUserId") .IsRequired() .HasColumnType("TEXT"); b.Property("DarkMode") .HasColumnType("INTEGER"); b.Property("EnableSearchHistory") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("ApplicationUserId") .IsUnique(); b.ToTable("ApplicationPreferences"); }); modelBuilder.Entity("QueryWordInfoQueryWordInfo", b => { b.Property("FollowingId") .HasColumnType("INTEGER"); b.Property("PrecedingId") .HasColumnType("INTEGER"); b.HasKey("FollowingId", "PrecedingId"); b.HasIndex("PrecedingId"); b.ToTable("QueryWordInfoQueryWordInfo"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.HasOne("Props.Models.User.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.HasOne("Props.Models.User.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Props.Models.User.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.HasOne("Props.Models.User.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Props.Models.ResultsPreferences", b => { b.HasOne("Props.Models.User.ApplicationUser", "ApplicationUser") .WithOne("ResultsPreferences") .HasForeignKey("Props.Models.ResultsPreferences", "ApplicationUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("ApplicationUser"); }); modelBuilder.Entity("Props.Models.Search.SearchOutline", b => { b.HasOne("Props.Models.User.SearchOutlinePreferences", "SearchOutlinePreferences") .WithMany("SearchOutlines") .HasForeignKey("SearchOutlinePreferencesId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("SearchOutlinePreferences"); }); modelBuilder.Entity("Props.Models.User.SearchOutlinePreferences", b => { b.HasOne("Props.Models.User.ApplicationUser", "ApplicationUser") .WithOne("searchOutlinePreferences") .HasForeignKey("Props.Models.User.SearchOutlinePreferences", "ApplicationUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("ApplicationUser"); }); modelBuilder.Entity("Props.Shared.Models.User.ApplicationPreferences", b => { b.HasOne("Props.Models.User.ApplicationUser", "ApplicationUser") .WithOne("ApplicationPreferences") .HasForeignKey("Props.Shared.Models.User.ApplicationPreferences", "ApplicationUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("ApplicationUser"); }); modelBuilder.Entity("QueryWordInfoQueryWordInfo", b => { b.HasOne("Props.Models.Search.QueryWordInfo", null) .WithMany() .HasForeignKey("FollowingId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Props.Models.Search.QueryWordInfo", null) .WithMany() .HasForeignKey("PrecedingId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Props.Models.User.ApplicationUser", b => { b.Navigation("ApplicationPreferences") .IsRequired(); b.Navigation("ResultsPreferences") .IsRequired(); b.Navigation("searchOutlinePreferences") .IsRequired(); }); modelBuilder.Entity("Props.Models.User.SearchOutlinePreferences", b => { b.Navigation("SearchOutlines"); }); #pragma warning restore 612, 618 } } }