// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Modules.Library.Database.Database; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace Modules.Library.Database.Migrations { [DbContext(typeof(LibraryDbContext))] partial class LibraryDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "8.0.10") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Modules.Library.Database.Database.Models.Anime.AnimeItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AnimeTitleId") .HasColumnType("uuid"); b.Property("Completed") .HasColumnType("boolean"); b.Property("Deleted") .HasColumnType("boolean"); b.Property("ExpirationTime") .HasColumnType("interval"); b.Property("Order") .HasColumnType("integer"); b.Property("Variant") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("AnimeTitleId"); b.ToTable("AnimeItem"); b.UseTpcMappingStrategy(); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.Anime.AnimeTitle", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Completed") .HasColumnType("boolean"); b.Property("Deleted") .HasColumnType("boolean"); b.Property("ExpirationTime") .HasColumnType("interval"); b.HasKey("Id"); b.ToTable("AnimeTitles"); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.CommonProperties.CommonProperties", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AnimeItemId") .HasColumnType("uuid"); b.Property("AnimeTitleId") .HasColumnType("uuid"); b.Property("AnnouncementDate") .HasColumnType("timestamp with time zone"); b.Property("EstimatedReleaseDate") .HasColumnType("timestamp with time zone"); b.Property("PreviewId") .HasColumnType("uuid"); b.Property("ReleaseDate") .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.HasIndex("AnimeItemId") .IsUnique(); b.HasIndex("AnimeTitleId") .IsUnique(); b.HasIndex("PreviewId"); b.ToTable("CommonProperties"); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.CommonProperties.DescriptionItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CommonPropertiesId") .HasColumnType("uuid"); b.Property("IsOriginal") .HasColumnType("boolean"); b.Property("LanguageId") .HasColumnType("uuid"); b.Property("Value") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("CommonPropertiesId"); b.ToTable("DescriptionItem"); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.CommonProperties.GenreProportionItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CommonPropertiesId") .HasColumnType("uuid"); b.Property("GenreId") .HasColumnType("uuid"); b.Property("Proportion") .HasColumnType("numeric"); b.HasKey("Id"); b.HasIndex("CommonPropertiesId"); b.ToTable("GenreProportionItem"); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.CommonProperties.NameItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CommonPropertiesId") .HasColumnType("uuid"); b.Property("LanguageId") .HasColumnType("uuid"); b.Property("Type") .IsRequired() .HasColumnType("text"); b.Property("Value") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("CommonPropertiesId"); b.ToTable("NameItem"); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.Genre.Genre", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Deleted") .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.HasKey("Id"); b.ToTable("Genres"); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.Language.Language", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CodeIso3") .IsRequired() .HasMaxLength(3) .HasColumnType("character varying(3)"); b.Property("Deleted") .HasColumnType("boolean"); b.Property("IconId") .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.HasKey("Id"); b.ToTable("Languages"); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.MediaInfo", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CommonPropertiesId") .HasColumnType("uuid"); b.Property("ContentType") .IsRequired() .HasColumnType("text"); b.Property("Deleted") .HasColumnType("boolean"); b.Property("Type") .IsRequired() .HasColumnType("text"); b.Property("Url") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("CommonPropertiesId"); b.ToTable("MediaInfos"); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.Anime.AnimeEpisode", b => { b.HasBaseType("Modules.Library.Database.Database.Models.Anime.AnimeItem"); b.Property("AnimeSeasonId") .HasColumnType("uuid"); b.Property("Duration") .HasColumnType("interval"); b.Property("Number") .HasColumnType("integer"); b.Property("Type") .IsRequired() .HasColumnType("text"); b.HasIndex("AnimeSeasonId"); b.ToTable("Anime_Episodes", (string)null); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.Anime.AnimeSeason", b => { b.HasBaseType("Modules.Library.Database.Database.Models.Anime.AnimeItem"); b.Property("Director") .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("Number") .HasColumnType("integer"); b.Property("OriginCountry") .HasMaxLength(64) .HasColumnType("character varying(64)"); b.ToTable("Anime_Seasons", (string)null); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.Anime.AnimeItem", b => { b.HasOne("Modules.Library.Database.Database.Models.Anime.AnimeTitle", null) .WithMany("Items") .HasForeignKey("AnimeTitleId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.CommonProperties.CommonProperties", b => { b.HasOne("Modules.Library.Database.Database.Models.Anime.AnimeItem", null) .WithOne("CommonProperties") .HasForeignKey("Modules.Library.Database.Database.Models.CommonProperties.CommonProperties", "AnimeItemId") .OnDelete(DeleteBehavior.Cascade); b.HasOne("Modules.Library.Database.Database.Models.Anime.AnimeTitle", null) .WithOne("CommonProperties") .HasForeignKey("Modules.Library.Database.Database.Models.CommonProperties.CommonProperties", "AnimeTitleId") .OnDelete(DeleteBehavior.Cascade); b.HasOne("Modules.Library.Database.Database.Models.MediaInfo", "Preview") .WithMany() .HasForeignKey("PreviewId") .OnDelete(DeleteBehavior.Cascade); b.Navigation("Preview"); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.CommonProperties.DescriptionItem", b => { b.HasOne("Modules.Library.Database.Database.Models.CommonProperties.CommonProperties", null) .WithMany("Descriptions") .HasForeignKey("CommonPropertiesId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.CommonProperties.GenreProportionItem", b => { b.HasOne("Modules.Library.Database.Database.Models.CommonProperties.CommonProperties", null) .WithMany("Genres") .HasForeignKey("CommonPropertiesId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.CommonProperties.NameItem", b => { b.HasOne("Modules.Library.Database.Database.Models.CommonProperties.CommonProperties", null) .WithMany("Names") .HasForeignKey("CommonPropertiesId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.MediaInfo", b => { b.HasOne("Modules.Library.Database.Database.Models.CommonProperties.CommonProperties", null) .WithMany("RelatedContent") .HasForeignKey("CommonPropertiesId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.Anime.AnimeEpisode", b => { b.HasOne("Modules.Library.Database.Database.Models.Anime.AnimeSeason", null) .WithMany("Episodes") .HasForeignKey("AnimeSeasonId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.Anime.AnimeItem", b => { b.Navigation("CommonProperties") .IsRequired(); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.Anime.AnimeTitle", b => { b.Navigation("CommonProperties") .IsRequired(); b.Navigation("Items"); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.CommonProperties.CommonProperties", b => { b.Navigation("Descriptions"); b.Navigation("Genres"); b.Navigation("Names"); b.Navigation("RelatedContent"); }); modelBuilder.Entity("Modules.Library.Database.Database.Models.Anime.AnimeSeason", b => { b.Navigation("Episodes"); }); #pragma warning restore 612, 618 } } }