// <auto-generated />
using System;
using Aberwyn.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

#nullable disable

namespace Aberwyn.Migrations
{
    [DbContext(typeof(ApplicationDbContext))]
    partial class ApplicationDbContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "6.0.36")
                .HasAnnotation("Relational:MaxIdentifierLength", 64);

            modelBuilder.Entity("Aberwyn.Models.ApplicationUser", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("varchar(255)");

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

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

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

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

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

                    b.Property<DateTimeOffset?>("LockoutEnd")
                        .HasColumnType("datetime(6)");

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

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

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

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

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

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

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

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

                    b.HasKey("Id");

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

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

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

            modelBuilder.Entity("Aberwyn.Models.AppSetting", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<string>("Key")
                        .IsRequired()
                        .HasColumnType("longtext");

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

                    b.HasKey("Id");

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

            modelBuilder.Entity("Aberwyn.Models.BudgetCategory", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

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

                    b.Property<int>("BudgetPeriodId")
                        .HasColumnType("int");

                    b.Property<string>("Color")
                        .IsRequired()
                        .HasColumnType("longtext");

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

                    b.Property<int>("Order")
                        .HasColumnType("int");

                    b.HasKey("Id");

                    b.HasIndex("BudgetCategoryDefinitionId");

                    b.HasIndex("BudgetPeriodId");

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

            modelBuilder.Entity("Aberwyn.Models.BudgetCategoryDefinition", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<string>("Color")
                        .IsRequired()
                        .HasColumnType("longtext");

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

                    b.HasKey("Id");

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

            modelBuilder.Entity("Aberwyn.Models.BudgetItem", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<decimal>("Amount")
                        .HasColumnType("decimal(65,30)");

                    b.Property<int>("BudgetCategoryId")
                        .HasColumnType("int");

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

                    b.Property<bool>("IncludeInSummary")
                        .HasColumnType("tinyint(1)");

                    b.Property<bool>("IsExpense")
                        .HasColumnType("tinyint(1)");

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

                    b.Property<int>("Order")
                        .HasColumnType("int");

                    b.Property<int>("PaymentStatus")
                        .HasColumnType("int");

                    b.HasKey("Id");

                    b.HasIndex("BudgetCategoryId");

                    b.HasIndex("BudgetItemDefinitionId");

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

            modelBuilder.Entity("Aberwyn.Models.BudgetItemDefinition", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<string>("DefaultCategory")
                        .HasColumnType("longtext");

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

                    b.Property<bool>("IncludeInSummary")
                        .HasColumnType("tinyint(1)");

                    b.Property<bool>("IsExpense")
                        .HasColumnType("tinyint(1)");

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

                    b.HasKey("Id");

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

            modelBuilder.Entity("Aberwyn.Models.BudgetPeriod", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

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

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

                    b.Property<int>("Order")
                        .HasColumnType("int");

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

                    b.HasKey("Id");

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

            modelBuilder.Entity("Aberwyn.Models.DoughPlan", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<int>("AntalPizzor")
                        .HasColumnType("int");

                    b.Property<DateTime>("Datum")
                        .HasColumnType("datetime(6)");

                    b.Property<double>("Jast")
                        .HasColumnType("double");

                    b.Property<double>("Mjol")
                        .HasColumnType("double");

                    b.Property<string>("Namn")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.Property<double>("Olja")
                        .HasColumnType("double");

                    b.Property<double>("Salt")
                        .HasColumnType("double");

                    b.Property<double>("TotalDeg")
                        .HasColumnType("double");

                    b.Property<double>("Vatten")
                        .HasColumnType("double");

                    b.Property<double>("ViktPerPizza")
                        .HasColumnType("double");

                    b.HasKey("Id");

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

            modelBuilder.Entity("Aberwyn.Models.Ingredient", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<string>("Item")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.Property<int>("MealId")
                        .HasColumnType("int");

                    b.Property<string>("Quantity")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.HasKey("Id");

                    b.HasIndex("MealId");

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

            modelBuilder.Entity("Aberwyn.Models.LabIngredient", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<string>("Item")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.Property<string>("Quantity")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.Property<int>("RecipeLabEntryId")
                        .HasColumnType("int");

                    b.HasKey("Id");

                    b.HasIndex("RecipeLabEntryId");

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

            modelBuilder.Entity("Aberwyn.Models.LabVersionIngredient", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<string>("Item")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.Property<string>("Quantity")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.Property<int>("RecipeLabVersionId")
                        .HasColumnType("int");

                    b.HasKey("Id");

                    b.HasIndex("RecipeLabVersionId");

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

            modelBuilder.Entity("Aberwyn.Models.Meal", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<string>("CarbType")
                        .HasColumnType("longtext");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("datetime(6)");

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

                    b.Property<byte[]>("ImageData")
                        .HasColumnType("longblob");

                    b.Property<string>("ImageMimeType")
                        .HasColumnType("longtext");

                    b.Property<string>("ImageUrl")
                        .HasColumnType("longtext");

                    b.Property<string>("Instructions")
                        .HasColumnType("longtext");

                    b.Property<bool>("IsAvailable")
                        .HasColumnType("tinyint(1)");

                    b.Property<bool>("IsPublished")
                        .HasColumnType("tinyint(1)");

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

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

                    b.Property<string>("ProteinType")
                        .HasColumnType("longtext");

                    b.Property<string>("RecipeUrl")
                        .HasColumnType("longtext");

                    b.Property<byte[]>("ThumbnailData")
                        .HasColumnType("longblob");

                    b.HasKey("Id");

                    b.HasIndex("MealCategoryId");

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

            modelBuilder.Entity("Aberwyn.Models.MealCategory", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<string>("Color")
                        .HasColumnType("longtext");

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

                    b.Property<int>("DisplayOrder")
                        .HasColumnType("int");

                    b.Property<string>("Icon")
                        .HasColumnType("longtext");

                    b.Property<bool>("IsActive")
                        .HasColumnType("tinyint(1)");

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

                    b.Property<string>("Slug")
                        .HasColumnType("longtext");

                    b.HasKey("Id");

                    b.ToTable("MealCategories");

                    b.HasData(
                        new
                        {
                            Id = 1,
                            Color = "#f97316",
                            DisplayOrder = 1,
                            Icon = "🍕",
                            IsActive = true,
                            Name = "Pizza",
                            Slug = "pizza"
                        });
                });

            modelBuilder.Entity("Aberwyn.Models.MealRating", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("datetime(6)");

                    b.Property<int>("MealId")
                        .HasColumnType("int");

                    b.Property<int>("Rating")
                        .HasColumnType("int");

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

                    b.HasKey("Id");

                    b.HasIndex("MealId");

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

            modelBuilder.Entity("Aberwyn.Models.MealWish", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("datetime(6)");

                    b.Property<bool>("IsArchived")
                        .HasColumnType("tinyint(1)");

                    b.Property<bool>("IsImported")
                        .HasColumnType("tinyint(1)");

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

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

                    b.Property<string>("Recipe")
                        .HasColumnType("longtext");

                    b.Property<string>("RequestedByUserId")
                        .IsRequired()
                        .HasColumnType("varchar(255)");

                    b.HasKey("Id");

                    b.HasIndex("LinkedMealId");

                    b.HasIndex("RequestedByUserId");

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

            modelBuilder.Entity("Aberwyn.Models.PizzaOrder", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<string>("CustomerName")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.Property<string>("IngredientsJson")
                        .HasColumnType("longtext");

                    b.Property<DateTime>("OrderedAt")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("PizzaName")
                        .IsRequired()
                        .HasColumnType("longtext");

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

                    b.HasKey("Id");

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

            modelBuilder.Entity("Aberwyn.Models.PushSubscriber", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<string>("Auth")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.Property<string>("Endpoint")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.Property<string>("P256DH")
                        .IsRequired()
                        .HasColumnType("longtext");

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

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

                    b.HasKey("Id");

                    b.HasIndex("PizzaOrderId");

                    b.HasIndex("UserId");

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

            modelBuilder.Entity("Aberwyn.Models.RecipeLabEntry", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

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

                    b.Property<string>("Category")
                        .HasColumnType("longtext");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("Inspiration")
                        .HasColumnType("longtext");

                    b.Property<string>("Notes")
                        .HasColumnType("longtext");

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

                    b.Property<string>("Tags")
                        .HasColumnType("longtext");

                    b.Property<string>("TestedBy")
                        .HasColumnType("longtext");

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

                    b.HasKey("Id");

                    b.HasIndex("BaseMealId");

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

            modelBuilder.Entity("Aberwyn.Models.RecipeLabVersion", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("Instructions")
                        .HasColumnType("longtext");

                    b.Property<int>("RecipeLabEntryId")
                        .HasColumnType("int");

                    b.Property<string>("ResultNotes")
                        .HasColumnType("longtext");

                    b.Property<string>("VersionLabel")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.HasKey("Id");

                    b.HasIndex("RecipeLabEntryId");

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

            modelBuilder.Entity("Aberwyn.Models.StoredPushSubscription", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<string>("Auth")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.Property<string>("Endpoint")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.Property<string>("P256DH")
                        .IsRequired()
                        .HasColumnType("longtext");

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

                    b.HasKey("Id");

                    b.HasIndex("UserId");

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

            modelBuilder.Entity("Aberwyn.Models.TodoTask", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<string>("AssignedTo")
                        .HasColumnType("longtext");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("datetime(6)");

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

                    b.Property<bool>("IsArchived")
                        .HasColumnType("tinyint(1)");

                    b.Property<int>("Priority")
                        .HasColumnType("int");

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

                    b.Property<string>("Tags")
                        .IsRequired()
                        .HasColumnType("longtext");

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

                    b.HasKey("Id");

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

            modelBuilder.Entity("Aberwyn.Models.UserPreferences", b =>
                {
                    b.Property<string>("UserId")
                        .HasColumnType("varchar(255)");

                    b.Property<bool>("NotifyBudget")
                        .HasColumnType("tinyint(1)");

                    b.Property<bool>("NotifyMenu")
                        .HasColumnType("tinyint(1)");

                    b.Property<bool>("NotifyPizza")
                        .HasColumnType("tinyint(1)");

                    b.HasKey("UserId");

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

            modelBuilder.Entity("Aberwyn.Models.WeeklyMenu", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

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

                    b.Property<string>("Cook")
                        .HasColumnType("longtext");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("datetime(6)");

                    b.Property<DateTime>("Date")
                        .HasColumnType("datetime(6)");

                    b.Property<int>("DayOfWeek")
                        .HasColumnType("int");

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

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

                    b.Property<int>("WeekNumber")
                        .HasColumnType("int");

                    b.Property<int>("Year")
                        .HasColumnType("int");

                    b.HasKey("Id");

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

            modelBuilder.Entity("DownloadRule", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<bool>("AutoDownload")
                        .HasColumnType("tinyint(1)");

                    b.Property<string>("CategoryFilter")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.Property<string>("KeywordFilter")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.Property<long>("MaxSize")
                        .HasColumnType("bigint");

                    b.Property<int>("MinSeeders")
                        .HasColumnType("int");

                    b.HasKey("Id");

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

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

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

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

                    b.Property<string>("NormalizedName")
                        .HasMaxLength(256)
                        .HasColumnType("varchar(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("int");

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

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

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

                    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("int");

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

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

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

                    b.HasKey("Id");

                    b.HasIndex("UserId");

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

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

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

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

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

                    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("varchar(255)");

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

                    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("varchar(255)");

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

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

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

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

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

            modelBuilder.Entity("RssFeed", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<bool>("IsActive")
                        .HasColumnType("tinyint(1)");

                    b.Property<DateTime>("LastChecked")
                        .HasColumnType("datetime(6)");

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

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

                    b.HasKey("Id");

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

            modelBuilder.Entity("TorrentItem", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<string>("Category")
                        .HasColumnType("longtext");

                    b.Property<int>("Completed")
                        .HasColumnType("int");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("datetime(6)");

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

                    b.Property<string>("DownloadKey")
                        .HasColumnType("longtext");

                    b.Property<string>("InfoHash")
                        .HasColumnType("varchar(255)");

                    b.Property<bool>("IsDownloaded")
                        .HasColumnType("tinyint(1)");

                    b.Property<int>("Leechers")
                        .HasColumnType("int");

                    b.Property<string>("MagnetLink")
                        .HasColumnType("longtext");

                    b.Property<string>("MovieName")
                        .HasColumnType("longtext");

                    b.Property<DateTime>("PublishDate")
                        .HasColumnType("datetime(6)");

                    b.Property<string>("RssSource")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.Property<int>("Seeders")
                        .HasColumnType("int");

                    b.Property<long>("Size")
                        .HasColumnType("bigint");

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

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

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

                    b.Property<string>("TorrentUrl")
                        .HasColumnType("longtext");

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

                    b.HasKey("Id");

                    b.HasIndex("InfoHash")
                        .IsUnique();

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

            modelBuilder.Entity("UserTorrentSeen", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    b.Property<string>("InfoHash")
                        .IsRequired()
                        .HasColumnType("longtext");

                    b.Property<DateTime>("SeenDate")
                        .HasColumnType("datetime(6)");

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

                    b.HasKey("Id");

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

            modelBuilder.Entity("Aberwyn.Models.BudgetCategory", b =>
                {
                    b.HasOne("Aberwyn.Models.BudgetCategoryDefinition", "Definition")
                        .WithMany()
                        .HasForeignKey("BudgetCategoryDefinitionId");

                    b.HasOne("Aberwyn.Models.BudgetPeriod", "BudgetPeriod")
                        .WithMany("Categories")
                        .HasForeignKey("BudgetPeriodId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("BudgetPeriod");

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

            modelBuilder.Entity("Aberwyn.Models.BudgetItem", b =>
                {
                    b.HasOne("Aberwyn.Models.BudgetCategory", null)
                        .WithMany("Items")
                        .HasForeignKey("BudgetCategoryId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("Aberwyn.Models.BudgetItemDefinition", "BudgetItemDefinition")
                        .WithMany()
                        .HasForeignKey("BudgetItemDefinitionId");

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

            modelBuilder.Entity("Aberwyn.Models.Ingredient", b =>
                {
                    b.HasOne("Aberwyn.Models.Meal", null)
                        .WithMany("Ingredients")
                        .HasForeignKey("MealId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Aberwyn.Models.LabIngredient", b =>
                {
                    b.HasOne("Aberwyn.Models.RecipeLabEntry", "Entry")
                        .WithMany("Ingredients")
                        .HasForeignKey("RecipeLabEntryId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

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

            modelBuilder.Entity("Aberwyn.Models.LabVersionIngredient", b =>
                {
                    b.HasOne("Aberwyn.Models.RecipeLabVersion", "Version")
                        .WithMany("Ingredients")
                        .HasForeignKey("RecipeLabVersionId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

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

            modelBuilder.Entity("Aberwyn.Models.Meal", b =>
                {
                    b.HasOne("Aberwyn.Models.MealCategory", "Category")
                        .WithMany("Meals")
                        .HasForeignKey("MealCategoryId");

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

            modelBuilder.Entity("Aberwyn.Models.MealRating", b =>
                {
                    b.HasOne("Aberwyn.Models.Meal", "Meal")
                        .WithMany()
                        .HasForeignKey("MealId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

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

            modelBuilder.Entity("Aberwyn.Models.MealWish", b =>
                {
                    b.HasOne("Aberwyn.Models.Meal", "LinkedMeal")
                        .WithMany()
                        .HasForeignKey("LinkedMealId");

                    b.HasOne("Aberwyn.Models.ApplicationUser", "RequestedByUser")
                        .WithMany()
                        .HasForeignKey("RequestedByUserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("LinkedMeal");

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

            modelBuilder.Entity("Aberwyn.Models.PushSubscriber", b =>
                {
                    b.HasOne("Aberwyn.Models.PizzaOrder", "PizzaOrder")
                        .WithMany()
                        .HasForeignKey("PizzaOrderId");

                    b.HasOne("Aberwyn.Models.ApplicationUser", "User")
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("PizzaOrder");

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

            modelBuilder.Entity("Aberwyn.Models.RecipeLabEntry", b =>
                {
                    b.HasOne("Aberwyn.Models.Meal", "BaseMeal")
                        .WithMany()
                        .HasForeignKey("BaseMealId");

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

            modelBuilder.Entity("Aberwyn.Models.RecipeLabVersion", b =>
                {
                    b.HasOne("Aberwyn.Models.RecipeLabEntry", "Entry")
                        .WithMany("Versions")
                        .HasForeignKey("RecipeLabEntryId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

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

            modelBuilder.Entity("Aberwyn.Models.StoredPushSubscription", b =>
                {
                    b.HasOne("Aberwyn.Models.ApplicationUser", "User")
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

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

            modelBuilder.Entity("Aberwyn.Models.UserPreferences", b =>
                {
                    b.HasOne("Aberwyn.Models.ApplicationUser", "User")
                        .WithOne("Preferences")
                        .HasForeignKey("Aberwyn.Models.UserPreferences", "UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

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

            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("Aberwyn.Models.ApplicationUser", null)
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
                {
                    b.HasOne("Aberwyn.Models.ApplicationUser", 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("Aberwyn.Models.ApplicationUser", null)
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

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

            modelBuilder.Entity("TorrentItem", b =>
                {
                    b.OwnsOne("MovieMetadata", "Metadata", b1 =>
                        {
                            b1.Property<int>("TorrentItemId")
                                .HasColumnType("int");

                            b1.Property<string>("Actors")
                                .HasColumnType("longtext");

                            b1.Property<string>("Director")
                                .HasColumnType("longtext");

                            b1.Property<string>("Genre")
                                .HasColumnType("longtext");

                            b1.Property<string>("ImdbID")
                                .HasColumnType("longtext");

                            b1.Property<string>("ImdbRating")
                                .HasColumnType("longtext");

                            b1.Property<string>("Plot")
                                .HasColumnType("longtext");

                            b1.Property<string>("Poster")
                                .HasColumnType("longtext");

                            b1.Property<string>("Providers")
                                .HasColumnType("longtext");

                            b1.Property<string>("Runtime")
                                .HasColumnType("longtext");

                            b1.Property<string>("Title")
                                .IsRequired()
                                .HasColumnType("longtext");

                            b1.Property<string>("Year")
                                .HasColumnType("longtext");

                            b1.HasKey("TorrentItemId");

                            b1.ToTable("TorrentItems");

                            b1.WithOwner()
                                .HasForeignKey("TorrentItemId");
                        });

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

            modelBuilder.Entity("Aberwyn.Models.ApplicationUser", b =>
                {
                    b.Navigation("Preferences")
                        .IsRequired();
                });

            modelBuilder.Entity("Aberwyn.Models.BudgetCategory", b =>
                {
                    b.Navigation("Items");
                });

            modelBuilder.Entity("Aberwyn.Models.BudgetPeriod", b =>
                {
                    b.Navigation("Categories");
                });

            modelBuilder.Entity("Aberwyn.Models.Meal", b =>
                {
                    b.Navigation("Ingredients");
                });

            modelBuilder.Entity("Aberwyn.Models.MealCategory", b =>
                {
                    b.Navigation("Meals");
                });

            modelBuilder.Entity("Aberwyn.Models.RecipeLabEntry", b =>
                {
                    b.Navigation("Ingredients");

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

            modelBuilder.Entity("Aberwyn.Models.RecipeLabVersion", b =>
                {
                    b.Navigation("Ingredients");
                });
#pragma warning restore 612, 618
        }
    }
}
