diff --git a/Cicm.Database/Migrations/20190527020604_MachinePhotos.Designer.cs b/Cicm.Database/Migrations/20190527020604_MachinePhotos.Designer.cs new file mode 100644 index 00000000..a9162415 --- /dev/null +++ b/Cicm.Database/Migrations/20190527020604_MachinePhotos.Designer.cs @@ -0,0 +1,2102 @@ +// +using System; +using Cicm.Database.Models; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace Cicm.Database.Migrations +{ + [DbContext(typeof(cicmContext))] + [Migration("20190527020604_MachinePhotos")] + partial class MachinePhotos + { + 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("Cicm.Database.Models.BrowserTest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Agif") + .ValueGeneratedOnAdd() + .HasColumnName("agif") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Browser") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("browser") + .HasColumnType("varchar(64)") + .HasDefaultValueSql("''") + .HasMaxLength(64); + + b.Property("Colors") + .ValueGeneratedOnAdd() + .HasColumnName("colors") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Flash") + .ValueGeneratedOnAdd() + .HasColumnName("flash") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Frames") + .ValueGeneratedOnAdd() + .HasColumnName("frames") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Gif87") + .ValueGeneratedOnAdd() + .HasColumnName("gif87") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Gif89") + .ValueGeneratedOnAdd() + .HasColumnName("gif89") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Jpeg") + .ValueGeneratedOnAdd() + .HasColumnName("jpeg") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Js") + .ValueGeneratedOnAdd() + .HasColumnName("js") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Os") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("os") + .HasColumnType("varchar(32)") + .HasDefaultValueSql("''") + .HasMaxLength(32); + + b.Property("Platform") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("platform") + .HasColumnType("varchar(8)") + .HasDefaultValueSql("''") + .HasMaxLength(8); + + b.Property("Png") + .ValueGeneratedOnAdd() + .HasColumnName("png") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Pngt") + .ValueGeneratedOnAdd() + .HasColumnName("pngt") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Table") + .ValueGeneratedOnAdd() + .HasColumnName("table") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("UserAgent") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("user_agent") + .HasColumnType("varchar(128)") + .HasDefaultValueSql("''") + .HasMaxLength(128); + + b.Property("Version") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("version") + .HasColumnType("varchar(16)") + .HasDefaultValueSql("''") + .HasMaxLength(16); + + 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("Cicm.Database.Models.CicmDb", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Updated") + .ValueGeneratedOnAdd() + .HasColumnName("updated") + .HasColumnType("datetime") + .HasDefaultValueSql("'CURRENT_TIMESTAMP'"); + + b.Property("Version") + .HasColumnName("version") + .HasColumnType("int(11)"); + + b.HasKey("Id"); + + b.ToTable("cicm_db"); + }); + + modelBuilder.Entity("Cicm.Database.Models.Company", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Address") + .HasColumnName("address") + .HasColumnType("varchar(80)") + .HasMaxLength(80); + + b.Property("City") + .HasColumnName("city") + .HasColumnType("varchar(80)") + .HasMaxLength(80); + + b.Property("CountryId") + .HasColumnName("country") + .HasColumnType("smallint(3)"); + + b.Property("Facebook") + .HasColumnName("facebook") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("Founded") + .HasColumnName("founded") + .HasColumnType("datetime"); + + b.Property("Name") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("name") + .HasColumnType("varchar(128)") + .HasDefaultValueSql("''"); + + b.Property("PostalCode") + .HasColumnName("postal_code") + .HasColumnType("varchar(25)") + .HasMaxLength(25); + + b.Property("Province") + .HasColumnName("province") + .HasColumnType("varchar(80)") + .HasMaxLength(80); + + b.Property("Sold") + .HasColumnName("sold") + .HasColumnType("datetime"); + + b.Property("SoldToId") + .HasColumnName("sold_to") + .HasColumnType("int(11)"); + + b.Property("Status") + .HasColumnName("status") + .HasColumnType("int(11)"); + + b.Property("Twitter") + .HasColumnName("twitter") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("Website") + .HasColumnName("website") + .HasColumnType("varchar(255)") + .HasMaxLength(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("Cicm.Database.Models.CompanyDescription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("CompanyId"); + + b.Property("Html") + .HasMaxLength(262144); + + b.Property("Text") + .IsRequired() + .HasMaxLength(262144); + + b.HasKey("Id"); + + b.HasIndex("CompanyId"); + + b.HasIndex("Text") + .HasAnnotation("MySql:FullTextIndex", true); + + b.ToTable("CompanyDescriptions"); + }); + + modelBuilder.Entity("Cicm.Database.Models.CompanyLogo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("CompanyId") + .HasColumnName("company_id") + .HasColumnType("int(11)"); + + b.Property("Guid") + .HasColumnName("logo_guid") + .HasColumnType("char(36)"); + + b.Property("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("Cicm.Database.Models.Forbidden", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Browser") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("browser") + .HasColumnType("char(128)") + .HasDefaultValueSql("''"); + + b.Property("Date") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("date") + .HasColumnType("char(20)") + .HasDefaultValueSql("''"); + + b.Property("Ip") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("ip") + .HasColumnType("char(16)") + .HasDefaultValueSql("''"); + + b.Property("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("Cicm.Database.Models.Gpu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("CompanyId") + .HasColumnName("company") + .HasColumnType("int(11)"); + + b.Property("DieSize") + .HasColumnName("die_size"); + + b.Property("Introduced") + .HasColumnName("introduced") + .HasColumnType("datetime"); + + b.Property("ModelCode") + .HasColumnName("model_code") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("Name") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("name") + .HasColumnType("char(128)") + .HasDefaultValueSql("''") + .HasMaxLength(128); + + b.Property("Package") + .HasColumnName("package") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("Process") + .HasColumnName("process") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("ProcessNm") + .HasColumnName("process_nm"); + + b.Property("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("Cicm.Database.Models.GpusByMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); + + b.Property("GpuId") + .HasColumnName("gpu") + .HasColumnType("int(11)"); + + b.Property("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("Cicm.Database.Models.InstructionSet", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Name") + .IsRequired() + .HasColumnName("instruction_set") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.HasKey("Id"); + + b.ToTable("instruction_sets"); + }); + + modelBuilder.Entity("Cicm.Database.Models.InstructionSetExtension", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Extension") + .IsRequired() + .HasColumnName("extension") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.HasKey("Id"); + + b.ToTable("instruction_set_extensions"); + }); + + modelBuilder.Entity("Cicm.Database.Models.InstructionSetExtensionsByProcessor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("ProcessorId") + .HasColumnName("processor_id") + .HasColumnType("int(11)"); + + b.Property("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("Cicm.Database.Models.Iso31661Numeric", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("smallint(3)"); + + b.Property("Name") + .IsRequired() + .HasColumnName("name") + .HasColumnType("varchar(64)") + .HasMaxLength(64); + + b.HasKey("Id"); + + b.HasIndex("Name") + .HasName("idx_name"); + + b.ToTable("iso3166_1_numeric"); + }); + + modelBuilder.Entity("Cicm.Database.Models.Log", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Browser") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("browser") + .HasColumnType("char(128)") + .HasDefaultValueSql("''"); + + b.Property("Date") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("date") + .HasColumnType("char(20)") + .HasDefaultValueSql("''"); + + b.Property("Ip") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("ip") + .HasColumnType("char(16)") + .HasDefaultValueSql("''"); + + b.Property("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("Cicm.Database.Models.Machine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("CompanyId") + .ValueGeneratedOnAdd() + .HasColumnName("company") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("FamilyId") + .HasColumnName("family") + .HasColumnType("int(11)"); + + b.Property("Introduced") + .HasColumnName("introduced") + .HasColumnType("datetime"); + + b.Property("Model") + .HasColumnName("model") + .HasColumnType("varchar(50)") + .HasMaxLength(50); + + b.Property("Name") + .IsRequired() + .HasColumnName("name") + .HasColumnType("varchar(255)") + .HasMaxLength(255); + + b.Property("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("Cicm.Database.Models.MachineFamily", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("CompanyId") + .HasColumnName("company") + .HasColumnType("int(11)"); + + b.Property("Name") + .IsRequired() + .HasColumnName("name") + .HasColumnType("varchar(255)") + .HasMaxLength(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("Cicm.Database.Models.MachinePhoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Author"); + + b.Property("CameraManufacturer"); + + b.Property("CameraModel"); + + b.Property("ColorSpace"); + + b.Property("Comments"); + + b.Property("Contrast"); + + b.Property("CreationDate"); + + b.Property("DigitalZoomRatio"); + + b.Property("ExifVersion"); + + b.Property("Exposure"); + + b.Property("ExposureMethod"); + + b.Property("ExposureProgram"); + + b.Property("Flash"); + + b.Property("Focal"); + + b.Property("FocalLength"); + + b.Property("FocalLengthEquivalent"); + + b.Property("HorizontalResolution"); + + b.Property("IsoRating"); + + b.Property("Lens"); + + b.Property("License"); + + b.Property("LightSource"); + + b.Property("MachineId"); + + b.Property("MeteringMode"); + + b.Property("Orientation"); + + b.Property("PixelComposition"); + + b.Property("Saturation"); + + b.Property("SceneCaptureType"); + + b.Property("SceneControl"); + + b.Property("SensingMethod"); + + b.Property("Sharpness"); + + b.Property("SoftwareUsed"); + + b.Property("SubjectDistanceRange"); + + b.Property("UploadDate") + .IsConcurrencyToken() + .ValueGeneratedOnAddOrUpdate(); + + b.Property("UserId"); + + b.Property("VerticalResolution"); + + b.Property("WhiteBalance"); + + b.HasKey("Id"); + + b.HasIndex("Author"); + + b.HasIndex("CameraManufacturer"); + + b.HasIndex("CameraModel"); + + b.HasIndex("ColorSpace"); + + b.HasIndex("Comments"); + + b.HasIndex("Contrast"); + + b.HasIndex("CreationDate"); + + b.HasIndex("DigitalZoomRatio"); + + b.HasIndex("ExifVersion"); + + b.HasIndex("Exposure"); + + b.HasIndex("ExposureMethod"); + + b.HasIndex("ExposureProgram"); + + b.HasIndex("Flash"); + + b.HasIndex("Focal"); + + b.HasIndex("FocalLength"); + + b.HasIndex("FocalLengthEquivalent"); + + b.HasIndex("HorizontalResolution"); + + b.HasIndex("IsoRating"); + + b.HasIndex("Lens"); + + b.HasIndex("License"); + + b.HasIndex("LightSource"); + + b.HasIndex("MachineId"); + + b.HasIndex("MeteringMode"); + + b.HasIndex("Orientation"); + + b.HasIndex("PixelComposition"); + + b.HasIndex("Saturation"); + + b.HasIndex("SceneCaptureType"); + + b.HasIndex("SceneControl"); + + b.HasIndex("SensingMethod"); + + b.HasIndex("Sharpness"); + + b.HasIndex("SoftwareUsed"); + + b.HasIndex("SubjectDistanceRange"); + + b.HasIndex("UploadDate"); + + b.HasIndex("UserId"); + + b.HasIndex("VerticalResolution"); + + b.HasIndex("WhiteBalance"); + + b.ToTable("MachinePhotos"); + }); + + modelBuilder.Entity("Cicm.Database.Models.MemoryByMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); + + b.Property("MachineId") + .HasColumnName("machine") + .HasColumnType("int(11)"); + + b.Property("Size") + .HasColumnName("size") + .HasColumnType("bigint(20)"); + + b.Property("Speed") + .HasColumnName("speed"); + + b.Property("Type") + .ValueGeneratedOnAdd() + .HasColumnName("type") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("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("Cicm.Database.Models.MoneyDonation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Donator") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("donator") + .HasColumnType("char(128)") + .HasDefaultValueSql("''"); + + b.Property("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("Cicm.Database.Models.News", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("AddedId") + .ValueGeneratedOnAdd() + .HasColumnName("added_id") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Date") + .HasColumnName("date") + .HasColumnType("datetime"); + + b.Property("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("Cicm.Database.Models.OwnedComputer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Boxed") + .ValueGeneratedOnAdd() + .HasColumnName("boxed") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Cap1") + .ValueGeneratedOnAdd() + .HasColumnName("cap1") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Cap2") + .ValueGeneratedOnAdd() + .HasColumnName("cap2") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Cpu1") + .ValueGeneratedOnAdd() + .HasColumnName("cpu1") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Cpu2") + .ValueGeneratedOnAdd() + .HasColumnName("cpu2") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Date") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("date") + .HasColumnType("varchar(20)") + .HasDefaultValueSql("''"); + + b.Property("DbId") + .ValueGeneratedOnAdd() + .HasColumnName("db_id") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Disk1") + .ValueGeneratedOnAdd() + .HasColumnName("disk1") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Disk2") + .ValueGeneratedOnAdd() + .HasColumnName("disk2") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Manuals") + .ValueGeneratedOnAdd() + .HasColumnName("manuals") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Mhz1") + .ValueGeneratedOnAdd() + .HasColumnName("mhz1") + .HasColumnType("decimal(10,0)") + .HasDefaultValueSql("'0'"); + + b.Property("Mhz2") + .ValueGeneratedOnAdd() + .HasColumnName("mhz2") + .HasColumnType("decimal(10,0)") + .HasDefaultValueSql("'0'"); + + b.Property("Ram") + .ValueGeneratedOnAdd() + .HasColumnName("ram") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Rigid") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("rigid") + .HasColumnType("varchar(64)") + .HasDefaultValueSql("''"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnName("status") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Trade") + .ValueGeneratedOnAdd() + .HasColumnName("trade") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("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("Cicm.Database.Models.OwnedConsole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Boxed") + .ValueGeneratedOnAdd() + .HasColumnName("boxed") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Date") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("date") + .HasColumnType("char(20)") + .HasDefaultValueSql("''"); + + b.Property("DbId") + .ValueGeneratedOnAdd() + .HasColumnName("db_id") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Manuals") + .ValueGeneratedOnAdd() + .HasColumnName("manuals") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnName("status") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("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("Cicm.Database.Models.Processor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("AddrBus") + .HasColumnName("addr_bus") + .HasColumnType("int(11)"); + + b.Property("CompanyId") + .HasColumnName("company") + .HasColumnType("int(11)"); + + b.Property("Cores") + .HasColumnName("cores") + .HasColumnType("int(11)"); + + b.Property("DataBus") + .HasColumnName("data_bus") + .HasColumnType("int(11)"); + + b.Property("DieSize") + .HasColumnName("die_size"); + + b.Property("FprSize") + .HasColumnName("FPR_size") + .HasColumnType("int(11)"); + + b.Property("Fprs") + .HasColumnName("FPRs") + .HasColumnType("int(11)"); + + b.Property("GprSize") + .HasColumnName("GPR_size") + .HasColumnType("int(11)"); + + b.Property("Gprs") + .HasColumnName("GPRs") + .HasColumnType("int(11)"); + + b.Property("InstructionSetId") + .HasColumnName("instruction_set") + .HasColumnType("int(11)"); + + b.Property("Introduced") + .HasColumnName("introduced") + .HasColumnType("datetime"); + + b.Property("L1Data") + .HasColumnName("L1_data"); + + b.Property("L1Instruction") + .HasColumnName("L1_instruction"); + + b.Property("L2"); + + b.Property("L3"); + + b.Property("ModelCode") + .HasColumnName("model_code") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("Name") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("name") + .HasColumnType("char(50)") + .HasDefaultValueSql("''") + .HasMaxLength(50); + + b.Property("Package") + .HasColumnName("package") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("Process") + .HasColumnName("process") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("ProcessNm") + .HasColumnName("process_nm"); + + b.Property("SimdRegisters") + .HasColumnName("SIMD_registers") + .HasColumnType("int(11)"); + + b.Property("SimdSize") + .HasColumnName("SIMD_size") + .HasColumnType("int(11)"); + + b.Property("Speed") + .HasColumnName("speed"); + + b.Property("ThreadsPerCore") + .HasColumnName("threads_per_core") + .HasColumnType("int(11)"); + + b.Property("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("Cicm.Database.Models.ProcessorsByMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); + + b.Property("MachineId") + .HasColumnName("machine") + .HasColumnType("int(11)"); + + b.Property("ProcessorId") + .HasColumnName("processor") + .HasColumnType("int(11)"); + + b.Property("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("Cicm.Database.Models.Resolution", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Chars") + .ValueGeneratedOnAdd() + .HasColumnName("chars") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Colors") + .HasColumnName("colors") + .HasColumnType("bigint(20)"); + + b.Property("Grayscale"); + + b.Property("Height") + .ValueGeneratedOnAdd() + .HasColumnName("height") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Palette") + .HasColumnName("palette") + .HasColumnType("bigint(20)"); + + b.Property("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("Cicm.Database.Models.ResolutionsByGpu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); + + b.Property("GpuId") + .HasColumnName("gpu") + .HasColumnType("int(11)"); + + b.Property("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("Cicm.Database.Models.SoundByMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); + + b.Property("MachineId") + .HasColumnName("machine") + .HasColumnType("int(11)"); + + b.Property("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("Cicm.Database.Models.SoundSynth", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("CompanyId") + .HasColumnName("company") + .HasColumnType("int(11)"); + + b.Property("Depth") + .HasColumnName("depth") + .HasColumnType("int(11)"); + + b.Property("Frequency") + .HasColumnName("frequency"); + + b.Property("Introduced") + .HasColumnName("introduced") + .HasColumnType("datetime"); + + b.Property("ModelCode") + .HasColumnName("model_code") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("Name") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("name") + .HasColumnType("char(50)") + .HasDefaultValueSql("''") + .HasMaxLength(50); + + b.Property("SquareWave") + .HasColumnName("square_wave") + .HasColumnType("int(11)"); + + b.Property("Type") + .HasColumnName("type") + .HasColumnType("int(11)"); + + b.Property("Voices") + .HasColumnName("voices") + .HasColumnType("int(11)"); + + b.Property("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("Cicm.Database.Models.StorageByMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); + + b.Property("Capacity") + .HasColumnName("capacity") + .HasColumnType("bigint(20)"); + + b.Property("Interface") + .ValueGeneratedOnAdd() + .HasColumnName("interface") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("MachineId") + .HasColumnName("machine") + .HasColumnType("int(11)"); + + b.Property("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("Id") + .ValueGeneratedOnAdd(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); + + b.Property("Name") + .HasMaxLength(256); + + b.Property("NormalizedName") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasName("RoleNameIndex"); + + b.ToTable("AspNetRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ClaimType"); + + b.Property("ClaimValue"); + + b.Property("RoleId") + .IsRequired(); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); + + b.Property("Discriminator") + .IsRequired(); + + b.Property("Email") + .HasMaxLength(256); + + b.Property("EmailConfirmed"); + + b.Property("LockoutEnabled"); + + b.Property("LockoutEnd"); + + b.Property("NormalizedEmail") + .HasMaxLength(256); + + b.Property("NormalizedUserName") + .HasMaxLength(256); + + b.Property("PasswordHash"); + + b.Property("PhoneNumber"); + + b.Property("PhoneNumberConfirmed"); + + b.Property("SecurityStamp"); + + b.Property("TwoFactorEnabled"); + + b.Property("UserName") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasName("UserNameIndex"); + + b.ToTable("AspNetUsers"); + + b.HasDiscriminator("Discriminator").HasValue("IdentityUser"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ClaimType"); + + b.Property("ClaimValue"); + + b.Property("UserId") + .IsRequired(); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasMaxLength(128); + + b.Property("ProviderKey") + .HasMaxLength(128); + + b.Property("ProviderDisplayName"); + + b.Property("UserId") + .IsRequired(); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId"); + + b.Property("RoleId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId"); + + b.Property("LoginProvider") + .HasMaxLength(128); + + b.Property("Name") + .HasMaxLength(128); + + b.Property("Value"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens"); + }); + + modelBuilder.Entity("Cicm.Database.Models.ApplicationUser", b => + { + b.HasBaseType("Microsoft.AspNetCore.Identity.IdentityUser"); + + b.HasDiscriminator().HasValue("ApplicationUser"); + }); + + modelBuilder.Entity("Cicm.Database.Models.Company", b => + { + b.HasOne("Cicm.Database.Models.Iso31661Numeric", "Country") + .WithMany("Companies") + .HasForeignKey("CountryId") + .HasConstraintName("fk_companies_country"); + + b.HasOne("Cicm.Database.Models.Company", "SoldTo") + .WithMany("InverseSoldToNavigation") + .HasForeignKey("SoldToId") + .HasConstraintName("fk_companies_sold_to"); + }); + + modelBuilder.Entity("Cicm.Database.Models.CompanyDescription", b => + { + b.HasOne("Cicm.Database.Models.Company", "Company") + .WithMany("Descriptions") + .HasForeignKey("CompanyId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Cicm.Database.Models.CompanyLogo", b => + { + b.HasOne("Cicm.Database.Models.Company", "Company") + .WithMany("Logos") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_company_logos_company1"); + }); + + modelBuilder.Entity("Cicm.Database.Models.Gpu", b => + { + b.HasOne("Cicm.Database.Models.Company", "Company") + .WithMany("Gpus") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_gpus_company"); + }); + + modelBuilder.Entity("Cicm.Database.Models.GpusByMachine", b => + { + b.HasOne("Cicm.Database.Models.Gpu", "Gpu") + .WithMany("GpusByMachine") + .HasForeignKey("GpuId") + .HasConstraintName("fk_gpus_by_machine_gpu") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("Cicm.Database.Models.Machine", "Machine") + .WithMany("Gpus") + .HasForeignKey("MachineId") + .HasConstraintName("fk_gpus_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Cicm.Database.Models.InstructionSetExtensionsByProcessor", b => + { + b.HasOne("Cicm.Database.Models.InstructionSetExtension", "Extension") + .WithMany("InstructionSetExtensionsByProcessor") + .HasForeignKey("ExtensionId") + .HasConstraintName("fk_extension_extension_id"); + + b.HasOne("Cicm.Database.Models.Processor", "Processor") + .WithMany("InstructionSetExtensions") + .HasForeignKey("ProcessorId") + .HasConstraintName("fk_extension_processor_id"); + }); + + modelBuilder.Entity("Cicm.Database.Models.Machine", b => + { + b.HasOne("Cicm.Database.Models.Company", "Company") + .WithMany("Machines") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_machines_company"); + + b.HasOne("Cicm.Database.Models.MachineFamily", "Family") + .WithMany("Machines") + .HasForeignKey("FamilyId") + .HasConstraintName("fk_machines_family"); + }); + + modelBuilder.Entity("Cicm.Database.Models.MachineFamily", b => + { + b.HasOne("Cicm.Database.Models.Company", "Company") + .WithMany("MachineFamilies") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_machine_families_company") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Cicm.Database.Models.MachinePhoto", b => + { + b.HasOne("Cicm.Database.Models.Machine", "Machine") + .WithMany("Photos") + .HasForeignKey("MachineId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("Cicm.Database.Models.ApplicationUser", "User") + .WithMany("Photos") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + }); + + modelBuilder.Entity("Cicm.Database.Models.MemoryByMachine", b => + { + b.HasOne("Cicm.Database.Models.Machine", "Machine") + .WithMany("Memory") + .HasForeignKey("MachineId") + .HasConstraintName("fk_memory_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Cicm.Database.Models.Processor", b => + { + b.HasOne("Cicm.Database.Models.Company", "Company") + .WithMany("Processors") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_processors_company"); + + b.HasOne("Cicm.Database.Models.InstructionSet", "InstructionSet") + .WithMany("Processors") + .HasForeignKey("InstructionSetId") + .HasConstraintName("fk_processors_instruction_set"); + }); + + modelBuilder.Entity("Cicm.Database.Models.ProcessorsByMachine", b => + { + b.HasOne("Cicm.Database.Models.Machine", "Machine") + .WithMany("Processors") + .HasForeignKey("MachineId") + .HasConstraintName("fk_processors_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("Cicm.Database.Models.Processor", "Processor") + .WithMany("ProcessorsByMachine") + .HasForeignKey("ProcessorId") + .HasConstraintName("fk_processors_by_machine_processor") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Cicm.Database.Models.ResolutionsByGpu", b => + { + b.HasOne("Cicm.Database.Models.Gpu", "Gpu") + .WithMany("ResolutionsByGpu") + .HasForeignKey("GpuId") + .HasConstraintName("fk_resolutions_by_gpu_gpu") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("Cicm.Database.Models.Resolution", "Resolution") + .WithMany("ResolutionsByGpu") + .HasForeignKey("ResolutionId") + .HasConstraintName("fk_resolutions_by_gpu_resolution") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Cicm.Database.Models.SoundByMachine", b => + { + b.HasOne("Cicm.Database.Models.Machine", "Machine") + .WithMany("Sound") + .HasForeignKey("MachineId") + .HasConstraintName("fk_sound_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("Cicm.Database.Models.SoundSynth", "SoundSynth") + .WithMany("SoundByMachine") + .HasForeignKey("SoundSynthId") + .HasConstraintName("fk_sound_by_machine_sound_synth") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Cicm.Database.Models.SoundSynth", b => + { + b.HasOne("Cicm.Database.Models.Company", "Company") + .WithMany("SoundSynths") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_sound_synths_company"); + }); + + modelBuilder.Entity("Cicm.Database.Models.StorageByMachine", b => + { + b.HasOne("Cicm.Database.Models.Machine", "Machine") + .WithMany("Storage") + .HasForeignKey("MachineId") + .HasConstraintName("fk_storage_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole") + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", 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", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Cicm.Database/Migrations/20190527020604_MachinePhotos.cs b/Cicm.Database/Migrations/20190527020604_MachinePhotos.cs new file mode 100644 index 00000000..601636f3 --- /dev/null +++ b/Cicm.Database/Migrations/20190527020604_MachinePhotos.cs @@ -0,0 +1,148 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Cicm.Database.Migrations +{ + public partial class MachinePhotos : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn("Discriminator", "AspNetUsers", nullable: false, defaultValue: ""); + + migrationBuilder.CreateTable("MachinePhotos", + table => new + { + Id = table.Column(), + Author = table.Column(nullable: true), + CameraManufacturer = table.Column(nullable: true), + CameraModel = table.Column(nullable: true), + ColorSpace = table.Column(nullable: true), + Comments = table.Column(nullable: true), + Contrast = table.Column(nullable: true), + CreationDate = table.Column(nullable: true), + DigitalZoomRatio = table.Column(nullable: true), + ExifVersion = table.Column(nullable: true), + Exposure = table.Column(nullable: true), + ExposureMethod = table.Column(nullable: true), + ExposureProgram = table.Column(nullable: true), + Flash = table.Column(nullable: true), + Focal = table.Column(nullable: true), + FocalLength = table.Column(nullable: true), + FocalLengthEquivalent = table.Column(nullable: true), + HorizontalResolution = table.Column(nullable: true), + IsoRating = table.Column(nullable: true), + Lens = table.Column(nullable: true), + License = table.Column(nullable: true), + LightSource = table.Column(nullable: true), + MeteringMode = table.Column(nullable: true), + Orientation = table.Column(nullable: true), + PixelComposition = table.Column(nullable: true), + Saturation = table.Column(nullable: true), + SceneCaptureType = table.Column(nullable: true), + SceneControl = table.Column(nullable: true), + SensingMethod = table.Column(nullable: true), + Sharpness = table.Column(nullable: true), + SoftwareUsed = table.Column(nullable: true), + SubjectDistanceRange = table.Column(nullable: true), + UploadDate = + table.Column() + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.ComputedColumn), + VerticalResolution = table.Column(nullable: true), + WhiteBalance = table.Column(nullable: true), + UserId = table.Column(nullable: true), + MachineId = table.Column(nullable: true) + }, constraints: table => + { + table.PrimaryKey("PK_MachinePhotos", x => x.Id); + table.ForeignKey("FK_MachinePhotos_machines_MachineId", x => x.MachineId, + "machines", "id", onDelete: ReferentialAction.Cascade); + table.ForeignKey("FK_MachinePhotos_AspNetUsers_UserId", x => x.UserId, + "AspNetUsers", "Id", onDelete: ReferentialAction.SetNull); + }); + + migrationBuilder.CreateIndex("IX_MachinePhotos_Author", "MachinePhotos", "Author"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_CameraManufacturer", "MachinePhotos", "CameraManufacturer"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_CameraModel", "MachinePhotos", "CameraModel"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_ColorSpace", "MachinePhotos", "ColorSpace"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_Comments", "MachinePhotos", "Comments"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_Contrast", "MachinePhotos", "Contrast"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_CreationDate", "MachinePhotos", "CreationDate"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_DigitalZoomRatio", "MachinePhotos", "DigitalZoomRatio"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_ExifVersion", "MachinePhotos", "ExifVersion"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_Exposure", "MachinePhotos", "Exposure"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_ExposureMethod", "MachinePhotos", "ExposureMethod"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_ExposureProgram", "MachinePhotos", "ExposureProgram"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_Flash", "MachinePhotos", "Flash"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_Focal", "MachinePhotos", "Focal"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_FocalLength", "MachinePhotos", "FocalLength"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_FocalLengthEquivalent", "MachinePhotos", + "FocalLengthEquivalent"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_HorizontalResolution", "MachinePhotos", + "HorizontalResolution"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_IsoRating", "MachinePhotos", "IsoRating"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_Lens", "MachinePhotos", "Lens"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_License", "MachinePhotos", "License"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_LightSource", "MachinePhotos", "LightSource"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_MachineId", "MachinePhotos", "MachineId"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_MeteringMode", "MachinePhotos", "MeteringMode"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_Orientation", "MachinePhotos", "Orientation"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_PixelComposition", "MachinePhotos", "PixelComposition"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_Saturation", "MachinePhotos", "Saturation"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_SceneCaptureType", "MachinePhotos", "SceneCaptureType"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_SceneControl", "MachinePhotos", "SceneControl"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_SensingMethod", "MachinePhotos", "SensingMethod"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_Sharpness", "MachinePhotos", "Sharpness"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_SoftwareUsed", "MachinePhotos", "SoftwareUsed"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_SubjectDistanceRange", "MachinePhotos", + "SubjectDistanceRange"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_UploadDate", "MachinePhotos", "UploadDate"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_UserId", "MachinePhotos", "UserId"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_VerticalResolution", "MachinePhotos", "VerticalResolution"); + + migrationBuilder.CreateIndex("IX_MachinePhotos_WhiteBalance", "MachinePhotos", "WhiteBalance"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable("MachinePhotos"); + + migrationBuilder.DropColumn("Discriminator", "AspNetUsers"); + } + } +} \ No newline at end of file diff --git a/Cicm.Database/Migrations/cicmContextModelSnapshot.cs b/Cicm.Database/Migrations/cicmContextModelSnapshot.cs index 2295309f..99df481a 100644 --- a/Cicm.Database/Migrations/cicmContextModelSnapshot.cs +++ b/Cicm.Database/Migrations/cicmContextModelSnapshot.cs @@ -1,1227 +1,2158 @@ // - -using System; +uusing System; using Cicm.Database.Models; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; +ing Microsoft.EntityFrameworkCore.Storage.ValueConversion; + namespace Cicm.Database.Migrations { [DbContext(typeof(cicmContext))] - class cicmContextModelSnapshot : ModelSnapshot + partial class cicmContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { - #pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "2.2.4-servicing-10062") - .HasAnnotation("Relational:MaxIdentifierLength", 64); +#pragma warning disable 612, 618 + modelBuilder + + ation("ProductVersion", "2.2.4-servicing-10062") + .HasAnnotation("Relational:MaxIdentifierLength", 64); modelBuilder.Entity("Cicm.Database.Models.BrowserTest", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + + ype("int(11)"); - b.Property("Agif").ValueGeneratedOnAdd().HasColumnName("agif").HasColumnType("tinyint(1)") - .HasDefaultValueSql("'0'"); + b.Property("Agif") + .ValueGeneratedOnAdd() + + if") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); - b.Property("Browser").IsRequired().ValueGeneratedOnAdd().HasColumnName("browser") - .HasColumnType("varchar(64)").HasDefaultValueSql("''").HasMaxLength(64); + b.Property("Browser") + .IsReq + .ValueGeneratedOnAdd() + .HasColumnName("browser") + .HasColumnType("varchar(64)") + + .HasDefaultValueSql("''") + .HasMaxLength(64); - b.Property("Colors").ValueGeneratedOnAdd().HasColumnName("colors").HasColumnType("tinyint(1)") - .HasDefaultValueSql("'0'"); + b.Property("Colors") + . + d() + .HasColumnName("colors") + .HasColumnType("tinyint(1)") + .HasDefaultVal + b.Property("Flash") + .ValueGeneratedOnAdd() + .HasColumnName("flash") + + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); - b.Property("Flash").ValueGeneratedOnAdd().HasColumnName("flash").HasColumnType("tinyint(1)") - .HasDefaultValueSql("'0'"); + b.Property("Frames") + + eGeneratedOnAdd() + .HasColumnName("frames") + .HasColumnType("tinyint(1)") + + alueSql("'0'"); - b.Property("Frames").ValueGeneratedOnAdd().HasColumnName("frames").HasColumnType("tinyint(1)") - .HasDefaultValueSql("'0'"); + b.Property("Gif87") + .ValueGeneratedOnAdd() + + umnName("gif87") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); - b.Property("Gif87").ValueGeneratedOnAdd().HasColumnName("gif87").HasColumnType("tinyint(1)") - .HasDefaultValueSql("'0'"); + b.Property("Gif89") + + eGeneratedOnAdd() + .HasColumnName("gif89") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); - b.Property("Gif89").ValueGeneratedOnAdd().HasColumnName("gif89").HasColumnType("tinyint(1)") - .HasDefaultValueSql("'0'"); + + y("Jpeg") + .ValueGeneratedOnAdd() + .HasColumnName("jpeg") + .HasCol + )") + .HasDefaultValueSql("'0'"); - b.Property("Jpeg").ValueGeneratedOnAdd().HasColumnName("jpeg").HasColumnType("tinyint(1)") - .HasDefaultValueSql("'0'"); + b.Property("Js") + .ValueGeneratedOnAd + .HasColumnName("js") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); - b.Property("Js").ValueGeneratedOnAdd().HasColumnName("js").HasColumnType("tinyint(1)") - .HasDefaultValueSql("'0'"); + + b.Property("Os") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("os") + .H + har(32)") + .HasDefaultValueSql("''") + .HasMaxLength(32); - b.Property("Os").IsRequired().ValueGeneratedOnAdd().HasColumnName("os") - .HasColumnType("varchar(32)").HasDefaultValueSql("''").HasMaxLength(32); + b.Property("Platform") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("platform") + .HasColumnType("varchar(8)") + .HasDefaultValueSql("''") + .HasMaxLength(8); - b.Property("Platform").IsRequired().ValueGeneratedOnAdd().HasColumnName("platform") - .HasColumnType("varchar(8)").HasDefaultValueSql("''").HasMaxLength(8); + b.Property("Png") + .ValueGeneratedOnAdd() + .HasColumnName("png") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); - b.Property("Png").ValueGeneratedOnAdd().HasColumnName("png").HasColumnType("tinyint(1)") - .HasDefaultValueSql("'0'"); + b.Property("Pngt") + .ValueGeneratedOnAdd() + .HasColumnName("pngt") + + umnType("tinyint(1)") + .HasDefaultValueSql("'0'"); - b.Property("Pngt").ValueGeneratedOnAdd().HasColumnName("pngt").HasColumnType("tinyint(1)") - .HasDefaultValueSql("'0'"); + b.Property("Table") + .ValueGeneratedOnAdd() + .HasColumnName("table") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); - b.Property("Table").ValueGeneratedOnAdd().HasColumnName("table").HasColumnType("tinyint(1)") - .HasDefaultValueSql("'0'"); + b.Property("UserAgent") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("user_agent") + .HasColumnType("varchar(128)") + .HasDefaultValueSql("''") + .HasMaxLength(128); - b.Property("UserAgent").IsRequired().ValueGeneratedOnAdd().HasColumnName("user_agent") - .HasColumnType("varchar(128)").HasDefaultValueSql("''").HasMaxLength(128); + b.Property("Version") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("version") + .HasColumnType("varchar(16)") + .HasDefaultValueSql("''") + .HasMaxLength(16); - b.Property("Version").IsRequired().ValueGeneratedOnAdd().HasColumnName("version") - .HasColumnType("varchar(16)").HasDefaultValueSql("''").HasMaxLength(16); + b.HasKey("Id"); - b.HasKey("Id"); + b.HasIndex("Browser") + .Ha + _tests_browser"); - b.HasIndex("Browser").HasName("idx_browser_tests_browser"); + b.HasIndex("Os") + .HasName("idx_browser_tests_os"); - b.HasIndex("Os").HasName("idx_browser_tests_os"); + b.HasIndex("Platform") + + .HasName("idx_browser_tests_platform"); - b.HasIndex("Platform").HasName("idx_browser_tests_platform"); + b.HasIndex("UserAgent") + .HasName("idx_browser_tests_user_agent"); - b.HasIndex("UserAgent").HasName("idx_browser_tests_user_agent"); + b.HasIndex("Version") + .HasName("idx_browser_tests_version"); - b.HasIndex("Version").HasName("idx_browser_tests_version"); - - b.ToTable("browser_tests"); - }); + b.ToTable("browser_tests"); + }); modelBuilder.Entity("Cicm.Database.Models.CicmDb", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); - b.Property("Updated").ValueGeneratedOnAdd().HasColumnName("updated") - .HasColumnType("datetime").HasDefaultValueSql("'CURRENT_TIMESTAMP'"); + b.Property("Updated") + .ValueGeneratedOnAdd() + .HasColumnName("updated") + .HasColumnType("datetime") + .HasDefaultValueSql("'CURRENT_TIMESTAMP'"); - b.Property("Version").HasColumnName("version").HasColumnType("int(11)"); + b.Property("Version") + .HasColumnName("version") + .HasColumnType("int(11)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("cicm_db"); - }); + b.ToTable("cicm_db"); + }); modelBuilder.Entity("Cicm.Database.Models.Company", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); - b.Property("Address").HasColumnName("address").HasColumnType("varchar(80)").HasMaxLength(80); + b.Property("Address") + .HasColumnName("address") + .HasColumnType("varchar(80)") + .HasMaxLength(80); - b.Property("City").HasColumnName("city").HasColumnType("varchar(80)").HasMaxLength(80); + b.Property("City") + .HasColumnName("city") + .HasColumnType("varchar(80)") + .HasMaxLength(80); - b.Property("CountryId").HasColumnName("country").HasColumnType("smallint(3)"); + b.Property("CountryId") + .HasColumnName("country") + .HasColumnType("smallint(3)"); - b.Property("Facebook").HasColumnName("facebook").HasColumnType("varchar(45)").HasMaxLength(45); + b.Property("Facebook") + .HasColumnName("facebook") + .HasColumnType("varchar(45)") + .HasMaxLength(45); - b.Property("Founded").HasColumnName("founded").HasColumnType("datetime"); + b.Property("Founded") + .HasColumnName("founded") + .HasColumnType("datetime"); - b.Property("Name").IsRequired().ValueGeneratedOnAdd().HasColumnName("name") - .HasColumnType("varchar(128)").HasDefaultValueSql("''"); + b.Property("Name") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("name") + .HasColumnType("varchar(128)") + .HasDefaultValueSql("''"); - b.Property("PostalCode").HasColumnName("postal_code").HasColumnType("varchar(25)") - .HasMaxLength(25); + b.Property("PostalCode") + .HasColumnName("postal_code") + .HasColumnType("varchar(25)") + .HasMaxLength(25); - b.Property("Province").HasColumnName("province").HasColumnType("varchar(80)").HasMaxLength(80); + b.Property("Province") + .HasColumnName("province") + .HasColumnType("varchar(80)") + .HasMaxLength(80); - b.Property("Sold").HasColumnName("sold").HasColumnType("datetime"); + b.Property("Sold") + .HasColumnName("sold") + .HasColumnType("datetime"); - b.Property("SoldToId").HasColumnName("sold_to").HasColumnType("int(11)"); + b.Property("SoldToId") + .HasColumnName("sold_to") + .HasColumnType("int(11)"); - b.Property("Status").HasColumnName("status").HasColumnType("int(11)"); + b.Property("Status") + + ame("status") + .HasColumnType("int(11)"); - b.Property("Twitter").HasColumnName("twitter").HasColumnType("varchar(45)").HasMaxLength(45); + b.Property("Twitter") + .HasColumnName + .HasColumnType("varchar(45)") + .HasMaxLength(45); - b.Property("Website").HasColumnName("website").HasColumnType("varchar(255)").HasMaxLength(255); + b.Property("Website") + + HasColumnName("website") + .HasColumnType("varchar(255)") + .HasMaxLength(255); - b.HasKey("Id"); + b.HasKey("Id") + b.HasIndex("Address") + .HasName("idx_companies_address"); - b.HasIndex("Address").HasName("idx_companies_address"); + b.HasIndex("City") + .HasName("idx_companies_city"); - b.HasIndex("City").HasName("idx_companies_city"); + b.HasIndex("CountryId") + .HasName("idx_companies_country"); - b.HasIndex("CountryId").HasName("idx_companies_country"); + b.HasIndex("Facebook") + .HasName("idx_companies_facebook"); - b.HasIndex("Facebook").HasName("idx_companies_facebook"); + b.HasIndex("Founded") + .HasName("idx_companies_founded"); - b.HasIndex("Founded").HasName("idx_companies_founded"); + b.HasIndex("Name") + .HasName("idx_companies_name"); - b.HasIndex("Name").HasName("idx_companies_name"); + b.HasIndex("PostalCode") + .HasName("idx_companies_postal_code"); - b.HasIndex("PostalCode").HasName("idx_companies_postal_code"); + b.HasIndex("Province") + .HasName("idx_companies_province"); - b.HasIndex("Province").HasName("idx_companies_province"); + b.HasIndex("Sold") + .HasName("idx_companies_sold"); - b.HasIndex("Sold").HasName("idx_companies_sold"); + b.HasIndex("SoldToId") + .HasName("idx_companies_so + b.HasIndex("Status") + .HasName("idx_companies_status"); - b.HasIndex("SoldToId").HasName("idx_companies_sold_to"); + b.HasIn + .HasName("idx_companies_twitter"); - b.HasIndex("Status").HasName("idx_companies_status"); + b.HasIndex("Website") + .HasName("idx_companies_website"); - b.HasIndex("Twitter").HasName("idx_companies_twitter"); - - b.HasIndex("Website").HasName("idx_companies_website"); - - b.ToTable("companies"); - }); + b.ToTable("companies"); + }); modelBuilder.Entity("Cicm.Database.Models.CompanyDescription", b => - { - b.Property("Id").ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("CompanyId"); + b.Property("CompanyId"); - b.Property("Html").HasMaxLength(262144); + b.Property("Html") + .HasMaxLength(262144); - b.Property("Text").IsRequired().HasMaxLength(262144); + b.Property("Text") + .IsRequired() + .HasMaxLength(262144); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CompanyId"); + b.HasIndex("CompanyId"); - b.HasIndex("Text").HasAnnotation("MySql:FullTextIndex", true); + b.HasIndex("Text") + .HasAnnotation("MySql:FullTextIndex", true); - b.ToTable("CompanyDescriptions"); - }); + b.ToTable("CompanyDescriptions"); + }); modelBuilder.Entity("Cicm.Database.Models.CompanyLogo", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); - b.Property("CompanyId").HasColumnName("company_id").HasColumnType("int(11)"); + b.Property("CompanyId") + .HasColumnName("company_id") + .HasColumnType("int(11)"); - b.Property("Guid").HasColumnName("logo_guid").HasColumnType("char(36)"); + b.Property("Guid") + .HasColumnName("logo_guid") + .HasColumnType("char(36)"); - b.Property("Year").HasColumnName("year").HasColumnType("int(4)"); + b.Property("Year") + .HasColumnName("year") + .HasColumnType("int(4)"); - b.HasKey("Id", "CompanyId", "Guid"); + b.HasKey("Id", "CompanyId", "Guid"); - b.HasIndex("CompanyId").HasName("idx_company_id"); + b.HasIndex("CompanyId") + .HasName("idx_company_id"); - b.HasIndex("Guid").HasName("idx_guid"); + b.HasIndex("Guid") + .HasName("idx_guid"); - b.HasIndex("Id").IsUnique().HasName("idx_id"); + b.HasIndex("Id") + .IsUnique() + .HasName("idx_id"); - b.ToTable("company_logos"); - }); + b.ToTable("company_logos"); + }); - modelBuilder.Entity("Cicm.Database.Models.Forbidden", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + modelBuilder.Entity("Cicm.Database.Models.F + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); - b.Property("Browser").IsRequired().ValueGeneratedOnAdd().HasColumnName("browser") - .HasColumnType("char(128)").HasDefaultValueSql("''"); + b.Property("Browser") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("browser") + .HasColumnType("char(128)") - b.Property("Date").IsRequired().ValueGeneratedOnAdd().HasColumnName("date") - .HasColumnType("char(20)").HasDefaultValueSql("''"); + .HasDefaultValueSql("''"); - b.Property("Ip").IsRequired().ValueGeneratedOnAdd().HasColumnName("ip") - .HasColumnType("char(16)").HasDefaultValueSql("''"); + b.Property("Date") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("date") + .HasColumnType("char(20)") + .HasDefaultValueSql("''"); - b.Property("Referer").IsRequired().ValueGeneratedOnAdd().HasColumnName("referer") - .HasColumnType("char(255)").HasDefaultValueSql("''"); + b.Property("Ip") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("ip") + .HasColumnType("char(16)") + .HasDefaultValueSql("''"); - b.HasKey("Id"); + b.Property("Referer") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("referer") + .HasColumnType("char(255)") + .HasDefaultValueSql("''"); - b.HasIndex("Browser").HasName("idx_forbidden_browser"); + b.HasKey("Id"); - b.HasIndex("Date").HasName("idx_forbidden_date"); + b.HasIndex("Browser") + .HasName("idx_forbidden_browser"); - b.HasIndex("Ip").HasName("idx_forbidden_ip"); + b.HasIndex("Date") + .HasName("idx_forbidden_date"); - b.HasIndex("Referer").HasName("idx_forbidden_referer"); + b.HasIndex("Ip") + + rbidden_ip"); - b.ToTable("forbidden"); - }); + b.HasIndex("Referer") + .HasName("idx_forbidden_referer"); + + b.ToTable("forbidden"); + }); modelBuilder.Entity("Cicm.Database.Models.Gpu", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); - b.Property("CompanyId").HasColumnName("company").HasColumnType("int(11)"); + + t?>("CompanyId") + .HasColumnName("company") + .HasColumnType("int(11)"); - b.Property("DieSize").HasColumnName("die_size"); + b.Property("Introduced").HasColumnName("introduced").HasColumnType("datetime"); + b.Property("Introduced") + .HasColumnName("int + .HasColumnType("datetime"); - b.Property("ModelCode").HasColumnName("model_code").HasColumnType("varchar(45)") - .HasMaxLength(45); + b.Property("ModelCode") + .HasColumnName("model_code") + + sColumnType("varchar(45)") + .HasMaxLength(45); - b.Property("Name").IsRequired().ValueGeneratedOnAdd().HasColumnName("name") - .HasColumnType("char(128)").HasDefaultValueSql("''").HasMaxLength(128); + b.Property("Name") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("name") + .HasColumnType("char(128)") + .HasDefaultValueSql("''") + .HasMaxLength(128); - b.Property("Package").HasColumnName("package").HasColumnType("varchar(45)").HasMaxLength(45); + b.Property("Package") + .HasColumnName("package") + .HasColumnType("varchar(45)") + .HasMaxLength(45); - b.Property("Process").HasColumnName("process").HasColumnType("varchar(45)").HasMaxLength(45); + b.Property("Process") + .HasColumnName("process") + + .HasColumnType("varchar(45)") + .HasMaxLength(45); - b.Property("ProcessNm").HasColumnName("process_nm"); + b.Property("ProcessNm") + .HasColumnName("process_nm"); - b.Property("Transistors").HasColumnName("transistors").HasColumnType("bigint(20)"); + b.Property("Transistors") + .HasColumnName("transistors") + .HasColumnType("bigint(20)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CompanyId").HasName("idx_gpus_company"); + b.HasIndex("CompanyId") + .Ha + mpany"); - b.HasIndex("DieSize").HasName("idx_gpus_die_size"); + b.HasIndex("DieSize") + .HasName("idx_gpus_die_size"); - b.HasIndex("Introduced").HasName("idx_gpus_introduced"); + b + ced") + .HasName("idx_gpus_introduced"); - b.HasIndex("ModelCode").HasName("idx_gpus_model_code"); + b.HasIndex("ModelCode") + .HasName("idx_gpus_model_code"); - b.HasIndex("Name").HasName("idx_gpus_name"); + b.HasIndex("Name") + .HasName("idx_gpus_name"); - b.HasIndex("Package").HasName("idx_gpus_package"); + b.HasIndex("Package") + .HasName("idx_gpus_package"); - b.HasIndex("Process").HasName("idx_gpus_process"); + b.HasIndex("Process") + .HasName("idx_gpus_process"); - b.HasIndex("ProcessNm").HasName("idx_gpus_process_nm"); + b.HasIndex("ProcessNm") + .HasName("idx_gpus_process_nm"); - b.HasIndex("Transistors").HasName("idx_gpus_transistors"); + b.HasIndex("Transistors") + .HasName("idx_gpus_transistors"); - b.ToTable("gpus"); - }); + b.ToTable("gpus"); + }); modelBuilder.Entity("Cicm.Database.Models.GpusByMachine", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("bigint(20)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("i + .HasColumnType("bigint(20)"); - b.Property("GpuId").HasColumnName("gpu").HasColumnType("int(11)"); + b.Property("GpuId") + .HasColumnName("gpu") + .HasColumnType("int(11)"); - b.Property("MachineId").HasColumnName("machine").HasColumnType("int(11)"); + b.Property("MachineId") + .HasColumnName("machine") + .HasColumnType("int(11)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GpuId").HasName("idx_gpus_by_machine_gpus"); + b.HasIndex("GpuId") + .HasName("idx_gpus_by_machine_gpus"); - b.HasIndex("MachineId").HasName("idx_gpus_by_machine_machine"); + b.HasIndex("MachineId") + .HasName("idx_gpus_by_machine_machine"); - b.ToTable("gpus_by_machine"); - }); + b.ToTable("gpus_by_machine"); + }); modelBuilder.Entity("Cicm.Database.Models.InstructionSet", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + + .HasColumnName("id") + .HasColumnType("int(11)"); - b.Property("Name").IsRequired().HasColumnName("instruction_set").HasColumnType("varchar(45)") - .HasMaxLength(45); + b.Property("Name") + + + .HasColumnName("instruction_set") + .HasColumnType("varchar(45)") + .HasMaxLength(45); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("instruction_sets"); - }); + b.ToTable("instruction_sets"); + }); modelBuilder.Entity("Cicm.Database.Models.InstructionSetExtension", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); - b.Property("Extension").IsRequired().HasColumnName("extension").HasColumnType("varchar(45)") - .HasMaxLength(45); + b.Property("Extension") + .IsRequired() + .HasColumnName("extension") + .HasColumnType("varchar(45)") + .HasMaxLength(45); - b.HasKey("Id"); + + b.ToTable("instruction_set_extensions"); + }); - b.ToTable("instruction_set_extensions"); - }); + modelBuilder.Entity("Cicm.Database.Models.InstructionSetE + or", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); - modelBuilder.Entity("Cicm.Database.Models.InstructionSetExtensionsByProcessor", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + b.Property("ProcessorId") + .HasColumnName("processor_id") + .HasColumnType("int(11)"); - b.Property("ProcessorId").HasColumnName("processor_id").HasColumnType("int(11)"); + b.Property("ExtensionId") + .HasColumnName("extension_id") + .HasColumnType("int(11)"); - b.Property("ExtensionId").HasColumnName("extension_id").HasColumnType("int(11)"); + b.HasKey("Id", "ProcessorId", "ExtensionId"); - b.HasKey("Id", "ProcessorId", "ExtensionId"); + b.Ha + d") + .HasName("idx_setextension_extension"); - b.HasIndex("ExtensionId").HasName("idx_setextension_extension"); + b.HasIndex("ProcessorId") + .HasName("idx_setextension_processor"); - b.HasIndex("ProcessorId").HasName("idx_setextension_processor"); - - b.ToTable("instruction_set_extensions_by_processor"); - }); + b.ToTable("instruction_set_exten + "); + }); modelBuilder.Entity("Cicm.Database.Models.Iso31661Numeric", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("smallint(3)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("smallint(3)"); - b.Property("Name").IsRequired().HasColumnName("name").HasColumnType("varchar(64)") - .HasMaxLength(64); + b.Property("Name") + .IsRequired() + .HasColumnName("name") + .HasColumnType("varchar(64)") + .HasMaxLength(64); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Name").HasName("idx_name"); + b.HasInd + .HasName("idx_name"); - b.ToTable("iso3166_1_numeric"); - }); + b.ToTable("iso3166_1_numeric"); + }); - modelBuilder.Entity("Cicm.Database.Models.Log", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + modelBuilder + base.Models.Log", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + + HasColumnName("id") + .HasColumnType("int(11)"); - b.Property("Browser").IsRequired().ValueGeneratedOnAdd().HasColumnName("browser") - .HasColumnType("char(128)").HasDefaultValueSql("''"); + b.Property("Browser") + + ed() + .ValueGeneratedOnAdd() + .HasColumnName("browser") + .HasColumnT + .HasDefaultValueSql("''"); - b.Property("Date").IsRequired().ValueGeneratedOnAdd().HasColumnName("date") - .HasColumnType("char(20)").HasDefaultValueSql("''"); + b.Property("Date") + .IsReq + .ValueGeneratedOnAdd() + .HasColumnName("date") + .HasColumnType("char(20)") + .HasDef + ; - b.Property("Ip").IsRequired().ValueGeneratedOnAdd().HasColumnName("ip") - .HasColumnType("char(16)").HasDefaultValueSql("''"); + b.Property("Ip") + .IsRequired() + .ValueGeneratedOnAdd() + + .HasColumnName("ip") + .HasColumnType("char(16)") + .HasDefaultValueSql("''"); - b.Property("Referer").IsRequired().ValueGeneratedOnAdd().HasColumnName("referer") - .HasColumnType("char(255)").HasDefaultValueSql("''"); + + ring>("Referer") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("r + .HasColumnType("char(255)") + .HasDefaultValueSql("''"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Browser").HasName("idx_log_browser"); + + rowser") + .HasName("idx_log_browser"); - b.HasIndex("Date").HasName("idx_log_date"); + b.HasIndex("Date") + .HasName("idx_log_dat + b.HasIndex("Ip") + .HasName("idx_log_ip"); - b.HasIndex("Ip").HasName("idx_log_ip"); + b.HasIndex("Referer") + + _log_referer"); - b.HasIndex("Referer").HasName("idx_log_referer"); + b.ToTable("log"); + }); - b.ToTable("log"); - }); + modelBuilder.Entity("Cicm.Database.Models. + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + + ("int(11)"); - modelBuilder.Entity("Cicm.Database.Models.Machine", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + b.Property("CompanyId") + .ValueGeneratedOnAdd() + .HasC + ") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("CompanyId").ValueGeneratedOnAdd().HasColumnName("company").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property< + .HasColumnName("family") + .HasColumnType("int(11)"); - b.Property("FamilyId").HasColumnName("family").HasColumnType("int(11)"); + b.Property("Introduced") + .HasColumnName("introduced") + .HasColumnType("datetime"); - b.Property("Introduced").HasColumnName("introduced").HasColumnType("datetime"); + b.Property("Model") + .HasColumnName("model") + .HasColumnType("varchar(50)") + .HasMaxLength(50); - b.Property("Model").HasColumnName("model").HasColumnType("varchar(50)").HasMaxLength(50); + b.Property("Name") + .IsRequired() + .HasColumnName("name") + .HasColumnType("varchar(255)") + .HasMaxLength(255); - b.Property("Name").IsRequired().HasColumnName("name").HasColumnType("varchar(255)") - .HasMaxLength(255); + b.Property("Type") + .ValueGeneratedOnAdd() + .HasColumnName("type") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Type").ValueGeneratedOnAdd().HasColumnName("type").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.HasKey("Id"); - b.HasKey("Id"); + b.HasIndex("CompanyId") + .HasName("idx_machines_company"); - b.HasIndex("CompanyId").HasName("idx_machines_company"); + b.HasIndex("FamilyId") + .HasName("idx_machines_family"); - b.HasIndex("FamilyId").HasName("idx_machines_family"); + b.HasIndex("Introduced") + .HasName("idx_machines_introduced"); - b.HasIndex("Introduced").HasName("idx_machines_introduced"); + b.HasIndex("Model") + .HasName("idx_machines_model"); - b.HasIndex("Model").HasName("idx_machines_model"); + b.HasIndex("Name") + .HasName("idx_machines_name"); - b.HasIndex("Name").HasName("idx_machines_name"); + b.HasIndex("Type") + .HasName("idx_machines_type"); - b.HasIndex("Type").HasName("idx_machines_type"); + b.ToTable("machines"); + }); - b.ToTable("machines"); - }); + modelBuilder.Entity("Cicm.Database.Models.Machine + { + b.Property("Id") + .ValueGeneratedOnAdd() + . + ) + .HasColumnType("int(11)"); - modelBuilder.Entity("Cicm.Database.Models.MachineFamily", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + b.Property("CompanyId") + .HasColumnName("company") + + ColumnType("int(11)"); - b.Property("CompanyId").HasColumnName("company").HasColumnType("int(11)"); + b.Property("Name") + .IsRequired() + .HasColumn + .HasColumnType("varchar(255)") + .HasMaxLength(255); - b.Property("Name").IsRequired().HasColumnName("name").HasColumnType("varchar(255)") - .HasMaxLength(255); + b.HasKey("Id"); - b.HasKey("Id"); + + dex("CompanyId") + .HasName("idx_machine_families_company"); - b.HasIndex("CompanyId").HasName("idx_machine_families_company"); + b.HasIndex("Name") + + idx_machine_families_name"); - b.HasIndex("Name").HasName("idx_machine_families_name"); + b.ToTable("machine_families"); + }); - b.ToTable("machine_families"); - }); + modelBuilder.Entity("Cicm.Database.Models.MachinePhoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Author"); + + b.Property("CameraManufacturer"); + + b.Property("CameraModel"); + + b.Property("ColorSpace"); + + b.Property("Comments"); + + b.Property("Contrast"); + + b.Property("CreationDate"); + + b.Property("DigitalZoomRatio"); + + b.Property("ExifVersion"); + + b.Property("Exposure"); + + b.Property("ExposureMethod"); + + b.Property("ExposureProgram"); + + b.Property("Flash"); + + b.Property("Focal"); + + b.Property("FocalLength"); + + b.Property("FocalLengthEquivalent"); + + b.Property("HorizontalResolution"); + + b.Property("IsoRating"); + + b.Property("Lens"); + + b.Property("License"); + + b.Property("LightSource"); + + b.Property("MachineId"); + + b.Property("MeteringMode"); + + b.Property("Orientation"); + + b.Property("PixelComposition"); + + b.Property("Saturation"); + + b.Property("SceneCaptureType"); + + b.Property("SceneControl"); + + b.Property("SensingMethod"); + + b.Property("Sharpness"); + + b.Property("SoftwareUsed"); + + b.Property("SubjectDistanceRange"); + + b.Property("UploadDate") + + cyToken() + .ValueGeneratedOnAddOrUpdate(); + + b.Property("UserId"); + + + b.Property("VerticalResolution"); + + b.Property("WhiteBalance"); + + b.HasKey("Id"); + + b.HasIndex("Author"); + + b.HasIndex("CameraManufacturer"); + + b.HasIndex("CameraModel"); + + b.HasIndex("ColorSpace"); + + b.HasIndex("Comments"); + + b.HasIndex("Contrast"); + + b.HasIndex("CreationDate"); + + b.HasIndex("DigitalZoomRatio"); + + b.HasIndex("ExifVersion"); + + b.HasIndex("Exposure"); + + b.HasIndex("ExposureMethod"); + + b.HasIndex("ExposureProgram"); + + b.HasIndex("Flash"); + + b.HasIndex("Focal"); + + b.HasIndex("FocalLength"); + + b.HasIndex("FocalLengthEquivalent"); + + b.HasIndex("HorizontalResolution"); + + b.HasIndex("IsoRating"); + + b.HasIndex("Lens"); + + b.HasIndex("License"); + + b.HasIndex("LightSource"); + + b.HasIndex("MachineId"); + + b.HasIndex("MeteringMode"); + + b.HasIndex("Orientation"); + + b.HasIndex("PixelComposition"); + + b.HasIndex("Saturation"); + + b.HasIndex("SceneCaptureType"); + + b.HasIndex("SceneControl"); + + b.HasIndex("SensingMethod"); + + b.HasIndex("Sharpness"); + + b.HasIndex("SoftwareUsed"); + + b.HasIndex("SubjectDistanceRange"); + + b.HasIndex("UploadDate"); + + b.HasIndex("UserId"); + + b.HasIndex("VerticalResolution"); + + b.HasIndex("WhiteBalance"); + + b.ToTable("MachinePhotos"); + }); modelBuilder.Entity("Cicm.Database.Models.MemoryByMachine", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("bigint(20)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); - b.Property("MachineId").HasColumnName("machine").HasColumnType("int(11)"); + b.Property("MachineId") + .HasColumnName("machine") + .HasColumnType("int(11)"); - b.Property("Size").HasColumnName("size").HasColumnType("bigint(20)"); + b.Property("Size") + .HasColumnName("size") + .HasColumnType("bigint(20)"); - b.Property("Speed").HasColumnName("speed"); + b.Property("Speed") + .HasColumnName("speed"); - b.Property("Type").ValueGeneratedOnAdd().HasColumnName("type").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Type") + .ValueGeneratedOnAdd() + .HasColumnName("type") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Usage").ValueGeneratedOnAdd().HasColumnName("usage").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Usage") + .ValueGeneratedOnAdd() + .HasColumnName("usage") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("MachineId").HasName("idx_memory_by_machine_machine"); + b.HasIndex("MachineId") + .HasName("idx_memory_by_machine_machine"); - b.HasIndex("Size").HasName("idx_memory_by_machine_size"); + b.HasIndex("Size") + .HasName("idx_memory_by_machine_size"); - b.HasIndex("Speed").HasName("idx_memory_by_machine_speed"); + b.HasIndex("Speed") + .HasName("idx_memory_by_machine_speed"); - b.HasIndex("Type").HasName("idx_memory_by_machine_type"); + b.HasIndex("Type") + .HasName("idx_memory_by_machine_type"); - b.HasIndex("Usage").HasName("idx_memory_by_machine_usage"); + b.HasIndex("Usage") + .HasName("idx_memory_by_machine_usage"); - b.ToTable("memory_by_machine"); - }); + b.ToTable("memory_by_machine"); + }); modelBuilder.Entity("Cicm.Database.Models.MoneyDonation", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + . + (11)"); - b.Property("Donator").IsRequired().ValueGeneratedOnAdd().HasColumnName("donator") - .HasColumnType("char(128)").HasDefaultValueSql("''"); + b.Property("Donator") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("donator") + .HasColumnType("char(128)") + .HasDefaultValueS + b.Property("Quantity") + .ValueGeneratedOnAdd() + .HasColumnName("quantity") + .HasColumnType("decimal(11,2)") + .HasDefaultValue + b.HasKey("Id"); - b.Property("Quantity").ValueGeneratedOnAdd().HasColumnName("quantity") - .HasColumnType("decimal(11,2)").HasDefaultValueSql("'0.00'"); + b.HasIndex("Donator") + .HasName("idx_money_donations_donator"); - b.HasKey("Id"); + b.HasIndex("Quantity") + .HasName("idx_money_donations_quantity"); - b.HasIndex("Donator").HasName("idx_money_donations_donator"); - - b.HasIndex("Quantity").HasName("idx_money_donations_quantity"); - - b.ToTable("money_donations"); - }); + b.ToTable("money_donations"); + }); modelBuilder.Entity("Cicm.Database.Models.News", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); - b.Property("AddedId").ValueGeneratedOnAdd().HasColumnName("added_id").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + + AddedId") + .ValueGeneratedOnAdd() + .HasColumnName("added_id") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Date").HasColumnName("date").HasColumnType("datetime"); + b.Property("Date") + .HasColumnName("date") + .HasColumnType("datetime"); - b.Property("Type").ValueGeneratedOnAdd().HasColumnName("type").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Type") + .ValueGeneratedOnAdd() + .HasColumnName("type") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AddedId").HasName("idx_news_ip"); + b.HasIndex("AddedId") + .HasName("idx_news_ip"); - b.HasIndex("Date").HasName("idx_news_date"); + b.HasIndex("Date") + .HasName("idx_news_date"); - b.HasIndex("Type").HasName("idx_news_type"); + b.HasIndex("Type") + .HasName("idx_news_type"); - b.ToTable("news"); - }); + b.ToTable("news"); + }); modelBuilder.Entity("Cicm.Database.Models.OwnedComputer", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); - b.Property("Boxed").ValueGeneratedOnAdd().HasColumnName("boxed").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Boxed") + .ValueGeneratedOnAdd() + .HasColumnName("boxed") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Cap1").ValueGeneratedOnAdd().HasColumnName("cap1").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Cap1") + .ValueGeneratedOnAdd() + .HasColumnName("cap1") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Cap2").ValueGeneratedOnAdd().HasColumnName("cap2").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Cap2") + .ValueGeneratedOnAdd() + .HasColumnName("cap2") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Cpu1").ValueGeneratedOnAdd().HasColumnName("cpu1").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Cpu1") + .ValueGeneratedOnAdd() + .HasColumnName("cpu1") + + lumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Cpu2").ValueGeneratedOnAdd().HasColumnName("cpu2").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Cpu2") + + .ValueGeneratedOnAdd() + .HasColumnName("cpu2") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Date").IsRequired().ValueGeneratedOnAdd().HasColumnName("date") - .HasColumnType("varchar(20)").HasDefaultValueSql("''"); + b.Property("Date") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("date") + .HasColumnType("varchar(20)") + .HasDefaultValueSql("''"); - b.Property("DbId").ValueGeneratedOnAdd().HasColumnName("db_id").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("DbId") + .ValueGeneratedOnAdd() + .HasColumnName("db_id") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Disk1").ValueGeneratedOnAdd().HasColumnName("disk1").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Disk1") + .ValueGeneratedOnAdd() + .HasColumnName("disk1") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Disk2").ValueGeneratedOnAdd().HasColumnName("disk2").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Disk2") + .ValueGeneratedOnAdd() + .HasColumnName("disk2") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Manuals").ValueGeneratedOnAdd().HasColumnName("manuals").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Manuals") + .ValueGeneratedOnAdd() + .HasColumnName("manuals") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Mhz1").ValueGeneratedOnAdd().HasColumnName("mhz1").HasColumnType("decimal(10,0)") - .HasDefaultValueSql("'0'"); + b.Property("Mhz1") + .ValueGeneratedOnAdd() + .HasColumnName("mhz1") + .HasColumnType("decimal(10,0)") + .HasDefaultValueSql("'0'"); - b.Property("Mhz2").ValueGeneratedOnAdd().HasColumnName("mhz2").HasColumnType("decimal(10,0)") - .HasDefaultValueSql("'0'"); + b.Property("Mhz2") + + neratedOnAdd() + .HasColumnName("mhz2") + .HasColumnType("decimal(10,0)") + .HasDefaultValueSql("'0'"); - b.Property("Ram").ValueGeneratedOnAdd().HasColumnName("ram").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Ram") + + dOnAdd() + .HasColumnName("ram") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Rigid").IsRequired().ValueGeneratedOnAdd().HasColumnName("rigid") - .HasColumnType("varchar(64)").HasDefaultValueSql("''"); + b.Property("Rigid") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("rigid") + .HasColumnType("varchar(64)") + .HasDefaultValueSql("''"); - b.Property("Status").ValueGeneratedOnAdd().HasColumnName("status").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnName("status") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Trade").ValueGeneratedOnAdd().HasColumnName("trade").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Trade") + .ValueGeneratedOnAdd() + .HasColumnName("trade") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Vram").ValueGeneratedOnAdd().HasColumnName("vram").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Vram") + .ValueGeneratedOnAdd() + .HasColumnName("vram") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Boxed").HasName("idx_owned_computers_boxed"); + b.HasIndex("Boxed") + .HasName("idx_owned_computers_boxed"); - b.HasIndex("Cap1").HasName("idx_owned_computers_cap1"); + b.HasIndex("Cap1") + .HasName("idx_owned_computers_cap1"); - b.HasIndex("Cap2").HasName("idx_owned_computers_cap2"); + b.HasIndex("Cap2") + .HasName("idx_owned_computers_cap2"); - b.HasIndex("Cpu1").HasName("idx_owned_computers_cpu1"); + b.HasIndex("Cpu1") + .HasName("idx_owned_computers_cpu1"); - b.HasIndex("Cpu2").HasName("idx_owned_computers_cpu2"); + b.HasIndex("Cpu2") + .HasName("idx_owned_computers_cpu2"); - b.HasIndex("Date").HasName("idx_owned_computers_date"); + b.HasIndex("Date") + .HasName("idx_owned_computers_date"); - b.HasIndex("DbId").HasName("idx_owned_computers_db_id"); + b.HasIndex("DbId") + .HasName("idx_owned_computers_db_id"); - b.HasIndex("Disk1").HasName("idx_owned_computers_disk1"); + b.HasIndex("Disk1") + .HasName("idx_owned_computers_disk1"); - b.HasIndex("Disk2").HasName("idx_owned_computers_disk2"); + b.HasIndex("Disk2") + .HasName("idx_owned_computers_disk2"); - b.HasIndex("Manuals").HasName("idx_owned_computers_manuals"); + b.HasIndex("Manuals") + .HasName("idx_owned_computers_manuals"); - b.HasIndex("Mhz1").HasName("idx_owned_computers_mhz1"); + b.HasIndex("Mhz1") + .HasName("idx_owned_computers_mhz1"); - b.HasIndex("Mhz2").HasName("idx_owned_computers_mhz2"); + b.HasIndex("Mhz2") + .HasName("idx_owned_computers_mhz2"); - b.HasIndex("Ram").HasName("idx_owned_computers_ram"); + b.HasIndex("Ram") + .HasName("idx_owned_computers_ram"); - b.HasIndex("Rigid").HasName("idx_owned_computers_rigid"); + b.HasIndex("Rigid") + .HasName("idx_owned_computers_rigid"); - b.HasIndex("Status").HasName("idx_owned_computers_status"); + b.HasIndex("Status") + .HasName("idx_owned_computers_status"); - b.HasIndex("Trade").HasName("idx_owned_computers_trade"); + b.HasIndex("Trade") + .HasName("idx_owned_computers_trade"); - b.HasIndex("Vram").HasName("idx_owned_computers_vram"); + b.HasIndex("Vram") + .HasName("idx_owned_computers_vram"); - b.ToTable("owned_computers"); - }); + b.ToTable("owned_computers"); + }); modelBuilder.Entity("Cicm.Database.Models.OwnedConsole", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); - - b.Property("Boxed").ValueGeneratedOnAdd().HasColumnName("boxed").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); - - b.Property("Date").IsRequired().ValueGeneratedOnAdd().HasColumnName("date") - .HasColumnType("char(20)").HasDefaultValueSql("''"); - - b.Property("DbId").ValueGeneratedOnAdd().HasColumnName("db_id").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); - - b.Property("Manuals").ValueGeneratedOnAdd().HasColumnName("manuals").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); - - b.Property("Status").ValueGeneratedOnAdd().HasColumnName("status").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); - - b.Property("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("Cicm.Database.Models.Processor", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); - - b.Property("AddrBus").HasColumnName("addr_bus").HasColumnType("int(11)"); - - b.Property("CompanyId").HasColumnName("company").HasColumnType("int(11)"); - - b.Property("Cores").HasColumnName("cores").HasColumnType("int(11)"); - - b.Property("DataBus").HasColumnName("data_bus").HasColumnType("int(11)"); - - b.Property("DieSize").HasColumnName("die_size"); - - b.Property("FprSize").HasColumnName("FPR_size").HasColumnType("int(11)"); - - b.Property("Fprs").HasColumnName("FPRs").HasColumnType("int(11)"); - - b.Property("GprSize").HasColumnName("GPR_size").HasColumnType("int(11)"); - - b.Property("Gprs").HasColumnName("GPRs").HasColumnType("int(11)"); - - b.Property("InstructionSetId").HasColumnName("instruction_set").HasColumnType("int(11)"); - - b.Property("Introduced").HasColumnName("introduced").HasColumnType("datetime"); - - b.Property("L1Data").HasColumnName("L1_data"); - - b.Property("L1Instruction").HasColumnName("L1_instruction"); - - b.Property("L2"); - - b.Property("L3"); - - b.Property("ModelCode").HasColumnName("model_code").HasColumnType("varchar(45)") - .HasMaxLength(45); - - b.Property("Name").IsRequired().ValueGeneratedOnAdd().HasColumnName("name") - .HasColumnType("char(50)").HasDefaultValueSql("''").HasMaxLength(50); - - b.Property("Package").HasColumnName("package").HasColumnType("varchar(45)").HasMaxLength(45); - - b.Property("Process").HasColumnName("process").HasColumnType("varchar(45)").HasMaxLength(45); - - b.Property("ProcessNm").HasColumnName("process_nm"); - - b.Property("SimdRegisters").HasColumnName("SIMD_registers").HasColumnType("int(11)"); - - b.Property("SimdSize").HasColumnName("SIMD_size").HasColumnType("int(11)"); - - b.Property("Speed").HasColumnName("speed"); - - b.Property("ThreadsPerCore").HasColumnName("threads_per_core").HasColumnType("int(11)"); - - b.Property("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("Cicm.Database.Models.ProcessorsByMachine", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("bigint(20)"); - - b.Property("MachineId").HasColumnName("machine").HasColumnType("int(11)"); - - b.Property("ProcessorId").HasColumnName("processor").HasColumnType("int(11)"); - - b.Property("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"); - }); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Boxed") + .ValueGeneratedOnAdd() + .HasColumnName("boxed") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Date") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("date") + .HasColumnType("char(20)") + .HasDefaultValueSql("''"); + + b.Property("DbId") + .ValueGeneratedOnAdd() + .HasColumnName("db_id") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Manuals") + .ValueGeneratedOnAdd() + .HasColumnName("manuals") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnName("status") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Trade") + .ValueGeneratedOnAdd() + .HasColumn + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.HasKey("Id"); + + b.HasIndex("Boxed" + .HasName("idx_owned_consoles_boxed"); + + b.HasIndex("Date") + .HasName("idx_owned_consoles_date"); + + + + c + b.HasIndex("Manuals") + .HasName("idx_owned_consoles_ + ndex("Status") + .HasName("idx_owned_co + b.HasIndex("Trade") + .HasName("idx_owned_con + b + + er.Entity("Cicm.Database.Models.Processor", b => + { + + ) + .ValueGeneratedOnAdd() + .H + .HasColumnType("int(11)"); + + b.Prop + + " + ype("int(11)"); + + b.Property("CompanyId") + + "company") + .HasColumnType("int(11)"); + + + >("Cores") + .HasColumnName("cores") + .HasColumnType("int(11)"); + + b.Property("DataBus") + .HasColumnName("dat + .HasColumnType("int(11)"); + + b.Property("DieSize") + .HasColumnName("die_size"); + + b.Property("FprSize" + .HasColumnName("FPR_size") + .HasColumnType("int(11)"); + + b.Property("Fprs") + .HasColumnName("FPRs") + .HasColumnType("int(11)"); + + b.Property("GprSize") + + ame("GPR_size") + .HasColumnType("int(11)"); + + + rty("Gprs") + .HasColumnName("GPRs") + .HasColumnType("int(11)"); + + b.Property("Ins + .HasColumnName("instruction_set") + .HasColumnType("int(11)"); + + b.Property("Introduced") + .HasColumnName("introduced") + .HasColumnType("datetime"); + + b.P + 1Data") + .HasColumnName("L1_data"); + + b.Property("L1Instruction") + .HasColumnName("L1_inst + b.Property("L2"); + + b.Property("L3"); + + b.Property(" + . + + char(45)") + .HasMaxLength(45); + + b.Pr + .IsRequired() + .ValueGeneratedOnAdd() + + ") + .HasCol + .HasDefaultValueSql("''") + .HasMaxLength(5 + ty("Process") + .HasColumnName(" + ColumnType("varchar(45)") + + ; + + b.Property("ProcessNm") + .HasColumnName("process_nm"); + + b.Property("SimdRegisters") + .HasColumnName("SIM + .HasColumnType("int(11)"); + + b.Property("SimdSize") + .HasColumnName("SIMD_size") + + .HasColumnType("int(11)"); + + b.Property("Speed") + .HasColumnName("speed"); + + b.Property("ThreadsPerCore") + .HasColumnName("threads_per_core") + .HasColumnType("int(11)"); + + + >("Transistors") + .HasColumnName("transistors") + .HasColumnType("bigint(20)"); + + b.HasKey("Id"); + + b.HasIndex + .HasName("idx_processors_addr_bus"); + + b.HasInde + .HasName("idx_processors_company"); + + b.HasIndex("Cores") + .HasName("idx_processors_cores"); + + b.HasIndex("DataBus") + .HasName("idx_processors_data_bu + b.HasIndex("DieSize") + .HasName("idx_processors_die_size"); + + b.HasIndex("FprSize") + .HasName("idx_processors_FP + b.HasIndex("Fprs") + .HasName("idx_processors_FPR + b.HasIndex("GprSize") + .HasName("idx_processors_GPR_size"); + + b.HasIndex("Gprs") + .HasName("idx_processors_GPRs"); + + b.HasIndex("InstructionSetId") + + ("idx_processors_instruction_set"); + + b.HasIndex("Introduced") + .HasName("idx_processors_introduced"); + + b.HasIndex("L1Data" + .HasName("idx_processors_L1_data"); + + b.HasIndex("L1Inst + .HasName("idx_processors_L1_instruction"); + + b.HasIndex("L2") + + + + + ) + x_processors_L3"); + + b.HasIndex("ModelCode") + + model_code"); + + b.HasIndex("Name") + + e"); + + b.HasIndex("Package") + .HasN + + s + idx_processors_process"); + + b.HasIndex("ProcessNm") + + processors_process_nm"); + + b.HasIndex("SimdRegisters") + + essors_SIMD_registers"); + + + ) + .HasName("idx_processors_SIMD_size"); + + b.HasIndex + .Ha + + PerCore") + .HasName("idx_processors_thread + asIndex("Transistors") + .HasName("i + b.ToTable("processors"); + }); + + modelBuilder.Entity( + yMac + + ) + .ValueGeneratedOnAdd() + + .HasColumnType("bigint(20)"); + + + d") + .HasColumnName("machine") + .HasColumnType("i + Prop + + sor") + .HasColumnType("int(11)"); + + + ") + .HasColumnName("speed"); + + + b.HasIndex("MachineId") + .HasName("idx_processors_by_machine_machine"); + + b.HasIndex("ProcessorId") + .HasName("idx_processors_by_machin + b.HasIndex("Speed") + .HasName("idx_processors_by_machine_speed"); + + b.ToTable("pr + e"); + }); modelBuilder.Entity("Cicm.Database.Models.Resolution", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + { + b.Prop + + + .HasColumnType("int(11)"); - b.Property("Chars").ValueGeneratedOnAdd().HasColumnName("chars").HasColumnType("tinyint(1)") - .HasDefaultValueSql("'0'"); + + .ValueGeneratedOnAdd() + + .HasColumnType("tinyint(1)") + + .HasDefaultValueSql("'0'"); - b.Property("Colors").HasColumnName("colors").HasColumnType("bigint(20)"); + b.Property("Colors") + .HasColumnName("colors") + .HasColumnType("bigint(20)"); - b.Property("Grayscale"); + b.Property("Grayscale"); - b.Property("Height").ValueGeneratedOnAdd().HasColumnName("height").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Height") + .ValueGeneratedOnAdd() + .HasColumnName("height") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("Palette").HasColumnName("palette").HasColumnType("bigint(20)"); + b.Property("Palette") + .HasColumnName("palette") + .HasColumnType("bigint(20)"); - b.Property("Width").ValueGeneratedOnAdd().HasColumnName("width").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Width") + .ValueGeneratedOnAdd() + .HasColumnName("width") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Colors").HasName("idx_resolutions_colors"); + b.HasIndex("Colors") + .HasName("idx_resolutions_colors"); - b.HasIndex("Height").HasName("idx_resolutions_height"); + b.HasIndex("Height") + .HasName("idx_resolutions_height"); - b.HasIndex("Palette").HasName("idx_resolutions_palette"); + b.HasIndex("Palette") + .HasName("idx_resolutions_palette"); - b.HasIndex("Width").HasName("idx_resolutions_width"); + b.HasIndex("Width") + .HasName("idx_resolutions_width"); - b.HasIndex("Width", "Height").HasName("idx_resolutions_resolution"); + b.HasIndex("Width", "Height") + .HasName("idx_resolutions_resolution"); - b.HasIndex("Width", "Height", "Colors").HasName("idx_resolutions_resolution_with_color"); + 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.HasIndex("Width", "Height", "Colors", "Palette") + .HasName("idx_resolutions_resolution_with_color_and_palette"); - b.ToTable("resolutions"); - }); + b.ToTable("resolutions"); + }); modelBuilder.Entity("Cicm.Database.Models.ResolutionsByGpu", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("bigint(20)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); - b.Property("GpuId").HasColumnName("gpu").HasColumnType("int(11)"); + b.Property("GpuId") + .HasColumnName("gpu") + .HasColumnType("int(11)"); - b.Property("ResolutionId").HasColumnName("resolution").HasColumnType("int(11)"); + b.Property("ResolutionId") + .HasColumnName("resolution") + .HasColumnType("int(11)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GpuId").HasName("idx_resolutions_by_gpu_gpu"); + b.HasIndex("GpuId") + .HasName("idx_resolutions_by_gpu_gpu"); - b.HasIndex("ResolutionId").HasName("idx_resolutions_by_gpu_resolution"); + b.HasIndex("ResolutionId") + .HasName("idx_resolutions_by_gpu_resolution"); - b.ToTable("resolutions_by_gpu"); - }); + b.ToTable("resolutions_by_gpu"); + }); modelBuilder.Entity("Cicm.Database.Models.SoundByMachine", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("bigint(20)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); - b.Property("MachineId").HasColumnName("machine").HasColumnType("int(11)"); + b.Property("MachineId") + .HasColumnName("machine") + .HasColumnType("int(11)"); - b.Property("SoundSynthId").HasColumnName("sound_synth").HasColumnType("int(11)"); + b.Property("SoundSynthId") + .HasColumnName("sound_synth") + .HasColumnType("int(11)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("MachineId").HasName("idx_sound_by_machine_machine"); + b.HasIndex("MachineId") + .HasName("idx_sound_by_machine_machine"); - b.HasIndex("SoundSynthId").HasName("idx_sound_by_machine_sound_synth"); + b.HasIndex("SoundSynthId") + .HasName("idx_sound_by_machine_sound_synth"); - b.ToTable("sound_by_machine"); - }); + b.ToTable("sound_by_machine"); + }); modelBuilder.Entity("Cicm.Database.Models.SoundSynth", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); - b.Property("CompanyId").HasColumnName("company").HasColumnType("int(11)"); + b.Property("CompanyId") + .HasColumnName("company") + .HasColumnType("int(11)"); - b.Property("Depth").HasColumnName("depth").HasColumnType("int(11)"); + b.Property("Depth") + .HasColumnName("depth") + .HasColumnType("int(11)"); - b.Property("Frequency").HasColumnName("frequency"); + b.Property("Frequency") + .HasColumnName("frequency"); - b.Property("Introduced").HasColumnName("introduced").HasColumnType("datetime"); + b.Property("Introduced") + .HasColumnName("introduced") + .HasColumnType("datetime"); - b.Property("ModelCode").HasColumnName("model_code").HasColumnType("varchar(45)") - .HasMaxLength(45); + b.Property("ModelCode") + .HasColumnName("model_code") + .HasColumnType("varchar(45)") + .HasMaxLength(45); - b.Property("Name").IsRequired().ValueGeneratedOnAdd().HasColumnName("name") - .HasColumnType("char(50)").HasDefaultValueSql("''").HasMaxLength(50); + b.Property("Name") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("name") + .HasColumnType("char(50)") + .HasDefaultValueSql("''") + .HasMaxLength(50); - b.Property("SquareWave").HasColumnName("square_wave").HasColumnType("int(11)"); + b.Property("SquareWave") + .HasColumnName("square_wave") + .HasColumnType("int(11)"); - b.Property("Type").HasColumnName("type").HasColumnType("int(11)"); + b.Property("Type") + .HasColumnName("type") + .HasColumnType("int(11)"); - b.Property("Voices").HasColumnName("voices").HasColumnType("int(11)"); + b.Property("Voices") + .HasColumnName("voices") + .HasColumnType("int(11)"); - b.Property("WhiteNoise").HasColumnName("white_noise").HasColumnType("int(11)"); + b.Property("WhiteNoise") + .HasColumnName("white_noise") + .HasColumnType("int(11)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CompanyId").HasName("idx_sound_synths_company"); + b.HasIndex("CompanyId") + .HasName("idx_sound_synths_company"); - b.HasIndex("Depth").HasName("idx_sound_synths_depth"); + b.HasIndex("Depth") + .HasName("idx_sound_synths_depth"); - b.HasIndex("Frequency").HasName("idx_sound_synths_frequency"); + b.HasIndex("Frequency") + .HasName("idx_sound_synths_frequency"); - b.HasIndex("Introduced").HasName("idx_sound_synths_introduced"); + b.HasIndex("Introduced") + .HasName("idx_sound_synths_introduced"); - b.HasIndex("ModelCode").HasName("idx_sound_synths_model_code"); + b.HasIndex("ModelCode") + .HasName("idx_sound_synths_model_code"); - b.HasIndex("Name").HasName("idx_sound_synths_name"); + b.HasIndex("Name") + .HasName("idx_sound_synths_name"); - b.HasIndex("SquareWave").HasName("idx_sound_synths_square_wave"); + b.HasIndex("SquareWave") + .HasName("idx_sound_synths_square_wave"); - b.HasIndex("Type").HasName("idx_sound_synths_type"); + b.HasIndex("Type") + .HasName("idx_sound_synths_type"); - b.HasIndex("Voices").HasName("idx_sound_synths_voices"); + b.HasIndex("Voices") + .HasName("idx_sound_synths_voices"); - b.HasIndex("WhiteNoise").HasName("idx_sound_synths_white_noise"); + b.HasIndex("WhiteNoise") + .HasName("idx_sound_synths_white_noise"); - b.ToTable("sound_synths"); - }); + b.ToTable("sound_synths"); + }); modelBuilder.Entity("Cicm.Database.Models.StorageByMachine", b => - { - b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("bigint(20)"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); - b.Property("Capacity").HasColumnName("capacity").HasColumnType("bigint(20)"); + b.Property("Capacity") + .HasColumnName("capacity") + .HasColumnType("bigint(20)"); - b.Property("Interface").ValueGeneratedOnAdd().HasColumnName("interface").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Interface") + .ValueGeneratedOnAdd() + .HasColumnName("interface") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.Property("MachineId").HasColumnName("machine").HasColumnType("int(11)"); + b.Property("MachineId") + .HasColumnName("machine") + .HasColumnType("int(11)"); - b.Property("Type").ValueGeneratedOnAdd().HasColumnName("type").HasColumnType("int(11)") - .HasDefaultValueSql("'0'"); + b.Property("Type") + .ValueGeneratedOnAdd() + .HasColumnName("type") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Capacity").HasName("idx_storage_capacity"); + b.HasIndex("Capacity") + .HasName("idx_storage_capacity"); - b.HasIndex("Interface").HasName("idx_storage_interface"); + b.HasIndex("Interface") + .HasName("idx_storage_interface"); - b.HasIndex("MachineId").HasName("idx_storage_machine"); + b.HasIndex("MachineId") + .HasName("idx_storage_machine"); - b.HasIndex("Type").HasName("idx_storage_type"); + b.HasIndex("Type") + .HasName("idx_storage_type"); - b.ToTable("storage_by_machine"); - }); + b.ToTable("storage_by_machine"); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => - { - b.Property("Id").ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("ConcurrencyStamp").IsConcurrencyToken(); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); - b.Property("Name").HasMaxLength(256); + b.Property("Name") + .HasMaxLength(256); - b.Property("NormalizedName").HasMaxLength(256); + b.Property("NormalizedName") + .HasMaxLength(256); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("NormalizedName").IsUnique().HasName("RoleNameIndex"); + b.HasIndex("NormalizedName") + .IsUnique() + .HasName("RoleNameIndex"); - b.ToTable("AspNetRoles"); - }); + b.ToTable("AspNetRoles"); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id").ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("ClaimType"); + b.Property("ClaimType"); - b.Property("ClaimValue"); + b.Property("ClaimValue"); - b.Property("RoleId").IsRequired(); + b.Property("RoleId") + .IsRequired(); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("RoleId"); + b.HasIndex("RoleId"); - b.ToTable("AspNetRoleClaims"); - }); + b.ToTable("AspNetRoleClaims"); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => - { - b.Property("Id").ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("AccessFailedCount"); + b.Property("AccessFailedCount"); - b.Property("ConcurrencyStamp").IsConcurrencyToken(); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); - b.Property("Email").HasMaxLength(256); + b.Property("Discriminator") + .IsRequired(); - b.Property("EmailConfirmed"); + b.Property("Email") + .HasMaxLength(256); - b.Property("LockoutEnabled"); + b.Property("EmailConfirmed"); - b.Property("LockoutEnd"); + b.Property("LockoutEnabled"); - b.Property("NormalizedEmail").HasMaxLength(256); + b.Property("LockoutEnd"); - b.Property("NormalizedUserName").HasMaxLength(256); + b.Property("NormalizedEmail") + .HasMaxLength(256); - b.Property("PasswordHash"); + b.Property("NormalizedUserName") + .HasMaxLength(256); - b.Property("PhoneNumber"); + b.Property("PasswordHash"); - b.Property("PhoneNumberConfirmed"); + b.Property("PhoneNumber"); - b.Property("SecurityStamp"); + b.Property("PhoneNumberConfirmed"); - b.Property("TwoFactorEnabled"); + b.Property("SecurityStamp"); - b.Property("UserName").HasMaxLength(256); + b.Property("TwoFactorEnabled"); - b.HasKey("Id"); + b.Property("UserName") + .HasMaxLength(256); - b.HasIndex("NormalizedEmail").HasName("EmailIndex"); + b.HasKey("Id"); - b.HasIndex("NormalizedUserName").IsUnique().HasName("UserNameIndex"); + b.HasIndex("NormalizedEmail") + .HasName("EmailIndex"); - b.ToTable("AspNetUsers"); - }); + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasName("UserNameIndex"); + + b.ToTable("AspNetUsers"); + + b.HasDiscriminator("Discriminator").HasValue("IdentityUser"); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id").ValueGeneratedOnAdd(); + { + b.Property("Id") + .ValueGeneratedOnAdd(); - b.Property("ClaimType"); + b.Property("ClaimType"); - b.Property("ClaimValue"); + b.Property("ClaimValue"); - b.Property("UserId").IsRequired(); + b.Property("UserId") + .IsRequired(); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("AspNetUserClaims"); - }); + b.ToTable("AspNetUserClaims"); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider").HasMaxLength(128); + { + b.Property("LoginProvider") + .HasMaxLength(128); - b.Property("ProviderKey").HasMaxLength(128); + b.Property("ProviderKey") + .HasMaxLength(128); - b.Property("ProviderDisplayName"); + b.Property("ProviderDisplayName"); - b.Property("UserId").IsRequired(); + b.Property("UserId") + .IsRequired(); - b.HasKey("LoginProvider", "ProviderKey"); + b.HasKey("LoginProvider", "ProviderKey"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.ToTable("AspNetUserLogins"); - }); + b.ToTable("AspNetUserLogins"); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId"); + { + b.Property("UserId"); - b.Property("RoleId"); + b.Property("RoleId"); - b.HasKey("UserId", "RoleId"); + b.HasKey("UserId", "RoleId"); - b.HasIndex("RoleId"); + b.HasIndex("RoleId"); - b.ToTable("AspNetUserRoles"); - }); + b.ToTable("AspNetUserRoles"); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId"); + { + b.Property("UserId"); - b.Property("LoginProvider").HasMaxLength(128); + b.Property("LoginProvider") + .HasMaxLength(128); - b.Property("Name").HasMaxLength(128); + b.Property("Name") + .HasMaxLength(128); - b.Property("Value"); + b.Property("Value"); - b.HasKey("UserId", "LoginProvider", "Name"); + b.HasKey("UserId", "LoginProvider", "Name"); - b.ToTable("AspNetUserTokens"); - }); + b.ToTable("AspNetUserTokens"); + }); + + modelBuilder.Entity("Cicm.Database.Models.ApplicationUser", b => + { + b.HasBaseType("Microsoft.AspNetCore.Identity.IdentityUser"); + + b.HasDiscriminator().HasValue("ApplicationUser"); + }); modelBuilder.Entity("Cicm.Database.Models.Company", b => - { - b.HasOne("Cicm.Database.Models.Iso31661Numeric", "Country").WithMany("Companies") - .HasForeignKey("CountryId").HasConstraintName("fk_companies_country"); + { + b.HasOne("Cicm.Database.Models.Iso31661Numeric", "Country") + .WithMany("Companies") + .HasForeignKey("CountryId") + .HasConstraintName("fk_companies_country"); - b.HasOne("Cicm.Database.Models.Company", "SoldTo").WithMany("InverseSoldToNavigation") - .HasForeignKey("SoldToId").HasConstraintName("fk_companies_sold_to"); - }); + b.HasOne("Cicm.Database.Models.Company", "SoldTo") + .WithMany("InverseSoldToNavigation") + .HasForeignKey("SoldToId") + .HasConstraintName("fk_companies_sold_to"); + }); - modelBuilder.Entity("Cicm.Database.Models.CompanyDescription", - b => - { - b.HasOne("Cicm.Database.Models.Company", "Company").WithMany("Descriptions") - .HasForeignKey("CompanyId").OnDelete(DeleteBehavior.Cascade); - }); + modelBuilder.Entity("Cicm.Database.Models.CompanyDescription", b => + { + b.HasOne("Cicm.Database.Models.Company", "Company") + .WithMany("Descriptions") + .HasForeignKey("CompanyId") + .OnDelete(DeleteBehavior.Cascade); + }); - modelBuilder.Entity("Cicm.Database.Models.CompanyLogo", - b => - { - b.HasOne("Cicm.Database.Models.Company", "Company").WithMany("Logos") - .HasForeignKey("CompanyId").HasConstraintName("fk_company_logos_company1"); - }); + modelBuilder.Entity("Cicm.Database.Models.CompanyLogo", b => + { + b.HasOne("Cicm.Database.Models.Company", "Company") + .WithMany("Logos") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_company_logos_company1"); + }); - modelBuilder.Entity("Cicm.Database.Models.Gpu", - b => - { - b.HasOne("Cicm.Database.Models.Company", "Company").WithMany("Gpus") - .HasForeignKey("CompanyId").HasConstraintName("fk_gpus_company"); - }); + modelBuilder.Entity("Cicm.Database.Models.Gpu", b => + { + b.HasOne("Cicm.Database.Models.Company", "Company") + .WithMany("Gpus") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_gpus_company"); + }); modelBuilder.Entity("Cicm.Database.Models.GpusByMachine", b => - { - b.HasOne("Cicm.Database.Models.Gpu", "Gpu").WithMany("GpusByMachine").HasForeignKey("GpuId") - .HasConstraintName("fk_gpus_by_machine_gpu").OnDelete(DeleteBehavior.Cascade); + { + b.HasOne("Cicm.Database.Models.Gpu", "Gpu") + .WithMany("GpusByMachine") + .HasForeignKey("GpuId") + .HasConstraintName("fk_gpus_by_machine_gpu") + .OnDelete(DeleteBehavior.Cascade); - b.HasOne("Cicm.Database.Models.Machine", "Machine").WithMany("Gpus").HasForeignKey("MachineId") - .HasConstraintName("fk_gpus_by_machine_machine").OnDelete(DeleteBehavior.Cascade); - }); + b.HasOne("Cicm.Database.Models.Machine", "Machine") + .WithMany("Gpus") + .HasForeignKey("MachineId") + .HasConstraintName("fk_gpus_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("Cicm.Database.Models.InstructionSetExtensionsByProcessor", b => - { - b.HasOne("Cicm.Database.Models.InstructionSetExtension", "Extension") - .WithMany("InstructionSetExtensionsByProcessor").HasForeignKey("ExtensionId") - .HasConstraintName("fk_extension_extension_id"); + { + b.HasOne("Cicm.Database.Models.InstructionSetExtension", "Extension") + .WithMany("InstructionSetExtensionsByProcessor") + .HasForeignKey("ExtensionId") + .HasConstraintName("fk_extension_extension_id"); - b.HasOne("Cicm.Database.Models.Processor", "Processor").WithMany("InstructionSetExtensions") - .HasForeignKey("ProcessorId").HasConstraintName("fk_extension_processor_id"); - }); + b.HasOne("Cicm.Database.Models.Processor", "Processor") + .WithMany("InstructionSetExtensions") + .HasForeignKey("ProcessorId") + .HasConstraintName("fk_extension_processor_id"); + }); modelBuilder.Entity("Cicm.Database.Models.Machine", b => - { - b.HasOne("Cicm.Database.Models.Company", "Company").WithMany("Machines").HasForeignKey("CompanyId") - .HasConstraintName("fk_machines_company"); + { + b.HasOne("Cicm.Database.Models.Company", "Company") + .WithMany("Machines") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_machines_company"); - b.HasOne("Cicm.Database.Models.MachineFamily", "Family").WithMany("Machines").HasForeignKey("FamilyId") - .HasConstraintName("fk_machines_family"); - }); + b.HasOne("Cicm.Database.Models.MachineFamily", "Family") + .WithMany("Machines") + .HasForeignKey("FamilyId") + .HasConstraintName("fk_machines_family"); + }); - modelBuilder.Entity("Cicm.Database.Models.MachineFamily", - b => - { - b.HasOne("Cicm.Database.Models.Company", "Company").WithMany("MachineFamilies") - .HasForeignKey("CompanyId").HasConstraintName("fk_machine_families_company") - .OnDelete(DeleteBehavior.Cascade); - }); + modelBuilder.Entity("Cicm.Database.Models.MachineFamily", b => + { + b.HasOne("Cicm.Database.Models.Company", "Company") + .WithMany("MachineFamilies") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_machine_families_company") + .OnDelete(DeleteBehavior.Cascade); + }); - modelBuilder.Entity("Cicm.Database.Models.MemoryByMachine", - b => - { - b.HasOne("Cicm.Database.Models.Machine", "Machine").WithMany("Memory") - .HasForeignKey("MachineId").HasConstraintName("fk_memory_by_machine_machine") - .OnDelete(DeleteBehavior.Cascade); - }); + modelBuilder.Entity("Cicm.Database.Models.MachinePhoto", b => + { + b.HasOne("Cicm.Database.Models.Machine", "Machine") + .WithMany("Photos") + .HasForeignKey("MachineId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("Cicm.Database.Models.ApplicationUser", "User") + .WithMany("Photos") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + }); + + modelBuilder.Entity("Cicm.Database.Models.MemoryByMachine", b => + { + b.HasOne("Cicm.Database.Models.Machine", "Machine") + .WithMany("Memory") + .HasForeignKey("MachineId") + .HasConstraintName("fk_memory_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("Cicm.Database.Models.Processor", b => - { - b.HasOne("Cicm.Database.Models.Company", "Company").WithMany("Processors").HasForeignKey("CompanyId") - .HasConstraintName("fk_processors_company"); + { + b.HasOne("Cicm.Database.Models.Company", "Company") + .WithMany("Processors") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_processors_company"); - b.HasOne("Cicm.Database.Models.InstructionSet", "InstructionSet").WithMany("Processors") - .HasForeignKey("InstructionSetId").HasConstraintName("fk_processors_instruction_set"); - }); + b.HasOne("Cicm.Database.Models.InstructionSet", "InstructionSet") + .WithMany("Processors") + .HasForeignKey("InstructionSetId") + .HasConstraintName("fk_processors_instruction_set"); + }); modelBuilder.Entity("Cicm.Database.Models.ProcessorsByMachine", b => - { - b.HasOne("Cicm.Database.Models.Machine", "Machine").WithMany("Processors").HasForeignKey("MachineId") - .HasConstraintName("fk_processors_by_machine_machine").OnDelete(DeleteBehavior.Cascade); + { + b.HasOne("Cicm.Database.Models.Machine", "Machine") + .WithMany("Processors") + .HasForeignKey("MachineId") + .HasConstraintName("fk_processors_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade); - b.HasOne("Cicm.Database.Models.Processor", "Processor").WithMany("ProcessorsByMachine") - .HasForeignKey("ProcessorId").HasConstraintName("fk_processors_by_machine_processor") - .OnDelete(DeleteBehavior.Cascade); - }); + b.HasOne("Cicm.Database.Models.Processor", "Processor") + .WithMany("ProcessorsByMachine") + .HasForeignKey("ProcessorId") + .HasConstraintName("fk_processors_by_machine_processor") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("Cicm.Database.Models.ResolutionsByGpu", b => - { - b.HasOne("Cicm.Database.Models.Gpu", "Gpu").WithMany("ResolutionsByGpu").HasForeignKey("GpuId") - .HasConstraintName("fk_resolutions_by_gpu_gpu").OnDelete(DeleteBehavior.Cascade); + { + b.HasOne("Cicm.Database.Models.Gpu", "Gpu") + .WithMany("ResolutionsByGpu") + .HasForeignKey("GpuId") + .HasConstraintName("fk_resolutions_by_gpu_gpu") + .OnDelete(DeleteBehavior.Cascade); - b.HasOne("Cicm.Database.Models.Resolution", "Resolution").WithMany("ResolutionsByGpu") - .HasForeignKey("ResolutionId").HasConstraintName("fk_resolutions_by_gpu_resolution") - .OnDelete(DeleteBehavior.Cascade); - }); + b.HasOne("Cicm.Database.Models.Resolution", "Resolution") + .WithMany("ResolutionsByGpu") + .HasForeignKey("ResolutionId") + .HasConstraintName("fk_resolutions_by_gpu_resolution") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("Cicm.Database.Models.SoundByMachine", b => - { - b.HasOne("Cicm.Database.Models.Machine", "Machine").WithMany("Sound").HasForeignKey("MachineId") - .HasConstraintName("fk_sound_by_machine_machine").OnDelete(DeleteBehavior.Cascade); + { + b.HasOne("Cicm.Database.Models.Machine", "Machine") + .WithMany("Sound") + .HasForeignKey("MachineId") + .HasConstraintName("fk_sound_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade); - b.HasOne("Cicm.Database.Models.SoundSynth", "SoundSynth").WithMany("SoundByMachine") - .HasForeignKey("SoundSynthId").HasConstraintName("fk_sound_by_machine_sound_synth") - .OnDelete(DeleteBehavior.Cascade); - }); + b.HasOne("Cicm.Database.Models.SoundSynth", "SoundSynth") + .WithMany("SoundByMachine") + .HasForeignKey("SoundSynthId") + .HasConstraintName("fk_sound_by_machine_sound_synth") + .OnDelete(DeleteBehavior.Cascade); + }); - modelBuilder.Entity("Cicm.Database.Models.SoundSynth", - b => - { - b.HasOne("Cicm.Database.Models.Company", "Company").WithMany("SoundSynths") - .HasForeignKey("CompanyId").HasConstraintName("fk_sound_synths_company"); - }); + modelBuilder.Entity("Cicm.Database.Models.SoundSynth", b => + { + b.HasOne("Cicm.Database.Models.Company", "Company") + .WithMany("SoundSynths") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_sound_synths_company"); + }); - modelBuilder.Entity("Cicm.Database.Models.StorageByMachine", - b => - { - b.HasOne("Cicm.Database.Models.Machine", "Machine").WithMany("Storage") - .HasForeignKey("MachineId").HasConstraintName("fk_storage_by_machine_machine") - .OnDelete(DeleteBehavior.Cascade); - }); + modelBuilder.Entity("Cicm.Database.Models.StorageByMachine", b => + { + b.HasOne("Cicm.Database.Models.Machine", "Machine") + .WithMany("Storage") + .HasForeignKey("MachineId") + .HasConstraintName("fk_storage_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade); + }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", - b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole").WithMany() - .HasForeignKey("RoleId").OnDelete(DeleteBehavior.Cascade); - }); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole") + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade); + }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", - b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser").WithMany() - .HasForeignKey("UserId").OnDelete(DeleteBehavior.Cascade); - }); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", - b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser").WithMany() - .HasForeignKey("UserId").OnDelete(DeleteBehavior.Cascade); - }); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole").WithMany().HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole") + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade); - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser").WithMany().HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", - b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser").WithMany() - .HasForeignKey("UserId").OnDelete(DeleteBehavior.Cascade); - }); - #pragma warning restore 612, 618 + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); +#pragma warning restore 612, 618 } } -} \ No newline at end of file +} diff --git a/Cicm.Database/Models/ApplicationUser.cs b/Cicm.Database/Models/ApplicationUser.cs index 8b4b4599..f00bcde0 100644 --- a/Cicm.Database/Models/ApplicationUser.cs +++ b/Cicm.Database/Models/ApplicationUser.cs @@ -1,6 +1,10 @@ +using System.Collections.Generic; using Microsoft.AspNetCore.Identity; namespace Cicm.Database.Models { - public class ApplicationUser : IdentityUser { } + public class ApplicationUser : IdentityUser + { + public virtual ICollection Photos { get; set; } + } } \ No newline at end of file diff --git a/Cicm.Database/Models/Machine.cs b/Cicm.Database/Models/Machine.cs index 20352d06..dc7256af 100644 --- a/Cicm.Database/Models/Machine.cs +++ b/Cicm.Database/Models/Machine.cs @@ -68,6 +68,7 @@ namespace Cicm.Database.Models public virtual ICollection Processors { get; set; } public virtual ICollection Sound { get; set; } public virtual ICollection Storage { get; set; } + public virtual ICollection Photos { get; set; } [NotMapped] [DisplayName("Introduced")] diff --git a/Cicm.Database/Models/MachinePhoto.cs b/Cicm.Database/Models/MachinePhoto.cs new file mode 100644 index 00000000..f4564a68 --- /dev/null +++ b/Cicm.Database/Models/MachinePhoto.cs @@ -0,0 +1,74 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace Cicm.Database.Models +{ + public class MachinePhoto : BaseModel + { + public string Author { get; set; } + [DisplayName("Camera manufacturer")] + public string CameraManufacturer { get; set; } + [DisplayName("Camera model")] + public string CameraModel { get; set; } + [DisplayName("Color space")] + public string ColorSpace { get; set; } + [DisplayName("User comments")] + public string Comments { get; set; } + public string Contrast { get; set; } + [DisplayName("Date and time of digitizing")] + public DateTime? CreationDate { get; set; } + [DisplayName("Digital zoom ratio")] + public double? DigitalZoomRatio { get; set; } + [DisplayName("Exif version")] + public string ExifVersion { get; set; } + [DisplayName("Exposure time")] + public double? Exposure { get; set; } + [DisplayName("Exposure mode")] + public string ExposureMethod { get; set; } + [DisplayName("Exposure Program")] + public string ExposureProgram { get; set; } + public string Flash { get; set; } + [DisplayName("F-number")] + public int? Focal { get; set; } + [DisplayName("Lens focal length")] + public int? FocalLength { get; set; } + [DisplayName("Focal length in 35 mm film")] + public string FocalLengthEquivalent { get; set; } + [DisplayName("Horizontal resolution")] + public int? HorizontalResolution { get; set; } + [DisplayName("ISO speed rating")] + public int? IsoRating { get; set; } + [DisplayName("Lens used")] + public string Lens { get; set; } + public string License { get; set; } + [DisplayName("Light source")] + public string LightSource { get; set; } + [DisplayName("Metering mode")] + public string MeteringMode { get; set; } + public string Orientation { get; set; } + [DisplayName("Pixel composition")] + public string PixelComposition { get; set; } + public string Saturation { get; set; } + [DisplayName("Scene capture type")] + public string SceneCaptureType { get; set; } + [DisplayName("Scene control")] + public string SceneControl { get; set; } + [DisplayName("Sensing method")] + public string SensingMethod { get; set; } + public string Sharpness { get; set; } + [DisplayName("Software used")] + public string SoftwareUsed { get; set; } + [DisplayName("Subject distance range")] + public string SubjectDistanceRange { get; set; } + [Timestamp] + public DateTime UploadDate { get; set; } + [DisplayName("Vertical resolution")] + public int? VerticalResolution { get; set; } + [DisplayName("White balance")] + public string WhiteBalance { get; set; } + + public virtual ApplicationUser User { get; set; } + public virtual Machine Machine { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/cicmContext.cs b/Cicm.Database/Models/cicmContext.cs index 0e9dc6d8..4ae6ac47 100644 --- a/Cicm.Database/Models/cicmContext.cs +++ b/Cicm.Database/Models/cicmContext.cs @@ -54,6 +54,7 @@ namespace Cicm.Database.Models public virtual DbSet Log { get; set; } public virtual DbSet MachineFamilies { get; set; } public virtual DbSet Machines { get; set; } + public virtual DbSet MachinePhotos { get; set; } public virtual DbSet MemoryByMachine { get; set; } public virtual DbSet MoneyDonations { get; set; } public virtual DbSet News { get; set; } @@ -479,6 +480,81 @@ namespace Cicm.Database.Models .HasConstraintName("fk_machines_family"); }); + modelBuilder.Entity(entity => + { + entity.HasIndex(e => e.Author); + + entity.HasIndex(e => e.CameraManufacturer); + + entity.HasIndex(e => e.CameraModel); + + entity.HasIndex(e => e.ColorSpace); + + entity.HasIndex(e => e.Comments); + + entity.HasIndex(e => e.Contrast); + + entity.HasIndex(e => e.CreationDate); + + entity.HasIndex(e => e.DigitalZoomRatio); + + entity.HasIndex(e => e.ExifVersion); + + entity.HasIndex(e => e.Exposure); + + entity.HasIndex(e => e.ExposureMethod); + + entity.HasIndex(e => e.ExposureProgram); + + entity.HasIndex(e => e.Flash); + + entity.HasIndex(e => e.Focal); + + entity.HasIndex(e => e.FocalLength); + + entity.HasIndex(e => e.FocalLengthEquivalent); + + entity.HasIndex(e => e.HorizontalResolution); + + entity.HasIndex(e => e.IsoRating); + + entity.HasIndex(e => e.Lens); + + entity.HasIndex(e => e.License); + + entity.HasIndex(e => e.LightSource); + + entity.HasIndex(e => e.MeteringMode); + + entity.HasIndex(e => e.Orientation); + + entity.HasIndex(e => e.PixelComposition); + + entity.HasIndex(e => e.Saturation); + + entity.HasIndex(e => e.SceneCaptureType); + + entity.HasIndex(e => e.SceneControl); + + entity.HasIndex(e => e.SensingMethod); + + entity.HasIndex(e => e.Sharpness); + + entity.HasIndex(e => e.SoftwareUsed); + + entity.HasIndex(e => e.SubjectDistanceRange); + + entity.HasIndex(e => e.UploadDate); + + entity.HasIndex(e => e.VerticalResolution); + + entity.HasIndex(e => e.WhiteBalance); + + entity.HasOne(d => d.Machine).WithMany(p => p.Photos).OnDelete(DeleteBehavior.Cascade); + + entity.HasOne(d => d.User).WithMany(p => p.Photos).OnDelete(DeleteBehavior.SetNull); + }); + modelBuilder.Entity(entity => { entity.ToTable("memory_by_machine"); diff --git a/cicm_web/cicm_web.csproj b/cicm_web/cicm_web.csproj index 2fcccdaf..1ff4e7cc 100644 --- a/cicm_web/cicm_web.csproj +++ b/cicm_web/cicm_web.csproj @@ -2,7 +2,7 @@ netcoreapp2.2 - 3.0.99.576 + 3.0.99.577 Canary Islands Computer Museum Copyright © 2003-2018 Natalia Portillo Canary Islands Computer Museum Website