// <auto-generated />
using System;
using Marechai.Database.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

namespace Marechai.Database.Migrations
{
    [DbContext(typeof(MarechaiContext))]
    [Migration("20190518150032_AddCompanyDescriptions")]
    partial class AddCompanyDescriptions
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
                .HasAnnotation("Relational:MaxIdentifierLength", 64);

            modelBuilder.Entity("Marechai.Database.Models.Admin", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<string>("Password")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("password")
                        .HasColumnType("char(50)")
                        .HasDefaultValueSql("''");

                    b.Property<string>("User")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("user")
                        .HasColumnType("char(50)")
                        .HasDefaultValueSql("''");

                    b.HasKey("Id");

                    b.HasIndex("User")
                        .HasName("idx_admins_user");

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

            modelBuilder.Entity("Marechai.Database.Models.BrowserTest", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<sbyte>("Agif")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("agif")
                        .HasColumnType("tinyint(1)")
                        .HasDefaultValueSql("'0'");

                    b.Property<string>("Browser")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("browser")
                        .HasColumnType("varchar(64)")
                        .HasDefaultValueSql("''");

                    b.Property<sbyte>("Colors")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("colors")
                        .HasColumnType("tinyint(1)")
                        .HasDefaultValueSql("'0'");

                    b.Property<sbyte>("Flash")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("flash")
                        .HasColumnType("tinyint(1)")
                        .HasDefaultValueSql("'0'");

                    b.Property<sbyte>("Frames")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("frames")
                        .HasColumnType("tinyint(1)")
                        .HasDefaultValueSql("'0'");

                    b.Property<sbyte>("Gif87")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("gif87")
                        .HasColumnType("tinyint(1)")
                        .HasDefaultValueSql("'0'");

                    b.Property<sbyte>("Gif89")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("gif89")
                        .HasColumnType("tinyint(1)")
                        .HasDefaultValueSql("'0'");

                    b.Property<sbyte>("Jpeg")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("jpeg")
                        .HasColumnType("tinyint(1)")
                        .HasDefaultValueSql("'0'");

                    b.Property<sbyte>("Js")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("js")
                        .HasColumnType("tinyint(1)")
                        .HasDefaultValueSql("'0'");

                    b.Property<string>("Os")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("os")
                        .HasColumnType("varchar(32)")
                        .HasDefaultValueSql("''");

                    b.Property<string>("Platform")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("platform")
                        .HasColumnType("varchar(8)")
                        .HasDefaultValueSql("''");

                    b.Property<sbyte>("Png")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("png")
                        .HasColumnType("tinyint(1)")
                        .HasDefaultValueSql("'0'");

                    b.Property<sbyte>("Pngt")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("pngt")
                        .HasColumnType("tinyint(1)")
                        .HasDefaultValueSql("'0'");

                    b.Property<sbyte>("Table")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("table")
                        .HasColumnType("tinyint(1)")
                        .HasDefaultValueSql("'0'");

                    b.Property<string>("UserAgent")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("user_agent")
                        .HasColumnType("varchar(128)")
                        .HasDefaultValueSql("''");

                    b.Property<string>("Version")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("version")
                        .HasColumnType("varchar(16)")
                        .HasDefaultValueSql("''");

                    b.HasKey("Id");

                    b.HasIndex("Browser")
                        .HasName("idx_browser_tests_browser");

                    b.HasIndex("Os")
                        .HasName("idx_browser_tests_os");

                    b.HasIndex("Platform")
                        .HasName("idx_browser_tests_platform");

                    b.HasIndex("UserAgent")
                        .HasName("idx_browser_tests_user_agent");

                    b.HasIndex("Version")
                        .HasName("idx_browser_tests_version");

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

            modelBuilder.Entity("Marechai.Database.Models.MarechaiDb", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<DateTime?>("Updated")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("updated")
                        .HasColumnType("datetime")
                        .HasDefaultValueSql("'CURRENT_TIMESTAMP'");

                    b.Property<int>("Version")
                        .HasColumnName("version")
                        .HasColumnType("int(11)");

                    b.HasKey("Id");

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

            modelBuilder.Entity("Marechai.Database.Models.Company", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<string>("Address")
                        .HasColumnName("address")
                        .HasColumnType("varchar(80)");

                    b.Property<string>("City")
                        .HasColumnName("city")
                        .HasColumnType("varchar(80)");

                    b.Property<short?>("CountryId")
                        .HasColumnName("country")
                        .HasColumnType("smallint(3)");

                    b.Property<string>("Facebook")
                        .HasColumnName("facebook")
                        .HasColumnType("varchar(45)");

                    b.Property<DateTime?>("Founded")
                        .HasColumnName("founded")
                        .HasColumnType("datetime");

                    b.Property<string>("Name")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("name")
                        .HasColumnType("varchar(128)")
                        .HasDefaultValueSql("''");

                    b.Property<string>("PostalCode")
                        .HasColumnName("postal_code")
                        .HasColumnType("varchar(25)");

                    b.Property<string>("Province")
                        .HasColumnName("province")
                        .HasColumnType("varchar(80)");

                    b.Property<DateTime?>("Sold")
                        .HasColumnName("sold")
                        .HasColumnType("datetime");

                    b.Property<int?>("SoldToId")
                        .HasColumnName("sold_to")
                        .HasColumnType("int(11)");

                    b.Property<int>("Status")
                        .HasColumnName("status")
                        .HasColumnType("int(11)");

                    b.Property<string>("Twitter")
                        .HasColumnName("twitter")
                        .HasColumnType("varchar(45)");

                    b.Property<string>("Website")
                        .HasColumnName("website")
                        .HasColumnType("varchar(255)");

                    b.HasKey("Id");

                    b.HasIndex("Address")
                        .HasName("idx_companies_address");

                    b.HasIndex("City")
                        .HasName("idx_companies_city");

                    b.HasIndex("CountryId")
                        .HasName("idx_companies_country");

                    b.HasIndex("Facebook")
                        .HasName("idx_companies_facebook");

                    b.HasIndex("Founded")
                        .HasName("idx_companies_founded");

                    b.HasIndex("Name")
                        .HasName("idx_companies_name");

                    b.HasIndex("PostalCode")
                        .HasName("idx_companies_postal_code");

                    b.HasIndex("Province")
                        .HasName("idx_companies_province");

                    b.HasIndex("Sold")
                        .HasName("idx_companies_sold");

                    b.HasIndex("SoldToId")
                        .HasName("idx_companies_sold_to");

                    b.HasIndex("Status")
                        .HasName("idx_companies_status");

                    b.HasIndex("Twitter")
                        .HasName("idx_companies_twitter");

                    b.HasIndex("Website")
                        .HasName("idx_companies_website");

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

            modelBuilder.Entity("Marechai.Database.Models.CompanyDescription", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd();

                    b.Property<int>("CompanyId");

                    b.Property<string>("Text");

                    b.HasKey("Id");

                    b.HasIndex("CompanyId");

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

            modelBuilder.Entity("Marechai.Database.Models.CompanyLogo", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<int>("CompanyId")
                        .HasColumnName("company_id")
                        .HasColumnType("int(11)");

                    b.Property<Guid>("Guid")
                        .HasColumnName("logo_guid")
                        .HasColumnType("char(36)");

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

                    b.HasKey("Id", "CompanyId", "Guid");

                    b.HasIndex("CompanyId")
                        .HasName("idx_company_id");

                    b.HasIndex("Guid")
                        .HasName("idx_guid");

                    b.HasIndex("Id")
                        .IsUnique()
                        .HasName("idx_id");

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

            modelBuilder.Entity("Marechai.Database.Models.Forbidden", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<string>("Browser")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("browser")
                        .HasColumnType("char(128)")
                        .HasDefaultValueSql("''");

                    b.Property<string>("Date")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("date")
                        .HasColumnType("char(20)")
                        .HasDefaultValueSql("''");

                    b.Property<string>("Ip")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("ip")
                        .HasColumnType("char(16)")
                        .HasDefaultValueSql("''");

                    b.Property<string>("Referer")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("referer")
                        .HasColumnType("char(255)")
                        .HasDefaultValueSql("''");

                    b.HasKey("Id");

                    b.HasIndex("Browser")
                        .HasName("idx_forbidden_browser");

                    b.HasIndex("Date")
                        .HasName("idx_forbidden_date");

                    b.HasIndex("Ip")
                        .HasName("idx_forbidden_ip");

                    b.HasIndex("Referer")
                        .HasName("idx_forbidden_referer");

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

            modelBuilder.Entity("Marechai.Database.Models.Gpu", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<int?>("CompanyId")
                        .HasColumnName("company")
                        .HasColumnType("int(11)");

                    b.Property<float?>("DieSize")
                        .HasColumnName("die_size");

                    b.Property<DateTime?>("Introduced")
                        .HasColumnName("introduced")
                        .HasColumnType("datetime");

                    b.Property<string>("ModelCode")
                        .HasColumnName("model_code")
                        .HasColumnType("varchar(45)");

                    b.Property<string>("Name")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("name")
                        .HasColumnType("char(128)")
                        .HasDefaultValueSql("''");

                    b.Property<string>("Package")
                        .HasColumnName("package")
                        .HasColumnType("varchar(45)");

                    b.Property<string>("Process")
                        .HasColumnName("process")
                        .HasColumnType("varchar(45)");

                    b.Property<float?>("ProcessNm")
                        .HasColumnName("process_nm");

                    b.Property<long?>("Transistors")
                        .HasColumnName("transistors")
                        .HasColumnType("bigint(20)");

                    b.HasKey("Id");

                    b.HasIndex("CompanyId")
                        .HasName("idx_gpus_company");

                    b.HasIndex("DieSize")
                        .HasName("idx_gpus_die_size");

                    b.HasIndex("Introduced")
                        .HasName("idx_gpus_introduced");

                    b.HasIndex("ModelCode")
                        .HasName("idx_gpus_model_code");

                    b.HasIndex("Name")
                        .HasName("idx_gpus_name");

                    b.HasIndex("Package")
                        .HasName("idx_gpus_package");

                    b.HasIndex("Process")
                        .HasName("idx_gpus_process");

                    b.HasIndex("ProcessNm")
                        .HasName("idx_gpus_process_nm");

                    b.HasIndex("Transistors")
                        .HasName("idx_gpus_transistors");

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

            modelBuilder.Entity("Marechai.Database.Models.GpusByMachine", b =>
                {
                    b.Property<long>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("bigint(20)");

                    b.Property<int>("GpuId")
                        .HasColumnName("gpu")
                        .HasColumnType("int(11)");

                    b.Property<int>("MachineId")
                        .HasColumnName("machine")
                        .HasColumnType("int(11)");

                    b.HasKey("Id");

                    b.HasIndex("GpuId")
                        .HasName("idx_gpus_by_machine_gpus");

                    b.HasIndex("MachineId")
                        .HasName("idx_gpus_by_machine_machine");

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

            modelBuilder.Entity("Marechai.Database.Models.InstructionSet", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnName("instruction_set")
                        .HasColumnType("varchar(45)");

                    b.HasKey("Id");

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

            modelBuilder.Entity("Marechai.Database.Models.InstructionSetExtension", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<string>("Extension")
                        .IsRequired()
                        .HasColumnName("extension")
                        .HasColumnType("varchar(45)");

                    b.HasKey("Id");

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

            modelBuilder.Entity("Marechai.Database.Models.InstructionSetExtensionsByProcessor", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<int>("ProcessorId")
                        .HasColumnName("processor_id")
                        .HasColumnType("int(11)");

                    b.Property<int>("ExtensionId")
                        .HasColumnName("extension_id")
                        .HasColumnType("int(11)");

                    b.HasKey("Id", "ProcessorId", "ExtensionId");

                    b.HasIndex("ExtensionId")
                        .HasName("idx_setextension_extension");

                    b.HasIndex("ProcessorId")
                        .HasName("idx_setextension_processor");

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

            modelBuilder.Entity("Marechai.Database.Models.Iso31661Numeric", b =>
                {
                    b.Property<short>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("smallint(3)");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnName("name")
                        .HasColumnType("varchar(64)");

                    b.HasKey("Id");

                    b.HasIndex("Name")
                        .HasName("idx_name");

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

            modelBuilder.Entity("Marechai.Database.Models.Log", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<string>("Browser")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("browser")
                        .HasColumnType("char(128)")
                        .HasDefaultValueSql("''");

                    b.Property<string>("Date")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("date")
                        .HasColumnType("char(20)")
                        .HasDefaultValueSql("''");

                    b.Property<string>("Ip")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("ip")
                        .HasColumnType("char(16)")
                        .HasDefaultValueSql("''");

                    b.Property<string>("Referer")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("referer")
                        .HasColumnType("char(255)")
                        .HasDefaultValueSql("''");

                    b.HasKey("Id");

                    b.HasIndex("Browser")
                        .HasName("idx_log_browser");

                    b.HasIndex("Date")
                        .HasName("idx_log_date");

                    b.HasIndex("Ip")
                        .HasName("idx_log_ip");

                    b.HasIndex("Referer")
                        .HasName("idx_log_referer");

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

            modelBuilder.Entity("Marechai.Database.Models.Machine", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<int>("CompanyId")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("company")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int?>("FamilyId")
                        .HasColumnName("family")
                        .HasColumnType("int(11)");

                    b.Property<DateTime?>("Introduced")
                        .HasColumnName("introduced")
                        .HasColumnType("datetime");

                    b.Property<string>("Model")
                        .HasColumnName("model")
                        .HasColumnType("varchar(50)");

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

                    b.Property<int>("Type")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("type")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.HasKey("Id");

                    b.HasIndex("CompanyId")
                        .HasName("idx_machines_company");

                    b.HasIndex("FamilyId")
                        .HasName("idx_machines_family");

                    b.HasIndex("Introduced")
                        .HasName("idx_machines_introduced");

                    b.HasIndex("Model")
                        .HasName("idx_machines_model");

                    b.HasIndex("Name")
                        .HasName("idx_machines_name");

                    b.HasIndex("Type")
                        .HasName("idx_machines_type");

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

            modelBuilder.Entity("Marechai.Database.Models.MachineFamily", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<int>("CompanyId")
                        .HasColumnName("company")
                        .HasColumnType("int(11)");

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

                    b.HasKey("Id");

                    b.HasIndex("CompanyId")
                        .HasName("idx_machine_families_company");

                    b.HasIndex("Name")
                        .HasName("idx_machine_families_name");

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

            modelBuilder.Entity("Marechai.Database.Models.MemoryByMachine", b =>
                {
                    b.Property<long>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("bigint(20)");

                    b.Property<int>("MachineId")
                        .HasColumnName("machine")
                        .HasColumnType("int(11)");

                    b.Property<long?>("Size")
                        .HasColumnName("size")
                        .HasColumnType("bigint(20)");

                    b.Property<double?>("Speed")
                        .HasColumnName("speed");

                    b.Property<int>("Type")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("type")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int>("Usage")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("usage")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.HasKey("Id");

                    b.HasIndex("MachineId")
                        .HasName("idx_memory_by_machine_machine");

                    b.HasIndex("Size")
                        .HasName("idx_memory_by_machine_size");

                    b.HasIndex("Speed")
                        .HasName("idx_memory_by_machine_speed");

                    b.HasIndex("Type")
                        .HasName("idx_memory_by_machine_type");

                    b.HasIndex("Usage")
                        .HasName("idx_memory_by_machine_usage");

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

            modelBuilder.Entity("Marechai.Database.Models.MoneyDonation", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<string>("Donator")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("donator")
                        .HasColumnType("char(128)")
                        .HasDefaultValueSql("''");

                    b.Property<decimal>("Quantity")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("quantity")
                        .HasColumnType("decimal(11,2)")
                        .HasDefaultValueSql("'0.00'");

                    b.HasKey("Id");

                    b.HasIndex("Donator")
                        .HasName("idx_money_donations_donator");

                    b.HasIndex("Quantity")
                        .HasName("idx_money_donations_quantity");

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

            modelBuilder.Entity("Marechai.Database.Models.News", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<int>("AddedId")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("added_id")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<string>("Date")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("date")
                        .HasColumnType("char(20)")
                        .HasDefaultValueSql("''");

                    b.Property<int>("Type")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("type")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.HasKey("Id");

                    b.HasIndex("AddedId")
                        .HasName("idx_news_ip");

                    b.HasIndex("Date")
                        .HasName("idx_news_date");

                    b.HasIndex("Type")
                        .HasName("idx_news_type");

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

            modelBuilder.Entity("Marechai.Database.Models.OwnedComputer", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<int>("Boxed")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("boxed")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int>("Cap1")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("cap1")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int>("Cap2")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("cap2")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int>("Cpu1")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("cpu1")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int>("Cpu2")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("cpu2")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<string>("Date")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("date")
                        .HasColumnType("varchar(20)")
                        .HasDefaultValueSql("''");

                    b.Property<int>("DbId")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("db_id")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int>("Disk1")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("disk1")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int>("Disk2")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("disk2")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int>("Manuals")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("manuals")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<decimal>("Mhz1")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("mhz1")
                        .HasColumnType("decimal(10,0)")
                        .HasDefaultValueSql("'0'");

                    b.Property<decimal>("Mhz2")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("mhz2")
                        .HasColumnType("decimal(10,0)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int>("Ram")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("ram")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<string>("Rigid")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("rigid")
                        .HasColumnType("varchar(64)")
                        .HasDefaultValueSql("''");

                    b.Property<int>("Status")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("status")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int>("Trade")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("trade")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int>("Vram")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("vram")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.HasKey("Id");

                    b.HasIndex("Boxed")
                        .HasName("idx_owned_computers_boxed");

                    b.HasIndex("Cap1")
                        .HasName("idx_owned_computers_cap1");

                    b.HasIndex("Cap2")
                        .HasName("idx_owned_computers_cap2");

                    b.HasIndex("Cpu1")
                        .HasName("idx_owned_computers_cpu1");

                    b.HasIndex("Cpu2")
                        .HasName("idx_owned_computers_cpu2");

                    b.HasIndex("Date")
                        .HasName("idx_owned_computers_date");

                    b.HasIndex("DbId")
                        .HasName("idx_owned_computers_db_id");

                    b.HasIndex("Disk1")
                        .HasName("idx_owned_computers_disk1");

                    b.HasIndex("Disk2")
                        .HasName("idx_owned_computers_disk2");

                    b.HasIndex("Manuals")
                        .HasName("idx_owned_computers_manuals");

                    b.HasIndex("Mhz1")
                        .HasName("idx_owned_computers_mhz1");

                    b.HasIndex("Mhz2")
                        .HasName("idx_owned_computers_mhz2");

                    b.HasIndex("Ram")
                        .HasName("idx_owned_computers_ram");

                    b.HasIndex("Rigid")
                        .HasName("idx_owned_computers_rigid");

                    b.HasIndex("Status")
                        .HasName("idx_owned_computers_status");

                    b.HasIndex("Trade")
                        .HasName("idx_owned_computers_trade");

                    b.HasIndex("Vram")
                        .HasName("idx_owned_computers_vram");

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

            modelBuilder.Entity("Marechai.Database.Models.OwnedConsole", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<int>("Boxed")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("boxed")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<string>("Date")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("date")
                        .HasColumnType("char(20)")
                        .HasDefaultValueSql("''");

                    b.Property<int>("DbId")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("db_id")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int>("Manuals")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("manuals")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int>("Status")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("status")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int>("Trade")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("trade")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.HasKey("Id");

                    b.HasIndex("Boxed")
                        .HasName("idx_owned_consoles_boxed");

                    b.HasIndex("Date")
                        .HasName("idx_owned_consoles_date");

                    b.HasIndex("DbId")
                        .HasName("idx_owned_consoles_db_id");

                    b.HasIndex("Manuals")
                        .HasName("idx_owned_consoles_manuals");

                    b.HasIndex("Status")
                        .HasName("idx_owned_consoles_status");

                    b.HasIndex("Trade")
                        .HasName("idx_owned_consoles_trade");

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

            modelBuilder.Entity("Marechai.Database.Models.Processor", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<int?>("AddrBus")
                        .HasColumnName("addr_bus")
                        .HasColumnType("int(11)");

                    b.Property<int?>("CompanyId")
                        .HasColumnName("company")
                        .HasColumnType("int(11)");

                    b.Property<int?>("Cores")
                        .HasColumnName("cores")
                        .HasColumnType("int(11)");

                    b.Property<int?>("DataBus")
                        .HasColumnName("data_bus")
                        .HasColumnType("int(11)");

                    b.Property<float?>("DieSize")
                        .HasColumnName("die_size");

                    b.Property<int?>("FprSize")
                        .HasColumnName("FPR_size")
                        .HasColumnType("int(11)");

                    b.Property<int?>("Fprs")
                        .HasColumnName("FPRs")
                        .HasColumnType("int(11)");

                    b.Property<int?>("GprSize")
                        .HasColumnName("GPR_size")
                        .HasColumnType("int(11)");

                    b.Property<int?>("Gprs")
                        .HasColumnName("GPRs")
                        .HasColumnType("int(11)");

                    b.Property<int?>("InstructionSetId")
                        .HasColumnName("instruction_set")
                        .HasColumnType("int(11)");

                    b.Property<DateTime?>("Introduced")
                        .HasColumnName("introduced")
                        .HasColumnType("datetime");

                    b.Property<float?>("L1Data")
                        .HasColumnName("L1_data");

                    b.Property<float?>("L1Instruction")
                        .HasColumnName("L1_instruction");

                    b.Property<float?>("L2");

                    b.Property<float?>("L3");

                    b.Property<string>("ModelCode")
                        .HasColumnName("model_code")
                        .HasColumnType("varchar(45)");

                    b.Property<string>("Name")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("name")
                        .HasColumnType("char(50)")
                        .HasDefaultValueSql("''");

                    b.Property<string>("Package")
                        .HasColumnName("package")
                        .HasColumnType("varchar(45)");

                    b.Property<string>("Process")
                        .HasColumnName("process")
                        .HasColumnType("varchar(45)");

                    b.Property<float?>("ProcessNm")
                        .HasColumnName("process_nm");

                    b.Property<int?>("SimdRegisters")
                        .HasColumnName("SIMD_registers")
                        .HasColumnType("int(11)");

                    b.Property<int?>("SimdSize")
                        .HasColumnName("SIMD_size")
                        .HasColumnType("int(11)");

                    b.Property<double?>("Speed")
                        .HasColumnName("speed");

                    b.Property<int?>("ThreadsPerCore")
                        .HasColumnName("threads_per_core")
                        .HasColumnType("int(11)");

                    b.Property<long?>("Transistors")
                        .HasColumnName("transistors")
                        .HasColumnType("bigint(20)");

                    b.HasKey("Id");

                    b.HasIndex("AddrBus")
                        .HasName("idx_processors_addr_bus");

                    b.HasIndex("CompanyId")
                        .HasName("idx_processors_company");

                    b.HasIndex("Cores")
                        .HasName("idx_processors_cores");

                    b.HasIndex("DataBus")
                        .HasName("idx_processors_data_bus");

                    b.HasIndex("DieSize")
                        .HasName("idx_processors_die_size");

                    b.HasIndex("FprSize")
                        .HasName("idx_processors_FPR_size");

                    b.HasIndex("Fprs")
                        .HasName("idx_processors_FPRs");

                    b.HasIndex("GprSize")
                        .HasName("idx_processors_GPR_size");

                    b.HasIndex("Gprs")
                        .HasName("idx_processors_GPRs");

                    b.HasIndex("InstructionSetId")
                        .HasName("idx_processors_instruction_set");

                    b.HasIndex("Introduced")
                        .HasName("idx_processors_introduced");

                    b.HasIndex("L1Data")
                        .HasName("idx_processors_L1_data");

                    b.HasIndex("L1Instruction")
                        .HasName("idx_processors_L1_instruction");

                    b.HasIndex("L2")
                        .HasName("idx_processors_L2");

                    b.HasIndex("L3")
                        .HasName("idx_processors_L3");

                    b.HasIndex("ModelCode")
                        .HasName("idx_processors_model_code");

                    b.HasIndex("Name")
                        .HasName("idx_processors_name");

                    b.HasIndex("Package")
                        .HasName("idx_processors_package");

                    b.HasIndex("Process")
                        .HasName("idx_processors_process");

                    b.HasIndex("ProcessNm")
                        .HasName("idx_processors_process_nm");

                    b.HasIndex("SimdRegisters")
                        .HasName("idx_processors_SIMD_registers");

                    b.HasIndex("SimdSize")
                        .HasName("idx_processors_SIMD_size");

                    b.HasIndex("Speed")
                        .HasName("idx_processors_speed");

                    b.HasIndex("ThreadsPerCore")
                        .HasName("idx_processors_threads_per_core");

                    b.HasIndex("Transistors")
                        .HasName("idx_processors_transistors");

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

            modelBuilder.Entity("Marechai.Database.Models.ProcessorsByMachine", b =>
                {
                    b.Property<long>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("bigint(20)");

                    b.Property<int>("MachineId")
                        .HasColumnName("machine")
                        .HasColumnType("int(11)");

                    b.Property<int>("ProcessorId")
                        .HasColumnName("processor")
                        .HasColumnType("int(11)");

                    b.Property<float?>("Speed")
                        .HasColumnName("speed");

                    b.HasKey("Id");

                    b.HasIndex("MachineId")
                        .HasName("idx_processors_by_machine_machine");

                    b.HasIndex("ProcessorId")
                        .HasName("idx_processors_by_machine_processor");

                    b.HasIndex("Speed")
                        .HasName("idx_processors_by_machine_speed");

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

            modelBuilder.Entity("Marechai.Database.Models.Resolution", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<sbyte>("Chars")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("chars")
                        .HasColumnType("tinyint(1)")
                        .HasDefaultValueSql("'0'");

                    b.Property<long?>("Colors")
                        .HasColumnName("colors")
                        .HasColumnType("bigint(20)");

                    b.Property<int>("Height")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("height")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<long?>("Palette")
                        .HasColumnName("palette")
                        .HasColumnType("bigint(20)");

                    b.Property<int>("Width")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("width")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.HasKey("Id");

                    b.HasIndex("Colors")
                        .HasName("idx_resolutions_colors");

                    b.HasIndex("Height")
                        .HasName("idx_resolutions_height");

                    b.HasIndex("Palette")
                        .HasName("idx_resolutions_palette");

                    b.HasIndex("Width")
                        .HasName("idx_resolutions_width");

                    b.HasIndex("Width", "Height")
                        .HasName("idx_resolutions_resolution");

                    b.HasIndex("Width", "Height", "Colors")
                        .HasName("idx_resolutions_resolution_with_color");

                    b.HasIndex("Width", "Height", "Colors", "Palette")
                        .HasName("idx_resolutions_resolution_with_color_and_palette");

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

            modelBuilder.Entity("Marechai.Database.Models.ResolutionsByGpu", b =>
                {
                    b.Property<long>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("bigint(20)");

                    b.Property<int>("GpuId")
                        .HasColumnName("gpu")
                        .HasColumnType("int(11)");

                    b.Property<int>("ResolutionId")
                        .HasColumnName("resolution")
                        .HasColumnType("int(11)");

                    b.HasKey("Id");

                    b.HasIndex("GpuId")
                        .HasName("idx_resolutions_by_gpu_gpu");

                    b.HasIndex("ResolutionId")
                        .HasName("idx_resolutions_by_gpu_resolution");

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

            modelBuilder.Entity("Marechai.Database.Models.SoundByMachine", b =>
                {
                    b.Property<long>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("bigint(20)");

                    b.Property<int>("MachineId")
                        .HasColumnName("machine")
                        .HasColumnType("int(11)");

                    b.Property<int>("SoundSynthId")
                        .HasColumnName("sound_synth")
                        .HasColumnType("int(11)");

                    b.HasKey("Id");

                    b.HasIndex("MachineId")
                        .HasName("idx_sound_by_machine_machine");

                    b.HasIndex("SoundSynthId")
                        .HasName("idx_sound_by_machine_sound_synth");

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

            modelBuilder.Entity("Marechai.Database.Models.SoundSynth", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("int(11)");

                    b.Property<int?>("CompanyId")
                        .HasColumnName("company")
                        .HasColumnType("int(11)");

                    b.Property<int?>("Depth")
                        .HasColumnName("depth")
                        .HasColumnType("int(11)");

                    b.Property<double?>("Frequency")
                        .HasColumnName("frequency");

                    b.Property<DateTime?>("Introduced")
                        .HasColumnName("introduced")
                        .HasColumnType("datetime");

                    b.Property<string>("ModelCode")
                        .HasColumnName("model_code")
                        .HasColumnType("varchar(45)");

                    b.Property<string>("Name")
                        .IsRequired()
                        .ValueGeneratedOnAdd()
                        .HasColumnName("name")
                        .HasColumnType("char(50)")
                        .HasDefaultValueSql("''");

                    b.Property<int?>("SquareWave")
                        .HasColumnName("square_wave")
                        .HasColumnType("int(11)");

                    b.Property<int?>("Type")
                        .HasColumnName("type")
                        .HasColumnType("int(11)");

                    b.Property<int?>("Voices")
                        .HasColumnName("voices")
                        .HasColumnType("int(11)");

                    b.Property<int?>("WhiteNoise")
                        .HasColumnName("white_noise")
                        .HasColumnType("int(11)");

                    b.HasKey("Id");

                    b.HasIndex("CompanyId")
                        .HasName("idx_sound_synths_company");

                    b.HasIndex("Depth")
                        .HasName("idx_sound_synths_depth");

                    b.HasIndex("Frequency")
                        .HasName("idx_sound_synths_frequency");

                    b.HasIndex("Introduced")
                        .HasName("idx_sound_synths_introduced");

                    b.HasIndex("ModelCode")
                        .HasName("idx_sound_synths_model_code");

                    b.HasIndex("Name")
                        .HasName("idx_sound_synths_name");

                    b.HasIndex("SquareWave")
                        .HasName("idx_sound_synths_square_wave");

                    b.HasIndex("Type")
                        .HasName("idx_sound_synths_type");

                    b.HasIndex("Voices")
                        .HasName("idx_sound_synths_voices");

                    b.HasIndex("WhiteNoise")
                        .HasName("idx_sound_synths_white_noise");

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

            modelBuilder.Entity("Marechai.Database.Models.StorageByMachine", b =>
                {
                    b.Property<long>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id")
                        .HasColumnType("bigint(20)");

                    b.Property<long?>("Capacity")
                        .HasColumnName("capacity")
                        .HasColumnType("bigint(20)");

                    b.Property<int>("Interface")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("interface")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.Property<int>("MachineId")
                        .HasColumnName("machine")
                        .HasColumnType("int(11)");

                    b.Property<int>("Type")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("type")
                        .HasColumnType("int(11)")
                        .HasDefaultValueSql("'0'");

                    b.HasKey("Id");

                    b.HasIndex("Capacity")
                        .HasName("idx_storage_capacity");

                    b.HasIndex("Interface")
                        .HasName("idx_storage_interface");

                    b.HasIndex("MachineId")
                        .HasName("idx_storage_machine");

                    b.HasIndex("Type")
                        .HasName("idx_storage_type");

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

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

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

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

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

                    b.HasKey("Id");

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

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

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

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

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

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

                    b.HasKey("Id");

                    b.HasIndex("RoleId");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    b.HasKey("Id");

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

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

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

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

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

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

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

                    b.HasKey("Id");

                    b.HasIndex("UserId");

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

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

                    b.Property<string>("ProviderKey")
                        .HasMaxLength(128);

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

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

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

                    b.HasIndex("UserId");

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

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

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

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

                    b.HasIndex("RoleId");

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

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

                    b.Property<string>("LoginProvider")
                        .HasMaxLength(128);

                    b.Property<string>("Name")
                        .HasMaxLength(128);

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

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

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

            modelBuilder.Entity("Marechai.Database.Models.Company", b =>
                {
                    b.HasOne("Marechai.Database.Models.Iso31661Numeric", "Country")
                        .WithMany("Companies")
                        .HasForeignKey("CountryId")
                        .HasConstraintName("fk_companies_country");

                    b.HasOne("Marechai.Database.Models.Company", "SoldTo")
                        .WithMany("InverseSoldToNavigation")
                        .HasForeignKey("SoldToId")
                        .HasConstraintName("fk_companies_sold_to");
                });

            modelBuilder.Entity("Marechai.Database.Models.CompanyDescription", b =>
                {
                    b.HasOne("Marechai.Database.Models.Company", "Company")
                        .WithMany("Descriptions")
                        .HasForeignKey("CompanyId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Marechai.Database.Models.CompanyLogo", b =>
                {
                    b.HasOne("Marechai.Database.Models.Company", "Company")
                        .WithMany("Logos")
                        .HasForeignKey("CompanyId")
                        .HasConstraintName("fk_company_logos_company1");
                });

            modelBuilder.Entity("Marechai.Database.Models.Gpu", b =>
                {
                    b.HasOne("Marechai.Database.Models.Company", "Company")
                        .WithMany("Gpus")
                        .HasForeignKey("CompanyId")
                        .HasConstraintName("fk_gpus_company");
                });

            modelBuilder.Entity("Marechai.Database.Models.GpusByMachine", b =>
                {
                    b.HasOne("Marechai.Database.Models.Gpu", "Gpu")
                        .WithMany("GpusByMachine")
                        .HasForeignKey("GpuId")
                        .HasConstraintName("fk_gpus_by_machine_gpu")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Marechai.Database.Models.Machine", "Machine")
                        .WithMany("Gpus")
                        .HasForeignKey("MachineId")
                        .HasConstraintName("fk_gpus_by_machine_machine")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Marechai.Database.Models.InstructionSetExtensionsByProcessor", b =>
                {
                    b.HasOne("Marechai.Database.Models.InstructionSetExtension", "Extension")
                        .WithMany("InstructionSetExtensionsByProcessor")
                        .HasForeignKey("ExtensionId")
                        .HasConstraintName("fk_extension_extension_id");

                    b.HasOne("Marechai.Database.Models.Processor", "Processor")
                        .WithMany("InstructionSetExtensions")
                        .HasForeignKey("ProcessorId")
                        .HasConstraintName("fk_extension_processor_id");
                });

            modelBuilder.Entity("Marechai.Database.Models.Machine", b =>
                {
                    b.HasOne("Marechai.Database.Models.Company", "Company")
                        .WithMany("Machines")
                        .HasForeignKey("CompanyId")
                        .HasConstraintName("fk_machines_company");

                    b.HasOne("Marechai.Database.Models.MachineFamily", "Family")
                        .WithMany("Machines")
                        .HasForeignKey("FamilyId")
                        .HasConstraintName("fk_machines_family");
                });

            modelBuilder.Entity("Marechai.Database.Models.MachineFamily", b =>
                {
                    b.HasOne("Marechai.Database.Models.Company", "Company")
                        .WithMany("MachineFamilies")
                        .HasForeignKey("CompanyId")
                        .HasConstraintName("fk_machine_families_company")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Marechai.Database.Models.MemoryByMachine", b =>
                {
                    b.HasOne("Marechai.Database.Models.Machine", "Machine")
                        .WithMany("Memory")
                        .HasForeignKey("MachineId")
                        .HasConstraintName("fk_memory_by_machine_machine")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Marechai.Database.Models.Processor", b =>
                {
                    b.HasOne("Marechai.Database.Models.Company", "Company")
                        .WithMany("Processors")
                        .HasForeignKey("CompanyId")
                        .HasConstraintName("fk_processors_company");

                    b.HasOne("Marechai.Database.Models.InstructionSet", "InstructionSet")
                        .WithMany("Processors")
                        .HasForeignKey("InstructionSetId")
                        .HasConstraintName("fk_processors_instruction_set");
                });

            modelBuilder.Entity("Marechai.Database.Models.ProcessorsByMachine", b =>
                {
                    b.HasOne("Marechai.Database.Models.Machine", "Machine")
                        .WithMany("Processors")
                        .HasForeignKey("MachineId")
                        .HasConstraintName("fk_processors_by_machine_machine")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Marechai.Database.Models.Processor", "Processor")
                        .WithMany("ProcessorsByMachine")
                        .HasForeignKey("ProcessorId")
                        .HasConstraintName("fk_processors_by_machine_processor")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Marechai.Database.Models.ResolutionsByGpu", b =>
                {
                    b.HasOne("Marechai.Database.Models.Gpu", "Gpu")
                        .WithMany("ResolutionsByGpu")
                        .HasForeignKey("GpuId")
                        .HasConstraintName("fk_resolutions_by_gpu_gpu")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Marechai.Database.Models.Resolution", "Resolution")
                        .WithMany("ResolutionsByGpu")
                        .HasForeignKey("ResolutionId")
                        .HasConstraintName("fk_resolutions_by_gpu_resolution")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Marechai.Database.Models.SoundByMachine", b =>
                {
                    b.HasOne("Marechai.Database.Models.Machine", "Machine")
                        .WithMany("Sound")
                        .HasForeignKey("MachineId")
                        .HasConstraintName("fk_sound_by_machine_machine")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("Marechai.Database.Models.SoundSynth", "SoundSynth")
                        .WithMany("SoundByMachine")
                        .HasForeignKey("SoundSynthId")
                        .HasConstraintName("fk_sound_by_machine_sound_synth")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Marechai.Database.Models.SoundSynth", b =>
                {
                    b.HasOne("Marechai.Database.Models.Company", "Company")
                        .WithMany("SoundSynths")
                        .HasForeignKey("CompanyId")
                        .HasConstraintName("fk_sound_synths_company");
                });

            modelBuilder.Entity("Marechai.Database.Models.StorageByMachine", b =>
                {
                    b.HasOne("Marechai.Database.Models.Machine", "Machine")
                        .WithMany("Storage")
                        .HasForeignKey("MachineId")
                        .HasConstraintName("fk_storage_by_machine_machine")
                        .OnDelete(DeleteBehavior.Cascade);
                });

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

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
                {
                    b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
                {
                    b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

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

                    b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
                {
                    b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser")
                        .WithMany()
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade);
                });
#pragma warning restore 612, 618
        }
    }
}
