// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Ombi.Store.Context.Postgres;

#nullable disable

namespace Ombi.Store.Migrations.OmbiPostgres
{
    [DbContext(typeof(OmbiPostgresContext))]
    partial class OmbiPostgresContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "6.0.22")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);

            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("text");

                    b.Property<string>("ConcurrencyStamp")
                        .IsConcurrencyToken()
                        .HasColumnType("text");

                    b.Property<string>("Name")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)");

                    b.Property<string>("NormalizedName")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)");

                    b.HasKey("Id");

                    b.HasIndex("NormalizedName")
                        .IsUnique()
                        .HasDatabaseName("RoleNameIndex");

                    b.ToTable("AspNetRoles", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<string>("ClaimType")
                        .HasColumnType("text");

                    b.Property<string>("ClaimValue")
                        .HasColumnType("text");

                    b.Property<string>("RoleId")
                        .IsRequired()
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("RoleId");

                    b.ToTable("AspNetRoleClaims", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<string>("ClaimType")
                        .HasColumnType("text");

                    b.Property<string>("ClaimValue")
                        .HasColumnType("text");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("AspNetUserClaims", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
                {
                    b.Property<string>("LoginProvider")
                        .HasColumnType("text");

                    b.Property<string>("ProviderKey")
                        .HasColumnType("text");

                    b.Property<string>("ProviderDisplayName")
                        .HasColumnType("text");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasColumnType("text");

                    b.HasKey("LoginProvider", "ProviderKey");

                    b.HasIndex("UserId");

                    b.ToTable("AspNetUserLogins", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
                {
                    b.Property<string>("UserId")
                        .HasColumnType("text");

                    b.Property<string>("RoleId")
                        .HasColumnType("text");

                    b.HasKey("UserId", "RoleId");

                    b.HasIndex("RoleId");

                    b.ToTable("AspNetUserRoles", (string)null);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
                {
                    b.Property<string>("UserId")
                        .HasColumnType("text");

                    b.Property<string>("LoginProvider")
                        .HasColumnType("text");

                    b.Property<string>("Name")
                        .HasColumnType("text");

                    b.Property<string>("Value")
                        .HasColumnType("text");

                    b.HasKey("UserId", "LoginProvider", "Name");

                    b.ToTable("AspNetUserTokens", (string)null);
                });

            modelBuilder.Entity("Ombi.Store.Entities.Audit", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<int>("AuditArea")
                        .HasColumnType("integer");

                    b.Property<int>("AuditType")
                        .HasColumnType("integer");

                    b.Property<DateTime>("DateTime")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("Description")
                        .HasColumnType("text");

                    b.Property<string>("User")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.ToTable("Audit");
                });

            modelBuilder.Entity("Ombi.Store.Entities.MobileDevices", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<DateTime>("AddedAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("Token")
                        .HasColumnType("text");

                    b.Property<string>("UserId")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("MobileDevices");
                });

            modelBuilder.Entity("Ombi.Store.Entities.NotificationTemplates", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<int>("Agent")
                        .HasColumnType("integer");

                    b.Property<bool>("Enabled")
                        .HasColumnType("boolean");

                    b.Property<string>("Message")
                        .HasColumnType("text");

                    b.Property<int>("NotificationType")
                        .HasColumnType("integer");

                    b.Property<string>("Subject")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.ToTable("NotificationTemplates");
                });

            modelBuilder.Entity("Ombi.Store.Entities.NotificationUserId", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<DateTime>("AddedAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("PlayerId")
                        .HasColumnType("text");

                    b.Property<string>("UserId")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("NotificationUserId");
                });

            modelBuilder.Entity("Ombi.Store.Entities.OmbiUser", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("text");

                    b.Property<int>("AccessFailedCount")
                        .HasColumnType("integer");

                    b.Property<string>("Alias")
                        .HasColumnType("text");

                    b.Property<string>("ConcurrencyStamp")
                        .IsConcurrencyToken()
                        .HasColumnType("text");

                    b.Property<string>("Email")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)");

                    b.Property<bool>("EmailConfirmed")
                        .HasColumnType("boolean");

                    b.Property<int?>("EpisodeRequestLimit")
                        .HasColumnType("integer");

                    b.Property<int?>("EpisodeRequestLimitType")
                        .HasColumnType("integer");

                    b.Property<string>("Language")
                        .HasColumnType("text");

                    b.Property<DateTime?>("LastLoggedIn")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("LockoutEnabled")
                        .HasColumnType("boolean");

                    b.Property<DateTimeOffset?>("LockoutEnd")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("MediaServerToken")
                        .HasColumnType("text");

                    b.Property<int?>("MovieRequestLimit")
                        .HasColumnType("integer");

                    b.Property<int?>("MovieRequestLimitType")
                        .HasColumnType("integer");

                    b.Property<int?>("MusicRequestLimit")
                        .HasColumnType("integer");

                    b.Property<int?>("MusicRequestLimitType")
                        .HasColumnType("integer");

                    b.Property<string>("NormalizedEmail")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)");

                    b.Property<string>("NormalizedUserName")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)");

                    b.Property<string>("PasswordHash")
                        .HasColumnType("text");

                    b.Property<string>("PhoneNumber")
                        .HasColumnType("text");

                    b.Property<bool>("PhoneNumberConfirmed")
                        .HasColumnType("boolean");

                    b.Property<string>("ProviderUserId")
                        .HasColumnType("text");

                    b.Property<string>("SecurityStamp")
                        .HasColumnType("text");

                    b.Property<string>("StreamingCountry")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<bool>("TwoFactorEnabled")
                        .HasColumnType("boolean");

                    b.Property<string>("UserAccessToken")
                        .HasColumnType("text");

                    b.Property<string>("UserName")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)");

                    b.Property<int>("UserType")
                        .HasColumnType("integer");

                    b.HasKey("Id");

                    b.HasIndex("NormalizedEmail")
                        .HasDatabaseName("EmailIndex");

                    b.HasIndex("NormalizedUserName")
                        .IsUnique()
                        .HasDatabaseName("UserNameIndex");

                    b.ToTable("AspNetUsers", (string)null);
                });

            modelBuilder.Entity("Ombi.Store.Entities.PlexWatchlistUserError", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<string>("MediaServerToken")
                        .HasColumnType("text");

                    b.Property<string>("UserId")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.ToTable("PlexWatchlistUserError");
                });

            modelBuilder.Entity("Ombi.Store.Entities.RecentlyAddedLog", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<DateTime>("AddedAt")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("AlbumId")
                        .HasColumnType("text");

                    b.Property<int>("ContentId")
                        .HasColumnType("integer");

                    b.Property<int>("ContentType")
                        .HasColumnType("integer");

                    b.Property<int?>("EpisodeNumber")
                        .HasColumnType("integer");

                    b.Property<int?>("SeasonNumber")
                        .HasColumnType("integer");

                    b.Property<int>("Type")
                        .HasColumnType("integer");

                    b.HasKey("Id");

                    b.ToTable("RecentlyAddedLog");
                });

            modelBuilder.Entity("Ombi.Store.Entities.RequestQueue", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<DateTime?>("Completed")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("Dts")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("Error")
                        .HasColumnType("text");

                    b.Property<int>("RequestId")
                        .HasColumnType("integer");

                    b.Property<int>("RetryCount")
                        .HasColumnType("integer");

                    b.Property<int>("Type")
                        .HasColumnType("integer");

                    b.HasKey("Id");

                    b.ToTable("RequestQueue");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.AlbumRequest", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<bool>("Approved")
                        .HasColumnType("boolean");

                    b.Property<string>("ArtistName")
                        .HasColumnType("text");

                    b.Property<bool>("Available")
                        .HasColumnType("boolean");

                    b.Property<string>("Cover")
                        .HasColumnType("text");

                    b.Property<bool?>("Denied")
                        .HasColumnType("boolean");

                    b.Property<string>("DeniedReason")
                        .HasColumnType("text");

                    b.Property<string>("Disk")
                        .HasColumnType("text");

                    b.Property<string>("ForeignAlbumId")
                        .HasColumnType("text");

                    b.Property<string>("ForeignArtistId")
                        .HasColumnType("text");

                    b.Property<DateTime>("MarkedAsApproved")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime?>("MarkedAsAvailable")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("MarkedAsDenied")
                        .HasColumnType("timestamp with time zone");

                    b.Property<decimal>("Rating")
                        .HasColumnType("numeric");

                    b.Property<DateTime>("ReleaseDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<int>("RequestType")
                        .HasColumnType("integer");

                    b.Property<string>("RequestedByAlias")
                        .HasColumnType("text");

                    b.Property<DateTime>("RequestedDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("RequestedUserId")
                        .HasColumnType("text");

                    b.Property<int>("Source")
                        .HasColumnType("integer");

                    b.Property<string>("Title")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("RequestedUserId");

                    b.ToTable("AlbumRequests");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.ChildRequests", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<bool>("Approved")
                        .HasColumnType("boolean");

                    b.Property<bool>("Available")
                        .HasColumnType("boolean");

                    b.Property<bool?>("Denied")
                        .HasColumnType("boolean");

                    b.Property<string>("DeniedReason")
                        .HasColumnType("text");

                    b.Property<int?>("IssueId")
                        .HasColumnType("integer");

                    b.Property<DateTime>("MarkedAsApproved")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime?>("MarkedAsAvailable")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("MarkedAsDenied")
                        .HasColumnType("timestamp with time zone");

                    b.Property<int>("ParentRequestId")
                        .HasColumnType("integer");

                    b.Property<int>("RequestType")
                        .HasColumnType("integer");

                    b.Property<string>("RequestedByAlias")
                        .HasColumnType("text");

                    b.Property<DateTime>("RequestedDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("RequestedUserId")
                        .HasColumnType("text");

                    b.Property<int>("SeriesType")
                        .HasColumnType("integer");

                    b.Property<int>("Source")
                        .HasColumnType("integer");

                    b.Property<string>("Title")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("ParentRequestId");

                    b.HasIndex("RequestedUserId");

                    b.ToTable("ChildRequests");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.IssueCategory", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<string>("Value")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.ToTable("IssueCategory");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.IssueComments", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<string>("Comment")
                        .HasColumnType("text");

                    b.Property<DateTime>("Date")
                        .HasColumnType("timestamp with time zone");

                    b.Property<int?>("IssuesId")
                        .HasColumnType("integer");

                    b.Property<string>("UserId")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("IssuesId");

                    b.HasIndex("UserId");

                    b.ToTable("IssueComments");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.Issues", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<DateTime>("CreatedDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("Description")
                        .HasColumnType("text");

                    b.Property<int>("IssueCategoryId")
                        .HasColumnType("integer");

                    b.Property<int?>("IssueId")
                        .HasColumnType("integer");

                    b.Property<string>("ProviderId")
                        .HasColumnType("text");

                    b.Property<int?>("RequestId")
                        .HasColumnType("integer");

                    b.Property<int>("RequestType")
                        .HasColumnType("integer");

                    b.Property<DateTime?>("ResovledDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<int>("Status")
                        .HasColumnType("integer");

                    b.Property<string>("Subject")
                        .HasColumnType("text");

                    b.Property<string>("Title")
                        .HasColumnType("text");

                    b.Property<string>("UserReportedId")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("IssueCategoryId");

                    b.HasIndex("IssueId");

                    b.HasIndex("UserReportedId");

                    b.ToTable("Issues");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.MovieRequests", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<bool>("Approved")
                        .HasColumnType("boolean");

                    b.Property<bool>("Approved4K")
                        .HasColumnType("boolean");

                    b.Property<bool>("Available")
                        .HasColumnType("boolean");

                    b.Property<bool>("Available4K")
                        .HasColumnType("boolean");

                    b.Property<string>("Background")
                        .HasColumnType("text");

                    b.Property<bool?>("Denied")
                        .HasColumnType("boolean");

                    b.Property<bool?>("Denied4K")
                        .HasColumnType("boolean");

                    b.Property<string>("DeniedReason")
                        .HasColumnType("text");

                    b.Property<string>("DeniedReason4K")
                        .HasColumnType("text");

                    b.Property<DateTime?>("DigitalReleaseDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("Has4KRequest")
                        .HasColumnType("boolean");

                    b.Property<string>("ImdbId")
                        .HasColumnType("text");

                    b.Property<int?>("IssueId")
                        .HasColumnType("integer");

                    b.Property<string>("LangCode")
                        .HasColumnType("text");

                    b.Property<DateTime>("MarkedAsApproved")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("MarkedAsApproved4K")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime?>("MarkedAsAvailable")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime?>("MarkedAsAvailable4K")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("MarkedAsDenied")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("MarkedAsDenied4K")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("Overview")
                        .HasColumnType("text");

                    b.Property<string>("PosterPath")
                        .HasColumnType("text");

                    b.Property<int>("QualityOverride")
                        .HasColumnType("integer");

                    b.Property<DateTime>("ReleaseDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<int>("RequestType")
                        .HasColumnType("integer");

                    b.Property<string>("RequestedByAlias")
                        .HasColumnType("text");

                    b.Property<DateTime>("RequestedDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<DateTime>("RequestedDate4k")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("RequestedUserId")
                        .HasColumnType("text");

                    b.Property<int>("RootPathOverride")
                        .HasColumnType("integer");

                    b.Property<int>("Source")
                        .HasColumnType("integer");

                    b.Property<string>("Status")
                        .HasColumnType("text");

                    b.Property<int>("TheMovieDbId")
                        .HasColumnType("integer");

                    b.Property<string>("Title")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("RequestedUserId");

                    b.ToTable("MovieRequests");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.RequestLog", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<int>("EpisodeCount")
                        .HasColumnType("integer");

                    b.Property<DateTime>("RequestDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<int>("RequestId")
                        .HasColumnType("integer");

                    b.Property<int>("RequestType")
                        .HasColumnType("integer");

                    b.Property<string>("UserId")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("RequestLog");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.TvRequests", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<string>("Background")
                        .HasColumnType("text");

                    b.Property<int>("ExternalProviderId")
                        .HasColumnType("integer");

                    b.Property<string>("ImdbId")
                        .HasColumnType("text");

                    b.Property<int?>("LanguageProfile")
                        .HasColumnType("integer");

                    b.Property<string>("Overview")
                        .HasColumnType("text");

                    b.Property<string>("PosterPath")
                        .HasColumnType("text");

                    b.Property<int?>("QualityOverride")
                        .HasColumnType("integer");

                    b.Property<DateTime>("ReleaseDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<int?>("RootFolder")
                        .HasColumnType("integer");

                    b.Property<string>("Status")
                        .HasColumnType("text");

                    b.Property<string>("Title")
                        .HasColumnType("text");

                    b.Property<int>("TotalSeasons")
                        .HasColumnType("integer");

                    b.Property<int>("TvDbId")
                        .HasColumnType("integer");

                    b.HasKey("Id");

                    b.ToTable("TvRequests");
                });

            modelBuilder.Entity("Ombi.Store.Entities.RequestSubscription", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<int>("RequestId")
                        .HasColumnType("integer");

                    b.Property<int>("RequestType")
                        .HasColumnType("integer");

                    b.Property<string>("UserId")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("RequestSubscription");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Tokens", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<string>("Token")
                        .HasColumnType("text");

                    b.Property<string>("UserId")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("Tokens");
                });

            modelBuilder.Entity("Ombi.Store.Entities.UserNotificationPreferences", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<int>("Agent")
                        .HasColumnType("integer");

                    b.Property<bool>("Enabled")
                        .HasColumnType("boolean");

                    b.Property<string>("UserId")
                        .HasColumnType("text");

                    b.Property<string>("Value")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("UserNotificationPreferences");
                });

            modelBuilder.Entity("Ombi.Store.Entities.UserQualityProfiles", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<int>("Radarr4KQualityProfile")
                        .HasColumnType("integer");

                    b.Property<int>("Radarr4KRootPath")
                        .HasColumnType("integer");

                    b.Property<int>("RadarrQualityProfile")
                        .HasColumnType("integer");

                    b.Property<int>("RadarrRootPath")
                        .HasColumnType("integer");

                    b.Property<int>("SonarrQualityProfile")
                        .HasColumnType("integer");

                    b.Property<int>("SonarrQualityProfileAnime")
                        .HasColumnType("integer");

                    b.Property<int>("SonarrRootPath")
                        .HasColumnType("integer");

                    b.Property<int>("SonarrRootPathAnime")
                        .HasColumnType("integer");

                    b.Property<string>("UserId")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("UserQualityProfiles");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Votes", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<DateTime>("Date")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("Deleted")
                        .HasColumnType("boolean");

                    b.Property<int>("RequestId")
                        .HasColumnType("integer");

                    b.Property<int>("RequestType")
                        .HasColumnType("integer");

                    b.Property<string>("UserId")
                        .HasColumnType("text");

                    b.Property<int>("VoteType")
                        .HasColumnType("integer");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("Votes");
                });

            modelBuilder.Entity("Ombi.Store.Repository.Requests.EpisodeRequests", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<DateTime>("AirDate")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("Approved")
                        .HasColumnType("boolean");

                    b.Property<bool>("Available")
                        .HasColumnType("boolean");

                    b.Property<int>("EpisodeNumber")
                        .HasColumnType("integer");

                    b.Property<bool>("Requested")
                        .HasColumnType("boolean");

                    b.Property<int>("SeasonId")
                        .HasColumnType("integer");

                    b.Property<string>("Title")
                        .HasColumnType("text");

                    b.Property<string>("Url")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("SeasonId");

                    b.ToTable("EpisodeRequests");
                });

            modelBuilder.Entity("Ombi.Store.Repository.Requests.SeasonRequests", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<int>("ChildRequestId")
                        .HasColumnType("integer");

                    b.Property<string>("Overview")
                        .HasColumnType("text");

                    b.Property<int>("SeasonNumber")
                        .HasColumnType("integer");

                    b.HasKey("Id");

                    b.HasIndex("ChildRequestId");

                    b.ToTable("SeasonRequests");
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
                {
                    b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
                        .WithMany()
                        .HasForeignKey("RoleId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
                {
                    b.HasOne("Ombi.Store.Entities.OmbiUser", null)
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
                {
                    b.HasOne("Ombi.Store.Entities.OmbiUser", null)
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
                {
                    b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
                        .WithMany()
                        .HasForeignKey("RoleId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ombi.Store.Entities.OmbiUser", null)
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
                {
                    b.HasOne("Ombi.Store.Entities.OmbiUser", null)
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Ombi.Store.Entities.MobileDevices", b =>
                {
                    b.HasOne("Ombi.Store.Entities.OmbiUser", "User")
                        .WithMany()
                        .HasForeignKey("UserId");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Ombi.Store.Entities.NotificationUserId", b =>
                {
                    b.HasOne("Ombi.Store.Entities.OmbiUser", "User")
                        .WithMany("NotificationUserIds")
                        .HasForeignKey("UserId");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.AlbumRequest", b =>
                {
                    b.HasOne("Ombi.Store.Entities.OmbiUser", "RequestedUser")
                        .WithMany()
                        .HasForeignKey("RequestedUserId");

                    b.Navigation("RequestedUser");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.ChildRequests", b =>
                {
                    b.HasOne("Ombi.Store.Entities.Requests.TvRequests", "ParentRequest")
                        .WithMany("ChildRequests")
                        .HasForeignKey("ParentRequestId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ombi.Store.Entities.OmbiUser", "RequestedUser")
                        .WithMany()
                        .HasForeignKey("RequestedUserId");

                    b.Navigation("ParentRequest");

                    b.Navigation("RequestedUser");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.IssueComments", b =>
                {
                    b.HasOne("Ombi.Store.Entities.Requests.Issues", "Issues")
                        .WithMany("Comments")
                        .HasForeignKey("IssuesId");

                    b.HasOne("Ombi.Store.Entities.OmbiUser", "User")
                        .WithMany()
                        .HasForeignKey("UserId");

                    b.Navigation("Issues");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.Issues", b =>
                {
                    b.HasOne("Ombi.Store.Entities.Requests.IssueCategory", "IssueCategory")
                        .WithMany()
                        .HasForeignKey("IssueCategoryId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Ombi.Store.Entities.Requests.ChildRequests", null)
                        .WithMany("Issues")
                        .HasForeignKey("IssueId");

                    b.HasOne("Ombi.Store.Entities.Requests.MovieRequests", null)
                        .WithMany("Issues")
                        .HasForeignKey("IssueId");

                    b.HasOne("Ombi.Store.Entities.OmbiUser", "UserReported")
                        .WithMany()
                        .HasForeignKey("UserReportedId");

                    b.Navigation("IssueCategory");

                    b.Navigation("UserReported");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.MovieRequests", b =>
                {
                    b.HasOne("Ombi.Store.Entities.OmbiUser", "RequestedUser")
                        .WithMany()
                        .HasForeignKey("RequestedUserId");

                    b.Navigation("RequestedUser");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.RequestLog", b =>
                {
                    b.HasOne("Ombi.Store.Entities.OmbiUser", "User")
                        .WithMany()
                        .HasForeignKey("UserId");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Ombi.Store.Entities.RequestSubscription", b =>
                {
                    b.HasOne("Ombi.Store.Entities.OmbiUser", "User")
                        .WithMany()
                        .HasForeignKey("UserId");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Tokens", b =>
                {
                    b.HasOne("Ombi.Store.Entities.OmbiUser", "User")
                        .WithMany()
                        .HasForeignKey("UserId");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Ombi.Store.Entities.UserNotificationPreferences", b =>
                {
                    b.HasOne("Ombi.Store.Entities.OmbiUser", "User")
                        .WithMany("UserNotificationPreferences")
                        .HasForeignKey("UserId");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Ombi.Store.Entities.UserQualityProfiles", b =>
                {
                    b.HasOne("Ombi.Store.Entities.OmbiUser", "User")
                        .WithMany()
                        .HasForeignKey("UserId");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Votes", b =>
                {
                    b.HasOne("Ombi.Store.Entities.OmbiUser", "User")
                        .WithMany()
                        .HasForeignKey("UserId");

                    b.Navigation("User");
                });

            modelBuilder.Entity("Ombi.Store.Repository.Requests.EpisodeRequests", b =>
                {
                    b.HasOne("Ombi.Store.Repository.Requests.SeasonRequests", "Season")
                        .WithMany("Episodes")
                        .HasForeignKey("SeasonId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Season");
                });

            modelBuilder.Entity("Ombi.Store.Repository.Requests.SeasonRequests", b =>
                {
                    b.HasOne("Ombi.Store.Entities.Requests.ChildRequests", "ChildRequest")
                        .WithMany("SeasonRequests")
                        .HasForeignKey("ChildRequestId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("ChildRequest");
                });

            modelBuilder.Entity("Ombi.Store.Entities.OmbiUser", b =>
                {
                    b.Navigation("NotificationUserIds");

                    b.Navigation("UserNotificationPreferences");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.ChildRequests", b =>
                {
                    b.Navigation("Issues");

                    b.Navigation("SeasonRequests");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.Issues", b =>
                {
                    b.Navigation("Comments");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.MovieRequests", b =>
                {
                    b.Navigation("Issues");
                });

            modelBuilder.Entity("Ombi.Store.Entities.Requests.TvRequests", b =>
                {
                    b.Navigation("ChildRequests");
                });

            modelBuilder.Entity("Ombi.Store.Repository.Requests.SeasonRequests", b =>
                {
                    b.Navigation("Episodes");
                });
#pragma warning restore 612, 618
        }
    }
}
