//
using System;
using Marechai.Database.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
namespace Marechai.Database.Migrations
{
[DbContext(typeof(MarechaiContext))]
internal class MarechaiContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "3.1.4").HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("Marechai.Database.Models.ApplicationRole", b =>
{
b.Property("Id").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("ConcurrencyStamp").IsConcurrencyToken().
HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property("Created").HasColumnType("datetime(6)");
b.Property("Description").HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property("Name").HasColumnType("varchar(256) CHARACTER SET utf8mb4").HasMaxLength(256);
b.Property("NormalizedName").HasColumnType("varchar(256) CHARACTER SET utf8mb4").
HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedName").IsUnique().HasName("RoleNameIndex");
b.ToTable("AspNetRoles");
});
modelBuilder.Entity("Marechai.Database.Models.ApplicationUser", b =>
{
b.Property("Id").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("AccessFailedCount").HasColumnType("int");
b.Property("ConcurrencyStamp").IsConcurrencyToken().
HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property("Email").HasColumnType("varchar(256) CHARACTER SET utf8mb4").HasMaxLength(256);
b.Property("EmailConfirmed").HasColumnType("bit(1)");
b.Property("LockoutEnabled").HasColumnType("bit(1)");
b.Property("LockoutEnd").HasColumnType("datetime(6)");
b.Property("NormalizedEmail").HasColumnType("varchar(256) CHARACTER SET utf8mb4").
HasMaxLength(256);
b.Property("NormalizedUserName").HasColumnType("varchar(256) CHARACTER SET utf8mb4").
HasMaxLength(256);
b.Property("PasswordHash").HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property("PhoneNumber").HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property("PhoneNumberConfirmed").HasColumnType("bit(1)");
b.Property("SecurityStamp").HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property("TwoFactorEnabled").HasColumnType("bit(1)");
b.Property("UserName").HasColumnType("varchar(256) CHARACTER SET utf8mb4").HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedEmail").HasName("EmailIndex");
b.HasIndex("NormalizedUserName").IsUnique().HasName("UserNameIndex");
b.ToTable("AspNetUsers");
});
modelBuilder.Entity("Marechai.Database.Models.Book", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
b.Property("CountryId").HasColumnType("smallint(3)");
b.Property("Edition").HasColumnType("int");
b.Property("Isbn").HasColumnType("varchar(13) CHARACTER SET utf8mb4").HasMaxLength(13);
b.Property("NativeTitle").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("Pages").HasColumnType("smallint");
b.Property("PreviousId").HasColumnType("bigint");
b.Property("Published").HasColumnType("datetime(6)");
b.Property("SourceId").HasColumnType("bigint");
b.Property("Synopsis").HasColumnType("longtext CHARACTER SET utf8mb4").HasMaxLength(262144);
b.Property("Title").IsRequired().HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.HasKey("Id");
b.HasIndex("CountryId");
b.HasIndex("Edition");
b.HasIndex("Isbn");
b.HasIndex("NativeTitle");
b.HasIndex("Pages");
b.HasIndex("PreviousId").IsUnique();
b.HasIndex("Published");
b.HasIndex("SourceId");
b.HasIndex("Synopsis").HasAnnotation("MySql:FullTextIndex", true);
b.HasIndex("Title");
b.ToTable("Books");
});
modelBuilder.Entity("Marechai.Database.Models.BooksByMachine", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
b.Property("BookId").HasColumnType("bigint");
b.Property("MachineId").HasColumnType("int(11)");
b.HasKey("Id");
b.HasIndex("BookId");
b.HasIndex("MachineId");
b.ToTable("BooksByMachines");
});
modelBuilder.Entity("Marechai.Database.Models.BooksByMachineFamily", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
b.Property("BookId").HasColumnType("bigint");
b.Property("MachineFamilyId").HasColumnType("int(11)");
b.HasKey("Id");
b.HasIndex("BookId");
b.HasIndex("MachineFamilyId");
b.ToTable("BooksByMachineFamilies");
});
modelBuilder.Entity("Marechai.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("Marechai.Database.Models.CompaniesByBook", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
b.Property("BookId").HasColumnType("bigint");
b.Property("CompanyId").HasColumnType("int");
b.Property("RoleId").IsRequired().HasColumnType("char(3)");
b.HasKey("Id");
b.HasIndex("BookId");
b.HasIndex("CompanyId");
b.HasIndex("RoleId");
b.ToTable("CompaniesByBooks");
});
modelBuilder.Entity("Marechai.Database.Models.CompaniesByDocument", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
b.Property("CompanyId").HasColumnType("int");
b.Property("DocumentId").HasColumnType("bigint");
b.Property("RoleId").IsRequired().HasColumnType("char(3)");
b.HasKey("Id");
b.HasIndex("CompanyId");
b.HasIndex("DocumentId");
b.HasIndex("RoleId");
b.ToTable("CompaniesByDocuments");
});
modelBuilder.Entity("Marechai.Database.Models.CompaniesByMagazine", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
b.Property("CompanyId").HasColumnType("int");
b.Property("MagazineId").HasColumnType("bigint");
b.Property("RoleId").IsRequired().HasColumnType("char(3)");
b.HasKey("Id");
b.HasIndex("CompanyId");
b.HasIndex("MagazineId");
b.HasIndex("RoleId");
b.ToTable("CompaniesByMagazines");
});
modelBuilder.Entity("Marechai.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("DocumentCompanyId").HasColumnType("int");
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("Marechai.Database.Models.CompanyDescription", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("int");
b.Property("CompanyId").HasColumnType("int(11)");
b.Property("Html").HasColumnType("longtext CHARACTER SET utf8mb4").HasMaxLength(262144);
b.Property("Text").IsRequired().HasColumnType("longtext CHARACTER SET utf8mb4").
HasMaxLength(262144);
b.HasKey("Id");
b.HasIndex("CompanyId");
b.HasIndex("Text").HasAnnotation("MySql:FullTextIndex", true);
b.ToTable("CompanyDescriptions");
});
modelBuilder.Entity("Marechai.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("Marechai.Database.Models.Document", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
b.Property("CountryId").HasColumnType("smallint(3)");
b.Property("NativeTitle").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("Published").HasColumnType("datetime(6)");
b.Property("Synopsis").HasColumnType("longtext CHARACTER SET utf8mb4").HasMaxLength(262144);
b.Property("Title").IsRequired().HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.HasKey("Id");
b.HasIndex("CountryId");
b.HasIndex("NativeTitle");
b.HasIndex("Published");
b.HasIndex("Synopsis").HasAnnotation("MySql:FullTextIndex", true);
b.HasIndex("Title");
b.ToTable("Documents");
});
modelBuilder.Entity("Marechai.Database.Models.DocumentCompany", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("int");
b.Property("CompanyId").HasColumnType("int(11)");
b.Property("Name").IsRequired().HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.HasKey("Id");
b.HasIndex("CompanyId").IsUnique();
b.HasIndex("Name");
b.ToTable("DocumentCompanies");
});
modelBuilder.Entity("Marechai.Database.Models.DocumentPerson", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("int");
b.Property("Alias").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("DisplayName").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("Name").IsRequired().HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("PersonId").HasColumnType("int");
b.Property("Surname").IsRequired().HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.HasKey("Id");
b.HasIndex("Alias");
b.HasIndex("DisplayName");
b.HasIndex("Name");
b.HasIndex("PersonId").IsUnique();
b.HasIndex("Surname");
b.ToTable("DocumentPeople");
});
modelBuilder.Entity("Marechai.Database.Models.DocumentRole", b =>
{
b.Property("Id").HasColumnType("char(3)");
b.Property("Enabled").ValueGeneratedOnAdd().HasColumnType("bit(1)").HasDefaultValue(true);
b.Property("Name").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.HasKey("Id");
b.HasIndex("Enabled");
b.HasIndex("Name");
b.ToTable("DocumentRoles");
});
modelBuilder.Entity("Marechai.Database.Models.DocumentsByMachine", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
b.Property("DocumentId").HasColumnType("bigint");
b.Property("MachineId").HasColumnType("int(11)");
b.HasKey("Id");
b.HasIndex("DocumentId");
b.HasIndex("MachineId");
b.ToTable("DocumentsByMachines");
});
modelBuilder.Entity("Marechai.Database.Models.DocumentsByMachineFamily", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
b.Property("DocumentId").HasColumnType("bigint");
b.Property("MachineFamilyId").HasColumnType("int(11)");
b.HasKey("Id");
b.HasIndex("DocumentId");
b.HasIndex("MachineFamilyId");
b.ToTable("DocumentsByMachineFamily");
});
modelBuilder.Entity("Marechai.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("Marechai.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").HasColumnType("float");
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").HasColumnType("float");
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("Marechai.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("Marechai.Database.Models.GpusByOwnedMachine", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
b.Property("GpuId").HasColumnType("int(11)");
b.Property("OwnedMachineId").HasColumnType("bigint");
b.HasKey("Id");
b.HasIndex("GpuId");
b.HasIndex("OwnedMachineId");
b.ToTable("GpusByOwnedMachine");
});
modelBuilder.Entity("Marechai.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("Marechai.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("Marechai.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("Marechai.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("Marechai.Database.Models.Iso639", b =>
{
b.Property("Id").HasColumnType("char(3)");
b.Property("Comment").HasColumnType("varchar(150)");
b.Property("Part1").HasColumnType("char(2)");
b.Property("Part2B").HasColumnType("char(3)");
b.Property("Part2T").HasColumnType("char(3)");
b.Property("ReferenceName").IsRequired().HasColumnName("Ref_Name").
HasColumnType("varchar(150)");
b.Property("Scope").IsRequired().HasColumnType("char(1)");
b.Property("Type").IsRequired().HasColumnType("char(1)");
b.HasKey("Id");
b.HasIndex("Comment");
b.HasIndex("Part1");
b.HasIndex("Part2B");
b.HasIndex("Part2T");
b.HasIndex("ReferenceName");
b.HasIndex("Scope");
b.HasIndex("Type");
b.ToTable("ISO_639-3");
});
modelBuilder.Entity("Marechai.Database.Models.License", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("int");
b.Property("FsfApproved").HasColumnType("bit(1)");
b.Property("Link").HasColumnType("varchar(512) CHARACTER SET utf8mb4").HasMaxLength(512);
b.Property("Name").IsRequired().HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("OsiApproved").HasColumnType("bit(1)");
b.Property("SPDX").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("Text").HasColumnType("longtext").HasMaxLength(131072);
b.HasKey("Id");
b.HasIndex("FsfApproved");
b.HasIndex("Name");
b.HasIndex("OsiApproved");
b.HasIndex("SPDX");
b.ToTable("Licenses");
});
modelBuilder.Entity("Marechai.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("Marechai.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("Marechai.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("Marechai.Database.Models.MachinePhoto", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("char(36)");
b.Property("Aperture").HasColumnType("double");
b.Property("Author").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("CameraManufacturer").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("CameraModel").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("ColorSpace").HasColumnType("smallint unsigned");
b.Property("Comments").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("Contrast").HasColumnType("smallint unsigned");
b.Property("CreationDate").HasColumnType("datetime(6)");
b.Property("DigitalZoomRatio").HasColumnType("double");
b.Property("ExifVersion").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("ExposureMethod").HasColumnType("smallint unsigned");
b.Property("ExposureProgram").HasColumnType("smallint unsigned");
b.Property("ExposureTime").HasColumnType("double");
b.Property("Flash").HasColumnType("smallint unsigned");
b.Property("Focal").HasColumnType("double");
b.Property("FocalLength").HasColumnType("double");
b.Property("FocalLengthEquivalent").HasColumnType("double");
b.Property("HorizontalResolution").HasColumnType("double");
b.Property("IsoRating").HasColumnType("smallint unsigned");
b.Property("Lens").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("LicenseId").HasColumnType("int");
b.Property("LightSource").HasColumnType("smallint unsigned");
b.Property("MachineId").HasColumnType("int(11)");
b.Property("MeteringMode").HasColumnType("smallint unsigned");
b.Property("Orientation").HasColumnType("smallint unsigned");
b.Property("OriginalExtension").HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property("ResolutionUnit").HasColumnType("smallint unsigned");
b.Property("Saturation").HasColumnType("smallint unsigned");
b.Property("SceneCaptureType").HasColumnType("smallint unsigned");
b.Property("SensingMethod").HasColumnType("smallint unsigned");
b.Property("Sharpness").HasColumnType("smallint unsigned");
b.Property("SoftwareUsed").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("Source").HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property("SubjectDistanceRange").HasColumnType("smallint unsigned");
b.Property("UploadDate").IsConcurrencyToken().ValueGeneratedOnAddOrUpdate().
HasColumnType("datetime(6)");
b.Property("UserId").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("VerticalResolution").HasColumnType("double");
b.Property("WhiteBalance").HasColumnType("smallint unsigned");
b.HasKey("Id");
b.HasIndex("Aperture");
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("ExposureMethod");
b.HasIndex("ExposureProgram");
b.HasIndex("ExposureTime");
b.HasIndex("Flash");
b.HasIndex("Focal");
b.HasIndex("FocalLength");
b.HasIndex("FocalLengthEquivalent");
b.HasIndex("HorizontalResolution");
b.HasIndex("IsoRating");
b.HasIndex("Lens");
b.HasIndex("LicenseId");
b.HasIndex("LightSource");
b.HasIndex("MachineId");
b.HasIndex("MeteringMode");
b.HasIndex("Orientation");
b.HasIndex("ResolutionUnit");
b.HasIndex("Saturation");
b.HasIndex("SceneCaptureType");
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("Marechai.Database.Models.Magazine", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
b.Property("CountryId").HasColumnType("smallint(3)");
b.Property("FirstPublication").HasColumnType("datetime(6)");
b.Property("Issn").HasColumnType("varchar(8) CHARACTER SET utf8mb4").HasMaxLength(8);
b.Property("NativeTitle").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("Published").HasColumnType("datetime(6)");
b.Property("Synopsis").HasColumnType("longtext CHARACTER SET utf8mb4").HasMaxLength(262144);
b.Property("Title").IsRequired().HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.HasKey("Id");
b.HasIndex("CountryId");
b.HasIndex("FirstPublication");
b.HasIndex("Issn");
b.HasIndex("NativeTitle");
b.HasIndex("Published");
b.HasIndex("Synopsis").HasAnnotation("MySql:FullTextIndex", true);
b.HasIndex("Title");
b.ToTable("Magazines");
});
modelBuilder.Entity("Marechai.Database.Models.MagazineIssue", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
b.Property("Caption").IsRequired().HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("MagazineId").HasColumnType("bigint");
b.Property("NativeCaption").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
b.Property("Pages").HasColumnType("smallint");
b.Property("ProductCode").HasColumnType("varchar(18) CHARACTER SET utf8mb4").HasMaxLength(18);
b.Property("Published").HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("Caption");
b.HasIndex("MagazineId");
b.HasIndex("NativeCaption");
b.HasIndex("Pages");
b.HasIndex("ProductCode");
b.HasIndex("Published");
b.ToTable("MagazineIssues");
});
modelBuilder.Entity("Marechai.Database.Models.MagazinesByMachine", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
b.Property("MachineId").HasColumnType("int(11)");
b.Property("MagazineId").HasColumnType("bigint");
b.HasKey("Id");
b.HasIndex("MachineId");
b.HasIndex("MagazineId");
b.ToTable("MagazinesByMachines");
});
modelBuilder.Entity("Marechai.Database.Models.MagazinesByMachineFamily", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
b.Property("MachineFamilyId").HasColumnType("int(11)");
b.Property("MagazineId").HasColumnType("bigint");
b.HasKey("Id");
b.HasIndex("MachineFamilyId");
b.HasIndex("MagazineId");
b.ToTable("MagazinesByMachinesFamilies");
});
modelBuilder.Entity("Marechai.Database.Models.MarechaiDb", 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("marechai_db");
});
modelBuilder.Entity("Marechai.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").HasColumnType("double");
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("Marechai.Database.Models.MemoryByOwnedMachine", b =>
{
b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint");
b.Property("OwnedMachineId").HasColumnType("bigint");
b.Property("Size").HasColumnType("bigint");
b.Property("Speed").HasColumnType("double");
b.Property("Type").HasColumnType("int");
b.Property("Usage").HasColumnType("int");
b.HasKey("Id");
b.HasIndex("OwnedMachineId");
b.HasIndex("Size");
b.HasIndex("Speed");
b.HasIndex("Type");
b.HasIndex("Usage");
b.ToTable("MemoryByOwnedMachine");
});
modelBuilder.Entity("Marechai.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("Marechai.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