// using System; using CouchLog.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace CouchLog.Migrations { [DbContext(typeof(ApplicationDbContext))] [Migration("20251229004324_CouchLogState")] partial class CouchLogState { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "10.0.1"); modelBuilder.Entity("CouchLog.Data.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", (string)null); }); modelBuilder.Entity("CouchLog.Data.CouchLogState", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("InitializationDate") .HasColumnType("TEXT"); b.Property("IsInitialized") .HasColumnType("INTEGER"); b.HasKey("Id"); b.ToTable("CouchLogState"); }); modelBuilder.Entity("CouchLog.Data.Genre", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreationTime") .HasColumnType("TEXT"); b.Property("LastChange") .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Genres"); }); modelBuilder.Entity("CouchLog.Data.GlobalEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreationTime") .HasColumnType("TEXT"); b.Property("CreatorId") .IsRequired() .HasColumnType("TEXT"); b.Property("IsPrivate") .HasColumnType("INTEGER"); b.Property("LastChange") .HasColumnType("TEXT"); b.Property("PicturePath") .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("Title") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("TypeId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("CreatorId"); b.HasIndex("TypeId"); b.ToTable("GlobalEntities"); }); modelBuilder.Entity("CouchLog.Data.Label", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreationTime") .HasColumnType("TEXT"); b.Property("CreatorId") .IsRequired() .HasColumnType("TEXT"); b.Property("LastChange") .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("CreatorId"); b.ToTable("Labels"); }); modelBuilder.Entity("CouchLog.Data.LinkTableGlobalGenre", b => { b.Property("GlobalEntityId") .HasColumnType("INTEGER") .HasColumnOrder(0); b.Property("GenreId") .HasColumnType("INTEGER") .HasColumnOrder(1); b.HasKey("GlobalEntityId", "GenreId"); b.HasIndex("GenreId"); b.ToTable("LinkTableGlobalGenre"); }); modelBuilder.Entity("CouchLog.Data.LinkTablePrivateLabel", b => { b.Property("PrivateEntityId") .HasColumnType("INTEGER"); b.Property("LabelId") .HasColumnType("INTEGER"); b.HasKey("PrivateEntityId", "LabelId"); b.HasIndex("LabelId"); b.ToTable("LinkTablePrivateLabel"); }); modelBuilder.Entity("CouchLog.Data.LinkTablePrivateStreamingPlatform", b => { b.Property("PrivateEntityId") .HasColumnType("INTEGER"); b.Property("StreamingPlatformId") .HasColumnType("INTEGER"); b.Property("SharedListEntityId") .HasColumnType("INTEGER"); b.HasKey("PrivateEntityId", "StreamingPlatformId"); b.HasIndex("SharedListEntityId"); b.HasIndex("StreamingPlatformId"); b.ToTable("LinkTablePrivateStreamingPlatform"); }); modelBuilder.Entity("CouchLog.Data.LinkTableSharedLabel", b => { b.Property("SharedListLabelId") .HasColumnType("INTEGER"); b.Property("SharedListEntityId") .HasColumnType("INTEGER"); b.HasKey("SharedListLabelId", "SharedListEntityId"); b.HasIndex("SharedListEntityId"); b.ToTable("LinkTableSharedLabel"); }); modelBuilder.Entity("CouchLog.Data.LinkTableSharedUser", b => { b.Property("SharedListId") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("SharedListId", "UserId"); b.HasIndex("UserId"); b.ToTable("LinkTableSharedUser"); }); modelBuilder.Entity("CouchLog.Data.MediaType", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("MediaType"); }); modelBuilder.Entity("CouchLog.Data.PrivateEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreationTime") .HasColumnType("TEXT"); b.Property("Description") .HasMaxLength(1000) .HasColumnType("TEXT"); b.Property("Episode") .HasColumnType("INTEGER"); b.Property("Favorite") .HasColumnType("INTEGER"); b.Property("GlobalEntityId") .HasColumnType("INTEGER"); b.Property("LastChange") .HasColumnType("TEXT"); b.Property("Rating") .HasColumnType("INTEGER"); b.Property("Season") .HasColumnType("INTEGER"); b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); b.Property("UserWatchStatusId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("GlobalEntityId"); b.HasIndex("UserId"); b.HasIndex("UserWatchStatusId"); b.ToTable("PrivateEntities"); }); modelBuilder.Entity("CouchLog.Data.SharedList", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreationTime") .HasColumnType("TEXT"); b.Property("LastChange") .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasMaxLength(150) .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("SharedLists"); }); modelBuilder.Entity("CouchLog.Data.SharedListEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreationTime") .HasColumnType("TEXT"); b.Property("Description") .HasMaxLength(1000) .HasColumnType("TEXT"); b.Property("Episode") .HasColumnType("INTEGER"); b.Property("Favorite") .HasColumnType("INTEGER"); b.Property("GlobalEntityId") .HasColumnType("INTEGER"); b.Property("LastChange") .HasColumnType("TEXT"); b.Property("Season") .HasColumnType("INTEGER"); b.Property("SharedListId") .HasColumnType("INTEGER"); b.Property("SharedWatchStatusId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("GlobalEntityId"); b.HasIndex("SharedListId"); b.HasIndex("SharedWatchStatusId"); b.ToTable("SharedListEntities"); }); modelBuilder.Entity("CouchLog.Data.SharedListLabel", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreationTime") .HasColumnType("TEXT"); b.Property("LastChange") .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("SharedListId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("SharedListId"); b.ToTable("SharedListLabels"); }); modelBuilder.Entity("CouchLog.Data.SharedWatchStatus", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ColorCode") .HasMaxLength(7) .HasColumnType("TEXT"); b.Property("CreationTime") .HasColumnType("TEXT"); b.Property("Description") .HasMaxLength(255) .HasColumnType("TEXT"); b.Property("LastChange") .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("SharedListId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("SharedListId"); b.ToTable("SharedWatchStatuses"); }); modelBuilder.Entity("CouchLog.Data.StreamingPlatform", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreationTime") .HasColumnType("TEXT"); b.Property("LastChange") .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("PicturePath") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("StreamingPlatforms"); }); modelBuilder.Entity("CouchLog.Data.UserWatchStatus", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ColorCode") .HasMaxLength(7) .HasColumnType("TEXT"); b.Property("CreationTime") .HasColumnType("TEXT"); b.Property("Description") .HasMaxLength(255) .HasColumnType("TEXT"); b.Property("LastChange") .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("UserWatchStatuses"); }); 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", (string)null); }); 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", (string)null); }); 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", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") .HasColumnType("TEXT"); b.Property("ProviderKey") .HasColumnType("TEXT"); b.Property("ProviderDisplayName") .HasColumnType("TEXT"); b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("LoginProvider", "ProviderKey"); b.HasIndex("UserId"); b.ToTable("AspNetUserLogins", (string)null); }); 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", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId") .HasColumnType("TEXT"); b.Property("LoginProvider") .HasColumnType("TEXT"); b.Property("Name") .HasColumnType("TEXT"); b.Property("Value") .HasColumnType("TEXT"); b.HasKey("UserId", "LoginProvider", "Name"); b.ToTable("AspNetUserTokens", (string)null); }); modelBuilder.Entity("CouchLog.Data.GlobalEntity", b => { b.HasOne("CouchLog.Data.ApplicationUser", "User") .WithMany("CreatedGlobalEntities") .HasForeignKey("CreatorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("CouchLog.Data.MediaType", "MediaType") .WithMany("GlobalEntities") .HasForeignKey("TypeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("MediaType"); b.Navigation("User"); }); modelBuilder.Entity("CouchLog.Data.Label", b => { b.HasOne("CouchLog.Data.ApplicationUser", "User") .WithMany("CreatedLabels") .HasForeignKey("CreatorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("CouchLog.Data.LinkTableGlobalGenre", b => { b.HasOne("CouchLog.Data.Genre", "Genre") .WithMany("LinkTableGlobalGenres") .HasForeignKey("GenreId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("CouchLog.Data.GlobalEntity", "GlobalEntity") .WithMany("LinkTableGlobalGenres") .HasForeignKey("GlobalEntityId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Genre"); b.Navigation("GlobalEntity"); }); modelBuilder.Entity("CouchLog.Data.LinkTablePrivateLabel", b => { b.HasOne("CouchLog.Data.Label", "Label") .WithMany("LinkTablePrivateLabels") .HasForeignKey("LabelId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("CouchLog.Data.PrivateEntity", "PrivateEntity") .WithMany("PrivateEntityLabels") .HasForeignKey("PrivateEntityId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Label"); b.Navigation("PrivateEntity"); }); modelBuilder.Entity("CouchLog.Data.LinkTablePrivateStreamingPlatform", b => { b.HasOne("CouchLog.Data.PrivateEntity", "PrivateEntity") .WithMany("PrivateStreamingPlatforms") .HasForeignKey("PrivateEntityId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("CouchLog.Data.SharedListEntity", null) .WithMany("LinkTablePrivateStreamingPlatforms") .HasForeignKey("SharedListEntityId"); b.HasOne("CouchLog.Data.StreamingPlatform", "StreamingPlatform") .WithMany() .HasForeignKey("StreamingPlatformId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("PrivateEntity"); b.Navigation("StreamingPlatform"); }); modelBuilder.Entity("CouchLog.Data.LinkTableSharedLabel", b => { b.HasOne("CouchLog.Data.SharedListEntity", "SharedListEntity") .WithMany("LinkTableSharedLabels") .HasForeignKey("SharedListEntityId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("CouchLog.Data.SharedListLabel", "SharedListLabel") .WithMany("LinkTableSharedLabels") .HasForeignKey("SharedListLabelId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("SharedListEntity"); b.Navigation("SharedListLabel"); }); modelBuilder.Entity("CouchLog.Data.LinkTableSharedUser", b => { b.HasOne("CouchLog.Data.SharedList", "SharedList") .WithMany("SharedListUsers") .HasForeignKey("SharedListId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("CouchLog.Data.ApplicationUser", "User") .WithMany("LinkTableSharedUsers") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("SharedList"); b.Navigation("User"); }); modelBuilder.Entity("CouchLog.Data.PrivateEntity", b => { b.HasOne("CouchLog.Data.GlobalEntity", "GlobalEntity") .WithMany("PrivateEntities") .HasForeignKey("GlobalEntityId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("CouchLog.Data.ApplicationUser", "User") .WithMany("PrivateEntities") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("CouchLog.Data.UserWatchStatus", "UserWatchStatus") .WithMany() .HasForeignKey("UserWatchStatusId"); b.Navigation("GlobalEntity"); b.Navigation("User"); b.Navigation("UserWatchStatus"); }); modelBuilder.Entity("CouchLog.Data.SharedListEntity", b => { b.HasOne("CouchLog.Data.GlobalEntity", "GlobalEntity") .WithMany("SharedListEntities") .HasForeignKey("GlobalEntityId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("CouchLog.Data.SharedList", "SharedList") .WithMany("SharedListEntities") .HasForeignKey("SharedListId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("CouchLog.Data.SharedWatchStatus", "SharedWatchStatus") .WithMany("SharedListEntities") .HasForeignKey("SharedWatchStatusId"); b.Navigation("GlobalEntity"); b.Navigation("SharedList"); b.Navigation("SharedWatchStatus"); }); modelBuilder.Entity("CouchLog.Data.SharedListLabel", b => { b.HasOne("CouchLog.Data.SharedList", "SharedList") .WithMany("SharedListLabels") .HasForeignKey("SharedListId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("SharedList"); }); modelBuilder.Entity("CouchLog.Data.SharedWatchStatus", b => { b.HasOne("CouchLog.Data.SharedList", "SharedList") .WithMany("SharedWatchStatuses") .HasForeignKey("SharedListId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("SharedList"); }); 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("CouchLog.Data.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.HasOne("CouchLog.Data.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("CouchLog.Data.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.HasOne("CouchLog.Data.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("CouchLog.Data.ApplicationUser", b => { b.Navigation("CreatedGlobalEntities"); b.Navigation("CreatedLabels"); b.Navigation("LinkTableSharedUsers"); b.Navigation("PrivateEntities"); }); modelBuilder.Entity("CouchLog.Data.Genre", b => { b.Navigation("LinkTableGlobalGenres"); }); modelBuilder.Entity("CouchLog.Data.GlobalEntity", b => { b.Navigation("LinkTableGlobalGenres"); b.Navigation("PrivateEntities"); b.Navigation("SharedListEntities"); }); modelBuilder.Entity("CouchLog.Data.Label", b => { b.Navigation("LinkTablePrivateLabels"); }); modelBuilder.Entity("CouchLog.Data.MediaType", b => { b.Navigation("GlobalEntities"); }); modelBuilder.Entity("CouchLog.Data.PrivateEntity", b => { b.Navigation("PrivateEntityLabels"); b.Navigation("PrivateStreamingPlatforms"); }); modelBuilder.Entity("CouchLog.Data.SharedList", b => { b.Navigation("SharedListEntities"); b.Navigation("SharedListLabels"); b.Navigation("SharedListUsers"); b.Navigation("SharedWatchStatuses"); }); modelBuilder.Entity("CouchLog.Data.SharedListEntity", b => { b.Navigation("LinkTablePrivateStreamingPlatforms"); b.Navigation("LinkTableSharedLabels"); }); modelBuilder.Entity("CouchLog.Data.SharedListLabel", b => { b.Navigation("LinkTableSharedLabels"); }); modelBuilder.Entity("CouchLog.Data.SharedWatchStatus", b => { b.Navigation("SharedListEntities"); }); #pragma warning restore 612, 618 } } }