diff --git a/Cicm.Database/Migrations/20180805214952_InitialMigration.cs b/Cicm.Database/Migrations/20180805214952_InitialMigration.cs new file mode 100644 index 00000000..6394d660 --- /dev/null +++ b/Cicm.Database/Migrations/20180805214952_InitialMigration.cs @@ -0,0 +1,953 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Cicm.Database.Migrations +{ + public partial class InitialMigration : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable("admins", + table => new + { + id = table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + user = + table.Column("char(50)", nullable: false, + defaultValueSql: "''"), + password = table.Column("char(50)", nullable: false, + defaultValueSql: "''") + }, constraints: table => { table.PrimaryKey("PK_admins", x => x.id); }); + + migrationBuilder.CreateTable("browser_tests", + table => new + { + id = + table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + user_agent = + table.Column("varchar(128)", nullable: false, + defaultValueSql: "''"), + browser = + table.Column("varchar(64)", nullable: false, + defaultValueSql: "''"), + version = + table.Column("varchar(16)", nullable: false, + defaultValueSql: "''"), + os = + table.Column("varchar(32)", nullable: false, + defaultValueSql: "''"), + platform = + table.Column("varchar(8)", nullable: false, + defaultValueSql: "''"), + gif87 = + table.Column("tinyint(1)", nullable: false, + defaultValueSql: "'0'"), + gif89 = + table.Column("tinyint(1)", nullable: false, + defaultValueSql: "'0'"), + jpeg = + table.Column("tinyint(1)", nullable: false, + defaultValueSql: "'0'"), + png = + table.Column("tinyint(1)", nullable: false, + defaultValueSql: "'0'"), + pngt = + table.Column("tinyint(1)", nullable: false, + defaultValueSql: "'0'"), + agif = + table.Column("tinyint(1)", nullable: false, + defaultValueSql: "'0'"), + table = + table.Column("tinyint(1)", nullable: false, + defaultValueSql: "'0'"), + colors = + table.Column("tinyint(1)", nullable: false, + defaultValueSql: "'0'"), + js = + table.Column("tinyint(1)", nullable: false, + defaultValueSql: "'0'"), + frames = + table.Column("tinyint(1)", nullable: false, + defaultValueSql: "'0'"), + flash = table.Column("tinyint(1)", nullable: false, + defaultValueSql: "'0'") + }, constraints: table => { table.PrimaryKey("PK_browser_tests", x => x.id); }); + + migrationBuilder.CreateTable("cicm_db", + table => new + { + id = table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + version = table.Column("int(11)", nullable: false), + updated = table.Column("datetime", nullable: true, + defaultValueSql: "'CURRENT_TIMESTAMP'") + }, constraints: table => { table.PrimaryKey("PK_cicm_db", x => x.id); }); + + migrationBuilder.CreateTable("forbidden", + table => new + { + id = + table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + browser = + table.Column("char(128)", nullable: false, + defaultValueSql: "''"), + date = + table.Column("char(20)", nullable: false, + defaultValueSql: "''"), + ip = table.Column("char(16)", nullable: false, + defaultValueSql: "''"), + referer = table.Column("char(255)", nullable: false, + defaultValueSql: "''") + }, constraints: table => { table.PrimaryKey("PK_forbidden", x => x.id); }); + + migrationBuilder.CreateTable("instruction_set_extensions", + table => new + { + id = table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + extension = table.Column("varchar(45)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_instruction_set_extensions", x => x.id); + }); + + migrationBuilder.CreateTable("instruction_sets", + table => new + { + id = table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + instruction_set = table.Column("varchar(45)", nullable: false) + }, + constraints: table => { table.PrimaryKey("PK_instruction_sets", x => x.id); }); + + migrationBuilder.CreateTable("iso3166_1_numeric", + table => new + { + id = table.Column("smallint(3)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + name = table.Column("varchar(64)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_iso3166_1_numeric", x => x.id); + }); + + migrationBuilder.CreateTable("log", + table => new + { + id = + table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + browser = + table.Column("char(128)", nullable: false, + defaultValueSql: "''"), + ip = + table.Column("char(16)", nullable: false, + defaultValueSql: "''"), + date = + table.Column("char(20)", nullable: false, + defaultValueSql: "''"), + referer = table.Column("char(255)", nullable: false, + defaultValueSql: "''") + }, constraints: table => { table.PrimaryKey("PK_log", x => x.id); }); + + migrationBuilder.CreateTable("money_donations", + table => new + { + id = table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + donator = + table.Column("char(128)", nullable: false, + defaultValueSql: "''"), + quantity = table.Column("decimal(11,2)", nullable: false, + defaultValueSql: "'0.00'") + }, + constraints: table => { table.PrimaryKey("PK_money_donations", x => x.id); }); + + migrationBuilder.CreateTable("news", + table => new + { + id = table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + date = + table.Column("char(20)", nullable: false, + defaultValueSql: "''"), + type = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + added_id = table.Column("int(11)", nullable: false, + defaultValueSql: "'0'") + }, constraints: table => { table.PrimaryKey("PK_news", x => x.id); }); + + migrationBuilder.CreateTable("owned_computers", + table => new + { + id = + table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + db_id = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + date = + table.Column("varchar(20)", nullable: false, + defaultValueSql: "''"), + status = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + trade = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + boxed = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + manuals = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + cpu1 = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + mhz1 = + table.Column("decimal(10,0)", nullable: false, + defaultValueSql: "'0'"), + cpu2 = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + mhz2 = + table.Column("decimal(10,0)", nullable: false, + defaultValueSql: "'0'"), + ram = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + vram = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + rigid = + table.Column("varchar(64)", nullable: false, + defaultValueSql: "''"), + disk1 = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + cap1 = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + disk2 = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + cap2 = table.Column("int(11)", nullable: false, + defaultValueSql: "'0'") + }, + constraints: table => { table.PrimaryKey("PK_owned_computers", x => x.id); }); + + migrationBuilder.CreateTable("owned_consoles", + table => new + { + id = + table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + db_id = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + date = + table.Column("char(20)", nullable: false, + defaultValueSql: "''"), + status = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + trade = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + boxed = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + manuals = table.Column("int(11)", nullable: false, + defaultValueSql: "'0'") + }, constraints: table => { table.PrimaryKey("PK_owned_consoles", x => x.id); }); + + migrationBuilder.CreateTable("resolutions", + table => new + { + id = + table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + width = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + height = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + colors = table.Column("bigint(20)", nullable: true), + palette = table.Column("bigint(20)", nullable: true), + chars = table.Column("tinyint(1)", nullable: false, + defaultValueSql: "'0'") + }, constraints: table => { table.PrimaryKey("PK_resolutions", x => x.id); }); + + migrationBuilder.CreateTable("companies", + table => new + { + id = + table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + name = + table.Column("varchar(128)", nullable: false, + defaultValueSql: "''"), + founded = table.Column("datetime", nullable: true), + website = table.Column("varchar(255)", nullable: true), + twitter = table.Column("varchar(45)", nullable: true), + facebook = table.Column("varchar(45)", nullable: true), + sold = table.Column("datetime", nullable: true), + sold_to = table.Column("int(11)", nullable: true), + address = table.Column("varchar(80)", nullable: true), + city = table.Column("varchar(80)", nullable: true), + province = table.Column("varchar(80)", nullable: true), + postal_code = table.Column("varchar(25)", nullable: true), + country = table.Column("smallint(3)", nullable: true), + status = table.Column("int(11)", nullable: false) + }, constraints: table => + { + table.PrimaryKey("PK_companies", x => x.id); + table.ForeignKey("fk_companies_country", x => x.country, + "iso3166_1_numeric", "id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey("fk_companies_sold_to", x => x.sold_to, "companies", "id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable("company_descriptions", + table => new + { + id = table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + company_id = table.Column("int(11)", nullable: false), + text = table.Column("text", nullable: true) + }, constraints: table => + { + table.PrimaryKey("PK_company_descriptions", x => x.id); + table.ForeignKey("fk_company_id", x => x.id, "companies", "id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable("company_logos", + table => new + { + id = table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + company_id = table.Column("int(11)", nullable: false), + year = table.Column("int(4)", nullable: true), + logo_guid = table.Column("char(36)", nullable: false) + }, constraints: table => + { + table.PrimaryKey("PK_company_logos", + x => new {x.id, x.company_id, x.logo_guid}); + table.ForeignKey("fk_company_logos_company1", x => x.company_id, + "companies", "id", onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable("gpus", + table => new + { + id = + table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + name = + table.Column("char(128)", nullable: false, + defaultValueSql: "''"), + company = table.Column("int(11)", nullable: true), + model_code = table.Column("varchar(45)", nullable: true), + introduced = table.Column("datetime", nullable: true), + package = table.Column("varchar(45)", nullable: true), + process = table.Column("varchar(45)", nullable: true), + process_nm = table.Column(nullable: true), + die_size = table.Column(nullable: true), + transistors = table.Column("bigint(20)", nullable: true) + }, constraints: table => + { + table.PrimaryKey("PK_gpus", x => x.id); + table.ForeignKey("fk_gpus_company", x => x.company, "companies", "id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable("machine_families", + table => new + { + id = table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + company = table.Column("int(11)", nullable: false), + name = table.Column("varchar(255)", nullable: false) + }, constraints: table => + { + table.PrimaryKey("PK_machine_families", x => x.id); + table.ForeignKey("fk_machine_families_company", x => x.company, + "companies", "id", onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable("processors", + table => new + { + id = + table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + name = + table.Column("char(50)", nullable: false, + defaultValueSql: "''"), + company = table.Column("int(11)", nullable: true), + model_code = table.Column("varchar(45)", nullable: true), + introduced = table.Column("datetime", nullable: true), + instruction_set = table.Column("int(11)", nullable: true), + speed = table.Column(nullable: true), + package = table.Column("varchar(45)", nullable: true), + GPRs = table.Column("int(11)", nullable: true), + GPR_size = table.Column("int(11)", nullable: true), + FPRs = table.Column("int(11)", nullable: true), + FPR_size = table.Column("int(11)", nullable: true), + cores = table.Column("int(11)", nullable: true), + threads_per_core = table.Column("int(11)", nullable: true), + process = table.Column("varchar(45)", nullable: true), + process_nm = table.Column(nullable: true), + die_size = table.Column(nullable: true), + transistors = table.Column("bigint(20)", nullable: true), + data_bus = table.Column("int(11)", nullable: true), + addr_bus = table.Column("int(11)", nullable: true), + SIMD_registers = table.Column("int(11)", nullable: true), + SIMD_size = table.Column("int(11)", nullable: true), + L1_instruction = table.Column(nullable: true), + L1_data = table.Column(nullable: true), + L2 = table.Column(nullable: true), + L3 = table.Column(nullable: true) + }, constraints: table => + { + table.PrimaryKey("PK_processors", x => x.id); + table.ForeignKey("fk_processors_company", x => x.company, "companies", + "id", onDelete: ReferentialAction.Restrict); + table.ForeignKey("fk_processors_instruction_set", x => x.instruction_set, + "instruction_sets", "id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable("sound_synths", + table => new + { + id = + table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + name = + table.Column("char(50)", nullable: false, + defaultValueSql: "''"), + company = table.Column("int(11)", nullable: true), + model_code = table.Column("varchar(45)", nullable: true), + introduced = table.Column("datetime", nullable: true), + voices = table.Column("int(11)", nullable: true), + frequency = table.Column(nullable: true), + depth = table.Column("int(11)", nullable: true), + square_wave = table.Column("int(11)", nullable: true), + white_noise = table.Column("int(11)", nullable: true), + type = table.Column("int(11)", nullable: true) + }, constraints: table => + { + table.PrimaryKey("PK_sound_synths", x => x.id); + table.ForeignKey("fk_sound_synths_company", x => x.company, "companies", + "id", onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable("resolutions_by_gpu", + table => new + { + gpu = table.Column("int(11)", nullable: false), + resolution = table.Column("int(11)", nullable: false), + id = table.Column("bigint(20)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn) + }, constraints: table => + { + table.PrimaryKey("PK_resolutions_by_gpu", x => x.id); + table.ForeignKey("fk_resolutions_by_gpu_gpu", x => x.gpu, "gpus", "id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey("fk_resolutions_by_gpu_resolution", x => x.resolution, + "resolutions", "id", onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable("machines", + table => new + { + id = + table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + company = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + name = table.Column("varchar(255)", nullable: false), + type = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + introduced = table.Column("datetime", nullable: true), + family = table.Column("int(11)", nullable: true), + model = table.Column("varchar(50)", nullable: true) + }, constraints: table => + { + table.PrimaryKey("PK_machines", x => x.id); + table.ForeignKey("fk_machines_company", x => x.company, "companies", "id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey("fk_machines_family", x => x.family, "machine_families", + "id", onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable("instruction_set_extensions_by_processor", + table => new + { + id = table.Column("int(11)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + processor_id = table.Column("int(11)", nullable: false), + extension_id = table.Column("int(11)", nullable: false) + }, constraints: table => + { + table.PrimaryKey("PK_instruction_set_extensions_by_processor", + x => new {x.id, x.processor_id, x.extension_id}); + table.ForeignKey("fk_extension_extension_id", x => x.extension_id, + "instruction_set_extensions", "id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey("fk_extension_processor_id", x => x.processor_id, + "processors", "id", onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable("gpus_by_machine", + table => new + { + gpu = table.Column("int(11)", nullable: false), + machine = table.Column("int(11)", nullable: false), + id = table.Column("bigint(20)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn) + }, constraints: table => + { + table.PrimaryKey("PK_gpus_by_machine", x => x.id); + table.ForeignKey("fk_gpus_by_machine_gpu", x => x.gpu, "gpus", "id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey("fk_gpus_by_machine_machine", x => x.machine, "machines", + "id", onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable("memory_by_machine", + table => new + { + machine = table.Column("int(11)", nullable: false), + type = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + usage = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + size = table.Column("bigint(20)", nullable: true), + speed = table.Column(nullable: true), + id = table.Column("bigint(20)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn) + }, constraints: table => + { + table.PrimaryKey("PK_memory_by_machine", x => x.id); + table.ForeignKey("fk_memory_by_machine_machine", x => x.machine, + "machines", "id", onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable("processors_by_machine", + table => new + { + processor = table.Column("int(11)", nullable: false), + machine = table.Column("int(11)", nullable: false), + speed = table.Column(nullable: true), + id = table.Column("bigint(20)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn) + }, constraints: table => + { + table.PrimaryKey("PK_processors_by_machine", x => x.id); + table.ForeignKey("fk_processors_by_machine_machine", x => x.machine, + "machines", "id", onDelete: ReferentialAction.Cascade); + table.ForeignKey("fk_processors_by_machine_processor", x => x.processor, + "processors", "id", onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable("sound_by_machine", + table => new + { + sound_synth = table.Column("int(11)", nullable: false), + machine = table.Column("int(11)", nullable: false), + id = table.Column("bigint(20)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn) + }, constraints: table => + { + table.PrimaryKey("PK_sound_by_machine", x => x.id); + table.ForeignKey("fk_sound_by_machine_machine", x => x.machine, "machines", + "id", onDelete: ReferentialAction.Cascade); + table.ForeignKey("fk_sound_by_machine_sound_synth", x => x.sound_synth, + "sound_synths", "id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable("storage_by_machine", + table => new + { + machine = table.Column("int(11)", nullable: false), + type = + table.Column("int(11)", nullable: false, defaultValueSql: "'0'"), + @interface = + table.Column(name: "interface", type: "int(11)", nullable: false, + defaultValueSql: "'0'"), + capacity = table.Column("bigint(20)", nullable: true), + id = table.Column("bigint(20)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn) + }, constraints: table => + { + table.PrimaryKey("PK_storage_by_machine", x => x.id); + table.ForeignKey("fk_storage_by_machine_machine", x => x.machine, + "machines", "id", onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex("idx_admins_user", "admins", "user"); + + migrationBuilder.CreateIndex("idx_browser_tests_browser", "browser_tests", "browser"); + + migrationBuilder.CreateIndex("idx_browser_tests_os", "browser_tests", "os"); + + migrationBuilder.CreateIndex("idx_browser_tests_platform", "browser_tests", "platform"); + + migrationBuilder.CreateIndex("idx_browser_tests_user_agent", "browser_tests", "user_agent"); + + migrationBuilder.CreateIndex("idx_browser_tests_version", "browser_tests", "version"); + + migrationBuilder.CreateIndex("idx_companies_address", "companies", "address"); + + migrationBuilder.CreateIndex("idx_companies_city", "companies", "city"); + + migrationBuilder.CreateIndex("idx_companies_country", "companies", "country"); + + migrationBuilder.CreateIndex("idx_companies_facebook", "companies", "facebook"); + + migrationBuilder.CreateIndex("idx_companies_founded", "companies", "founded"); + + migrationBuilder.CreateIndex("idx_companies_name", "companies", "name"); + + migrationBuilder.CreateIndex("idx_companies_postal_code", "companies", "postal_code"); + + migrationBuilder.CreateIndex("idx_companies_province", "companies", "province"); + + migrationBuilder.CreateIndex("idx_companies_sold", "companies", "sold"); + + migrationBuilder.CreateIndex("idx_companies_sold_to", "companies", "sold_to"); + + migrationBuilder.CreateIndex("idx_companies_status", "companies", "status"); + + migrationBuilder.CreateIndex("idx_companies_twitter", "companies", "twitter"); + + migrationBuilder.CreateIndex("idx_companies_website", "companies", "website"); + + migrationBuilder.CreateIndex("idx_company_id", "company_descriptions", "company_id"); + + migrationBuilder.CreateIndex("idx_text", "company_descriptions", "text"); + + migrationBuilder.CreateIndex("idx_company_id", "company_logos", "company_id"); + + migrationBuilder.CreateIndex("idx_id", "company_logos", "id", unique: true); + + migrationBuilder.CreateIndex("idx_guid", "company_logos", "logo_guid"); + + migrationBuilder.CreateIndex("idx_forbidden_browser", "forbidden", "browser"); + + migrationBuilder.CreateIndex("idx_forbidden_date", "forbidden", "date"); + + migrationBuilder.CreateIndex("idx_forbidden_ip", "forbidden", "ip"); + + migrationBuilder.CreateIndex("idx_forbidden_referer", "forbidden", "referer"); + + migrationBuilder.CreateIndex("idx_gpus_company", "gpus", "company"); + + migrationBuilder.CreateIndex("idx_gpus_die_size", "gpus", "die_size"); + + migrationBuilder.CreateIndex("idx_gpus_introduced", "gpus", "introduced"); + + migrationBuilder.CreateIndex("idx_gpus_model_code", "gpus", "model_code"); + + migrationBuilder.CreateIndex("idx_gpus_name", "gpus", "name"); + + migrationBuilder.CreateIndex("idx_gpus_package", "gpus", "package"); + + migrationBuilder.CreateIndex("idx_gpus_process", "gpus", "process"); + + migrationBuilder.CreateIndex("idx_gpus_process_nm", "gpus", "process_nm"); + + migrationBuilder.CreateIndex("idx_gpus_transistors", "gpus", "transistors"); + + migrationBuilder.CreateIndex("idx_gpus_by_machine_gpus", "gpus_by_machine", "gpu"); + + migrationBuilder.CreateIndex("idx_gpus_by_machine_machine", "gpus_by_machine", "machine"); + + migrationBuilder.CreateIndex("idx_setextension_extension", "instruction_set_extensions_by_processor", + "extension_id"); + + migrationBuilder.CreateIndex("idx_setextension_processor", "instruction_set_extensions_by_processor", + "processor_id"); + + migrationBuilder.CreateIndex("idx_name", "iso3166_1_numeric", "name"); + + migrationBuilder.CreateIndex("idx_log_browser", "log", "browser"); + + migrationBuilder.CreateIndex("idx_log_date", "log", "date"); + + migrationBuilder.CreateIndex("idx_log_ip", "log", "ip"); + + migrationBuilder.CreateIndex("idx_log_referer", "log", "referer"); + + migrationBuilder.CreateIndex("idx_machine_families_company", "machine_families", "company"); + + migrationBuilder.CreateIndex("idx_machine_families_name", "machine_families", "name"); + + migrationBuilder.CreateIndex("idx_machines_company", "machines", "company"); + + migrationBuilder.CreateIndex("idx_machines_family", "machines", "family"); + + migrationBuilder.CreateIndex("idx_machines_introduced", "machines", "introduced"); + + migrationBuilder.CreateIndex("idx_machines_model", "machines", "model"); + + migrationBuilder.CreateIndex("idx_machines_name", "machines", "name"); + + migrationBuilder.CreateIndex("idx_machines_type", "machines", "type"); + + migrationBuilder.CreateIndex("idx_memory_by_machine_machine", "memory_by_machine", "machine"); + + migrationBuilder.CreateIndex("idx_memory_by_machine_size", "memory_by_machine", "size"); + + migrationBuilder.CreateIndex("idx_memory_by_machine_speed", "memory_by_machine", "speed"); + + migrationBuilder.CreateIndex("idx_memory_by_machine_type", "memory_by_machine", "type"); + + migrationBuilder.CreateIndex("idx_memory_by_machine_usage", "memory_by_machine", "usage"); + + migrationBuilder.CreateIndex("idx_money_donations_donator", "money_donations", "donator"); + + migrationBuilder.CreateIndex("idx_money_donations_quantity", "money_donations", "quantity"); + + migrationBuilder.CreateIndex("idx_news_ip", "news", "added_id"); + + migrationBuilder.CreateIndex("idx_news_date", "news", "date"); + + migrationBuilder.CreateIndex("idx_news_type", "news", "type"); + + migrationBuilder.CreateIndex("idx_owned_computers_boxed", "owned_computers", "boxed"); + + migrationBuilder.CreateIndex("idx_owned_computers_cap1", "owned_computers", "cap1"); + + migrationBuilder.CreateIndex("idx_owned_computers_cap2", "owned_computers", "cap2"); + + migrationBuilder.CreateIndex("idx_owned_computers_cpu1", "owned_computers", "cpu1"); + + migrationBuilder.CreateIndex("idx_owned_computers_cpu2", "owned_computers", "cpu2"); + + migrationBuilder.CreateIndex("idx_owned_computers_date", "owned_computers", "date"); + + migrationBuilder.CreateIndex("idx_owned_computers_db_id", "owned_computers", "db_id"); + + migrationBuilder.CreateIndex("idx_owned_computers_disk1", "owned_computers", "disk1"); + + migrationBuilder.CreateIndex("idx_owned_computers_disk2", "owned_computers", "disk2"); + + migrationBuilder.CreateIndex("idx_owned_computers_manuals", "owned_computers", "manuals"); + + migrationBuilder.CreateIndex("idx_owned_computers_mhz1", "owned_computers", "mhz1"); + + migrationBuilder.CreateIndex("idx_owned_computers_mhz2", "owned_computers", "mhz2"); + + migrationBuilder.CreateIndex("idx_owned_computers_ram", "owned_computers", "ram"); + + migrationBuilder.CreateIndex("idx_owned_computers_rigid", "owned_computers", "rigid"); + + migrationBuilder.CreateIndex("idx_owned_computers_status", "owned_computers", "status"); + + migrationBuilder.CreateIndex("idx_owned_computers_trade", "owned_computers", "trade"); + + migrationBuilder.CreateIndex("idx_owned_computers_vram", "owned_computers", "vram"); + + migrationBuilder.CreateIndex("idx_owned_consoles_boxed", "owned_consoles", "boxed"); + + migrationBuilder.CreateIndex("idx_owned_consoles_date", "owned_consoles", "date"); + + migrationBuilder.CreateIndex("idx_owned_consoles_db_id", "owned_consoles", "db_id"); + + migrationBuilder.CreateIndex("idx_owned_consoles_manuals", "owned_consoles", "manuals"); + + migrationBuilder.CreateIndex("idx_owned_consoles_status", "owned_consoles", "status"); + + migrationBuilder.CreateIndex("idx_owned_consoles_trade", "owned_consoles", "trade"); + + migrationBuilder.CreateIndex("idx_processors_addr_bus", "processors", "addr_bus"); + + migrationBuilder.CreateIndex("idx_processors_company", "processors", "company"); + + migrationBuilder.CreateIndex("idx_processors_cores", "processors", "cores"); + + migrationBuilder.CreateIndex("idx_processors_data_bus", "processors", "data_bus"); + + migrationBuilder.CreateIndex("idx_processors_die_size", "processors", "die_size"); + + migrationBuilder.CreateIndex("idx_processors_FPR_size", "processors", "FPR_size"); + + migrationBuilder.CreateIndex("idx_processors_FPRs", "processors", "FPRs"); + + migrationBuilder.CreateIndex("idx_processors_GPR_size", "processors", "GPR_size"); + + migrationBuilder.CreateIndex("idx_processors_GPRs", "processors", "GPRs"); + + migrationBuilder.CreateIndex("idx_processors_instruction_set", "processors", "instruction_set"); + + migrationBuilder.CreateIndex("idx_processors_introduced", "processors", "introduced"); + + migrationBuilder.CreateIndex("idx_processors_L1_data", "processors", "L1_data"); + + migrationBuilder.CreateIndex("idx_processors_L1_instruction", "processors", "L1_instruction"); + + migrationBuilder.CreateIndex("idx_processors_L2", "processors", "L2"); + + migrationBuilder.CreateIndex("idx_processors_L3", "processors", "L3"); + + migrationBuilder.CreateIndex("idx_processors_model_code", "processors", "model_code"); + + migrationBuilder.CreateIndex("idx_processors_name", "processors", "name"); + + migrationBuilder.CreateIndex("idx_processors_package", "processors", "package"); + + migrationBuilder.CreateIndex("idx_processors_process", "processors", "process"); + + migrationBuilder.CreateIndex("idx_processors_process_nm", "processors", "process_nm"); + + migrationBuilder.CreateIndex("idx_processors_SIMD_registers", "processors", "SIMD_registers"); + + migrationBuilder.CreateIndex("idx_processors_SIMD_size", "processors", "SIMD_size"); + + migrationBuilder.CreateIndex("idx_processors_speed", "processors", "speed"); + + migrationBuilder.CreateIndex("idx_processors_threads_per_core", "processors", "threads_per_core"); + + migrationBuilder.CreateIndex("idx_processors_transistors", "processors", "transistors"); + + migrationBuilder.CreateIndex("idx_processors_by_machine_machine", "processors_by_machine", "machine"); + + migrationBuilder.CreateIndex("idx_processors_by_machine_processor", "processors_by_machine", "processor"); + + migrationBuilder.CreateIndex("idx_processors_by_machine_speed", "processors_by_machine", "speed"); + + migrationBuilder.CreateIndex("idx_resolutions_colors", "resolutions", "colors"); + + migrationBuilder.CreateIndex("idx_resolutions_height", "resolutions", "height"); + + migrationBuilder.CreateIndex("idx_resolutions_palette", "resolutions", "palette"); + + migrationBuilder.CreateIndex("idx_resolutions_width", "resolutions", "width"); + + migrationBuilder.CreateIndex("idx_resolutions_resolution", "resolutions", new[] {"width", "height"}); + + migrationBuilder.CreateIndex("idx_resolutions_resolution_with_color", "resolutions", + new[] {"width", "height", "colors"}); + + migrationBuilder.CreateIndex("idx_resolutions_resolution_with_color_and_palette", "resolutions", + new[] {"width", "height", "colors", "palette"}); + + migrationBuilder.CreateIndex("idx_resolutions_by_gpu_gpu", "resolutions_by_gpu", "gpu"); + + migrationBuilder.CreateIndex("idx_resolutions_by_gpu_resolution", "resolutions_by_gpu", "resolution"); + + migrationBuilder.CreateIndex("idx_sound_by_machine_machine", "sound_by_machine", "machine"); + + migrationBuilder.CreateIndex("idx_sound_by_machine_sound_synth", "sound_by_machine", "sound_synth"); + + migrationBuilder.CreateIndex("idx_sound_synths_company", "sound_synths", "company"); + + migrationBuilder.CreateIndex("idx_sound_synths_depth", "sound_synths", "depth"); + + migrationBuilder.CreateIndex("idx_sound_synths_frequency", "sound_synths", "frequency"); + + migrationBuilder.CreateIndex("idx_sound_synths_introduced", "sound_synths", "introduced"); + + migrationBuilder.CreateIndex("idx_sound_synths_model_code", "sound_synths", "model_code"); + + migrationBuilder.CreateIndex("idx_sound_synths_name", "sound_synths", "name"); + + migrationBuilder.CreateIndex("idx_sound_synths_square_wave", "sound_synths", "square_wave"); + + migrationBuilder.CreateIndex("idx_sound_synths_type", "sound_synths", "type"); + + migrationBuilder.CreateIndex("idx_sound_synths_voices", "sound_synths", "voices"); + + migrationBuilder.CreateIndex("idx_sound_synths_white_noise", "sound_synths", "white_noise"); + + migrationBuilder.CreateIndex("idx_storage_capacity", "storage_by_machine", "capacity"); + + migrationBuilder.CreateIndex("idx_storage_interface", "storage_by_machine", "interface"); + + migrationBuilder.CreateIndex("idx_storage_machine", "storage_by_machine", "machine"); + + migrationBuilder.CreateIndex("idx_storage_type", "storage_by_machine", "type"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable("admins"); + + migrationBuilder.DropTable("browser_tests"); + + migrationBuilder.DropTable("cicm_db"); + + migrationBuilder.DropTable("company_descriptions"); + + migrationBuilder.DropTable("company_logos"); + + migrationBuilder.DropTable("forbidden"); + + migrationBuilder.DropTable("gpus_by_machine"); + + migrationBuilder.DropTable("instruction_set_extensions_by_processor"); + + migrationBuilder.DropTable("log"); + + migrationBuilder.DropTable("memory_by_machine"); + + migrationBuilder.DropTable("money_donations"); + + migrationBuilder.DropTable("news"); + + migrationBuilder.DropTable("owned_computers"); + + migrationBuilder.DropTable("owned_consoles"); + + migrationBuilder.DropTable("processors_by_machine"); + + migrationBuilder.DropTable("resolutions_by_gpu"); + + migrationBuilder.DropTable("sound_by_machine"); + + migrationBuilder.DropTable("storage_by_machine"); + + migrationBuilder.DropTable("instruction_set_extensions"); + + migrationBuilder.DropTable("processors"); + + migrationBuilder.DropTable("gpus"); + + migrationBuilder.DropTable("resolutions"); + + migrationBuilder.DropTable("sound_synths"); + + migrationBuilder.DropTable("machines"); + + migrationBuilder.DropTable("instruction_sets"); + + migrationBuilder.DropTable("machine_families"); + + migrationBuilder.DropTable("companies"); + + migrationBuilder.DropTable("iso3166_1_numeric"); + } + } +} \ No newline at end of file diff --git a/Cicm.Database/Migrations/cicmContextModelSnapshot.cs b/Cicm.Database/Migrations/cicmContextModelSnapshot.cs new file mode 100644 index 00000000..2d37553f --- /dev/null +++ b/Cicm.Database/Migrations/cicmContextModelSnapshot.cs @@ -0,0 +1,1066 @@ +// + +using System; +using Cicm.Database.Models; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; + +namespace Cicm.Database.Migrations +{ + [DbContext(typeof(cicmContext))] + class cicmContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { + #pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "2.1.1-rtm-30846") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Cicm.Database.Models.Admins", b => + { + b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + + b.Property("Password").IsRequired().ValueGeneratedOnAdd().HasColumnName("password") + .HasColumnType("char(50)").HasDefaultValueSql("''"); + + b.Property("User").IsRequired().ValueGeneratedOnAdd().HasColumnName("user") + .HasColumnType("char(50)").HasDefaultValueSql("''"); + + b.HasKey("Id"); + + b.HasIndex("User").HasName("idx_admins_user"); + + b.ToTable("admins"); + }); + + modelBuilder.Entity("Cicm.Database.Models.BrowserTests", 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("''"); + + 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("''"); + + b.Property("Platform").IsRequired().ValueGeneratedOnAdd().HasColumnName("platform") + .HasColumnType("varchar(8)").HasDefaultValueSql("''"); + + 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("''"); + + b.Property("Version").IsRequired().ValueGeneratedOnAdd().HasColumnName("version") + .HasColumnType("varchar(16)").HasDefaultValueSql("''"); + + b.HasKey("Id"); + + b.HasIndex("Browser").HasName("idx_browser_tests_browser"); + + b.HasIndex("Os").HasName("idx_browser_tests_os"); + + b.HasIndex("Platform").HasName("idx_browser_tests_platform"); + + b.HasIndex("UserAgent").HasName("idx_browser_tests_user_agent"); + + b.HasIndex("Version").HasName("idx_browser_tests_version"); + + b.ToTable("browser_tests"); + }); + + modelBuilder.Entity("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.Companies", b => + { + b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + + b.Property("Address").HasColumnName("address").HasColumnType("varchar(80)"); + + b.Property("City").HasColumnName("city").HasColumnType("varchar(80)"); + + b.Property("Country").HasColumnName("country").HasColumnType("smallint(3)"); + + b.Property("Facebook").HasColumnName("facebook").HasColumnType("varchar(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)"); + + b.Property("Province").HasColumnName("province").HasColumnType("varchar(80)"); + + b.Property("Sold").HasColumnName("sold").HasColumnType("datetime"); + + b.Property("SoldTo").HasColumnName("sold_to").HasColumnType("int(11)"); + + b.Property("Status").HasColumnName("status").HasColumnType("int(11)"); + + b.Property("Twitter").HasColumnName("twitter").HasColumnType("varchar(45)"); + + b.Property("Website").HasColumnName("website").HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("Address").HasName("idx_companies_address"); + + b.HasIndex("City").HasName("idx_companies_city"); + + b.HasIndex("Country").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("SoldTo").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.CompanyDescriptions", b => + { + b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + + b.Property("CompanyId").HasColumnName("company_id").HasColumnType("int(11)"); + + b.Property("Text").HasColumnName("text").HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("CompanyId").HasName("idx_company_id"); + + b.HasIndex("Text").HasName("idx_text"); + + b.ToTable("company_descriptions"); + }); + + modelBuilder.Entity("Cicm.Database.Models.CompanyLogos", b => + { + b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + + b.Property("CompanyId").HasColumnName("company_id").HasColumnType("int(11)"); + + b.Property("LogoGuid").HasColumnName("logo_guid").HasColumnType("char(36)"); + + b.Property("Year").HasColumnName("year").HasColumnType("int(4)"); + + b.HasKey("Id", "CompanyId", "LogoGuid"); + + b.HasIndex("CompanyId").HasName("idx_company_id"); + + b.HasIndex("Id").IsUnique().HasName("idx_id"); + + b.HasIndex("LogoGuid").HasName("idx_guid"); + + 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.Gpus", b => + { + b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + + b.Property("Company").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)"); + + b.Property("Name").IsRequired().ValueGeneratedOnAdd().HasColumnName("name") + .HasColumnType("char(128)").HasDefaultValueSql("''"); + + b.Property("Package").HasColumnName("package").HasColumnType("varchar(45)"); + + b.Property("Process").HasColumnName("process").HasColumnType("varchar(45)"); + + b.Property("ProcessNm").HasColumnName("process_nm"); + + b.Property("Transistors").HasColumnName("transistors").HasColumnType("bigint(20)"); + + b.HasKey("Id"); + + b.HasIndex("Company").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("Gpu").HasColumnName("gpu").HasColumnType("int(11)"); + + b.Property("Machine").HasColumnName("machine").HasColumnType("int(11)"); + + b.HasKey("Id"); + + b.HasIndex("Gpu").HasName("idx_gpus_by_machine_gpus"); + + b.HasIndex("Machine").HasName("idx_gpus_by_machine_machine"); + + b.ToTable("gpus_by_machine"); + }); + + modelBuilder.Entity("Cicm.Database.Models.InstructionSetExtensions", b => + { + b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + + b.Property("Extension").IsRequired().HasColumnName("extension").HasColumnType("varchar(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.InstructionSets", b => + { + b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + + b.Property("InstructionSet").IsRequired().HasColumnName("instruction_set") + .HasColumnType("varchar(45)"); + + b.HasKey("Id"); + + b.ToTable("instruction_sets"); + }); + + 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)"); + + 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.MachineFamilies", b => + { + b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + + b.Property("Company").HasColumnName("company").HasColumnType("int(11)"); + + b.Property("Name").IsRequired().HasColumnName("name").HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("Company").HasName("idx_machine_families_company"); + + b.HasIndex("Name").HasName("idx_machine_families_name"); + + b.ToTable("machine_families"); + }); + + modelBuilder.Entity("Cicm.Database.Models.Machines", b => + { + b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + + b.Property("Company").HasColumnName("company").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + b.Property("Family").HasColumnName("family").HasColumnType("int(11)"); + + b.Property("Introduced").HasColumnName("introduced").HasColumnType("datetime"); + + b.Property("Model").HasColumnName("model").HasColumnType("varchar(50)"); + + b.Property("Name").IsRequired().HasColumnName("name").HasColumnType("varchar(255)"); + + b.Property("Type").ValueGeneratedOnAdd().HasColumnName("type").HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.HasKey("Id"); + + b.HasIndex("Company").HasName("idx_machines_company"); + + b.HasIndex("Family").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.MemoryByMachine", b => + { + b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("bigint(20)"); + + b.Property("Machine").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("Machine").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.MoneyDonations", 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").IsRequired().ValueGeneratedOnAdd().HasColumnName("date") + .HasColumnType("char(20)").HasDefaultValueSql("''"); + + 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.OwnedComputers", 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.OwnedConsoles", 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.Processors", b => + { + b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + + b.Property("AddrBus").HasColumnName("addr_bus").HasColumnType("int(11)"); + + b.Property("Company").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("InstructionSet").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)"); + + b.Property("Name").IsRequired().ValueGeneratedOnAdd().HasColumnName("name") + .HasColumnType("char(50)").HasDefaultValueSql("''"); + + b.Property("Package").HasColumnName("package").HasColumnType("varchar(45)"); + + b.Property("Process").HasColumnName("process").HasColumnType("varchar(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("Company").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("InstructionSet").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("Machine").HasColumnName("machine").HasColumnType("int(11)"); + + b.Property("Processor").HasColumnName("processor").HasColumnType("int(11)"); + + b.Property("Speed").HasColumnName("speed"); + + b.HasKey("Id"); + + b.HasIndex("Machine").HasName("idx_processors_by_machine_machine"); + + b.HasIndex("Processor").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.Resolutions", 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("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("Gpu").HasColumnName("gpu").HasColumnType("int(11)"); + + b.Property("Resolution").HasColumnName("resolution").HasColumnType("int(11)"); + + b.HasKey("Id"); + + b.HasIndex("Gpu").HasName("idx_resolutions_by_gpu_gpu"); + + b.HasIndex("Resolution").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("Machine").HasColumnName("machine").HasColumnType("int(11)"); + + b.Property("SoundSynth").HasColumnName("sound_synth").HasColumnType("int(11)"); + + b.HasKey("Id"); + + b.HasIndex("Machine").HasName("idx_sound_by_machine_machine"); + + b.HasIndex("SoundSynth").HasName("idx_sound_by_machine_sound_synth"); + + b.ToTable("sound_by_machine"); + }); + + modelBuilder.Entity("Cicm.Database.Models.SoundSynths", b => + { + b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)"); + + b.Property("Company").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)"); + + b.Property("Name").IsRequired().ValueGeneratedOnAdd().HasColumnName("name") + .HasColumnType("char(50)").HasDefaultValueSql("''"); + + 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("Company").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("Machine").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("Machine").HasName("idx_storage_machine"); + + b.HasIndex("Type").HasName("idx_storage_type"); + + b.ToTable("storage_by_machine"); + }); + + modelBuilder.Entity("Cicm.Database.Models.Companies", b => + { + b.HasOne("Cicm.Database.Models.Iso31661Numeric", "CountryNavigation").WithMany("Companies") + .HasForeignKey("Country").HasConstraintName("fk_companies_country"); + + b.HasOne("Cicm.Database.Models.Companies", "SoldToNavigation").WithMany("InverseSoldToNavigation") + .HasForeignKey("SoldTo").HasConstraintName("fk_companies_sold_to"); + }); + + modelBuilder.Entity("Cicm.Database.Models.CompanyDescriptions", + b => + { + b.HasOne("Cicm.Database.Models.Companies", "IdNavigation") + .WithOne("CompanyDescriptions") + .HasForeignKey("Cicm.Database.Models.CompanyDescriptions", "Id") + .HasConstraintName("fk_company_id").OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Cicm.Database.Models.CompanyLogos", + b => + { + b.HasOne("Cicm.Database.Models.Companies", "Company").WithMany("CompanyLogos") + .HasForeignKey("CompanyId").HasConstraintName("fk_company_logos_company1"); + }); + + modelBuilder.Entity("Cicm.Database.Models.Gpus", + b => + { + b.HasOne("Cicm.Database.Models.Companies", "CompanyNavigation").WithMany("Gpus") + .HasForeignKey("Company").HasConstraintName("fk_gpus_company"); + }); + + modelBuilder.Entity("Cicm.Database.Models.GpusByMachine", b => + { + b.HasOne("Cicm.Database.Models.Gpus", "GpuNavigation").WithMany("GpusByMachine").HasForeignKey("Gpu") + .HasConstraintName("fk_gpus_by_machine_gpu").OnDelete(DeleteBehavior.Cascade); + + b.HasOne("Cicm.Database.Models.Machines", "MachineNavigation").WithMany("GpusByMachine") + .HasForeignKey("Machine").HasConstraintName("fk_gpus_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Cicm.Database.Models.InstructionSetExtensionsByProcessor", b => + { + b.HasOne("Cicm.Database.Models.InstructionSetExtensions", "Extension") + .WithMany("InstructionSetExtensionsByProcessor").HasForeignKey("ExtensionId") + .HasConstraintName("fk_extension_extension_id"); + + b.HasOne("Cicm.Database.Models.Processors", "Processor").WithMany("InstructionSetExtensionsByProcessor") + .HasForeignKey("ProcessorId").HasConstraintName("fk_extension_processor_id"); + }); + + modelBuilder.Entity("Cicm.Database.Models.MachineFamilies", + b => + { + b.HasOne("Cicm.Database.Models.Companies", "CompanyNavigation") + .WithMany("MachineFamilies").HasForeignKey("Company") + .HasConstraintName("fk_machine_families_company").OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Cicm.Database.Models.Machines", b => + { + b.HasOne("Cicm.Database.Models.Companies", "CompanyNavigation").WithMany("Machines") + .HasForeignKey("Company").HasConstraintName("fk_machines_company"); + + b.HasOne("Cicm.Database.Models.MachineFamilies", "FamilyNavigation").WithMany("Machines") + .HasForeignKey("Family").HasConstraintName("fk_machines_family"); + }); + + modelBuilder.Entity("Cicm.Database.Models.MemoryByMachine", + b => + { + b.HasOne("Cicm.Database.Models.Machines", "MachineNavigation") + .WithMany("MemoryByMachine").HasForeignKey("Machine") + .HasConstraintName("fk_memory_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Cicm.Database.Models.Processors", b => + { + b.HasOne("Cicm.Database.Models.Companies", "CompanyNavigation").WithMany("Processors") + .HasForeignKey("Company").HasConstraintName("fk_processors_company"); + + b.HasOne("Cicm.Database.Models.InstructionSets", "InstructionSetNavigation").WithMany("Processors") + .HasForeignKey("InstructionSet").HasConstraintName("fk_processors_instruction_set"); + }); + + modelBuilder.Entity("Cicm.Database.Models.ProcessorsByMachine", b => + { + b.HasOne("Cicm.Database.Models.Machines", "MachineNavigation").WithMany("ProcessorsByMachine") + .HasForeignKey("Machine").HasConstraintName("fk_processors_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("Cicm.Database.Models.Processors", "ProcessorNavigation").WithMany("ProcessorsByMachine") + .HasForeignKey("Processor").HasConstraintName("fk_processors_by_machine_processor") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Cicm.Database.Models.ResolutionsByGpu", b => + { + b.HasOne("Cicm.Database.Models.Gpus", "GpuNavigation").WithMany("ResolutionsByGpu").HasForeignKey("Gpu") + .HasConstraintName("fk_resolutions_by_gpu_gpu").OnDelete(DeleteBehavior.Cascade); + + b.HasOne("Cicm.Database.Models.Resolutions", "ResolutionNavigation").WithMany("ResolutionsByGpu") + .HasForeignKey("Resolution").HasConstraintName("fk_resolutions_by_gpu_resolution") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Cicm.Database.Models.SoundByMachine", b => + { + b.HasOne("Cicm.Database.Models.Machines", "MachineNavigation").WithMany("SoundByMachine") + .HasForeignKey("Machine").HasConstraintName("fk_sound_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("Cicm.Database.Models.SoundSynths", "SoundSynthNavigation").WithMany("SoundByMachine") + .HasForeignKey("SoundSynth").HasConstraintName("fk_sound_by_machine_sound_synth") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Cicm.Database.Models.SoundSynths", + b => + { + b.HasOne("Cicm.Database.Models.Companies", "CompanyNavigation") + .WithMany("SoundSynths").HasForeignKey("Company") + .HasConstraintName("fk_sound_synths_company"); + }); + + modelBuilder.Entity("Cicm.Database.Models.StorageByMachine", + b => + { + b.HasOne("Cicm.Database.Models.Machines", "MachineNavigation") + .WithMany("StorageByMachine").HasForeignKey("Machine") + .HasConstraintName("fk_storage_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade); + }); + #pragma warning restore 612, 618 + } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/Admins.cs b/Cicm.Database/Models/Admins.cs new file mode 100644 index 00000000..478d1cf6 --- /dev/null +++ b/Cicm.Database/Models/Admins.cs @@ -0,0 +1,9 @@ +namespace Cicm.Database.Models +{ + public class Admins + { + public int Id { get; set; } + public string User { get; set; } + public string Password { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/BrowserTests.cs b/Cicm.Database/Models/BrowserTests.cs new file mode 100644 index 00000000..d84c4d57 --- /dev/null +++ b/Cicm.Database/Models/BrowserTests.cs @@ -0,0 +1,23 @@ +namespace Cicm.Database.Models +{ + public class BrowserTests + { + public int Id { get; set; } + public string UserAgent { get; set; } + public string Browser { get; set; } + public string Version { get; set; } + public string Os { get; set; } + public string Platform { get; set; } + public sbyte Gif87 { get; set; } + public sbyte Gif89 { get; set; } + public sbyte Jpeg { get; set; } + public sbyte Png { get; set; } + public sbyte Pngt { get; set; } + public sbyte Agif { get; set; } + public sbyte Table { get; set; } + public sbyte Colors { get; set; } + public sbyte Js { get; set; } + public sbyte Frames { get; set; } + public sbyte Flash { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/CicmDb.cs b/Cicm.Database/Models/CicmDb.cs new file mode 100644 index 00000000..e57ad631 --- /dev/null +++ b/Cicm.Database/Models/CicmDb.cs @@ -0,0 +1,11 @@ +using System; + +namespace Cicm.Database.Models +{ + public class CicmDb + { + public int Id { get; set; } + public int Version { get; set; } + public DateTime? Updated { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/Companies.cs b/Cicm.Database/Models/Companies.cs new file mode 100644 index 00000000..1c3ba7a4 --- /dev/null +++ b/Cicm.Database/Models/Companies.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; + +namespace Cicm.Database.Models +{ + public class Companies + { + public Companies() + { + CompanyLogos = new HashSet(); + Gpus = new HashSet(); + InverseSoldToNavigation = new HashSet(); + MachineFamilies = new HashSet(); + Machines = new HashSet(); + Processors = new HashSet(); + SoundSynths = new HashSet(); + } + + public int Id { get; set; } + public string Name { get; set; } + public DateTime? Founded { get; set; } + public string Website { get; set; } + public string Twitter { get; set; } + public string Facebook { get; set; } + public DateTime? Sold { get; set; } + public int? SoldTo { get; set; } + public string Address { get; set; } + public string City { get; set; } + public string Province { get; set; } + public string PostalCode { get; set; } + public short? Country { get; set; } + public int Status { get; set; } + + public Iso31661Numeric CountryNavigation { get; set; } + public Companies SoldToNavigation { get; set; } + public CompanyDescriptions CompanyDescriptions { get; set; } + public ICollection CompanyLogos { get; set; } + public ICollection Gpus { get; set; } + public ICollection InverseSoldToNavigation { get; set; } + public ICollection MachineFamilies { get; set; } + public ICollection Machines { get; set; } + public ICollection Processors { get; set; } + public ICollection SoundSynths { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/CompanyDescriptions.cs b/Cicm.Database/Models/CompanyDescriptions.cs new file mode 100644 index 00000000..ba21964c --- /dev/null +++ b/Cicm.Database/Models/CompanyDescriptions.cs @@ -0,0 +1,11 @@ +namespace Cicm.Database.Models +{ + public class CompanyDescriptions + { + public int Id { get; set; } + public int CompanyId { get; set; } + public string Text { get; set; } + + public Companies IdNavigation { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/CompanyLogos.cs b/Cicm.Database/Models/CompanyLogos.cs new file mode 100644 index 00000000..75e6b2b3 --- /dev/null +++ b/Cicm.Database/Models/CompanyLogos.cs @@ -0,0 +1,12 @@ +namespace Cicm.Database.Models +{ + public class CompanyLogos + { + public int Id { get; set; } + public int CompanyId { get; set; } + public int? Year { get; set; } + public string LogoGuid { get; set; } + + public Companies Company { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/Forbidden.cs b/Cicm.Database/Models/Forbidden.cs new file mode 100644 index 00000000..3b88b119 --- /dev/null +++ b/Cicm.Database/Models/Forbidden.cs @@ -0,0 +1,11 @@ +namespace Cicm.Database.Models +{ + public class Forbidden + { + public int Id { get; set; } + public string Browser { get; set; } + public string Date { get; set; } + public string Ip { get; set; } + public string Referer { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/Gpus.cs b/Cicm.Database/Models/Gpus.cs new file mode 100644 index 00000000..5f31b96b --- /dev/null +++ b/Cicm.Database/Models/Gpus.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; + +namespace Cicm.Database.Models +{ + public class Gpus + { + public Gpus() + { + GpusByMachine = new HashSet(); + ResolutionsByGpu = new HashSet(); + } + + public int Id { get; set; } + public string Name { get; set; } + public int? Company { get; set; } + public string ModelCode { get; set; } + public DateTime? Introduced { get; set; } + public string Package { get; set; } + public string Process { get; set; } + public float? ProcessNm { get; set; } + public float? DieSize { get; set; } + public long? Transistors { get; set; } + + public Companies CompanyNavigation { get; set; } + public ICollection GpusByMachine { get; set; } + public ICollection ResolutionsByGpu { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/GpusByMachine.cs b/Cicm.Database/Models/GpusByMachine.cs new file mode 100644 index 00000000..65d0b777 --- /dev/null +++ b/Cicm.Database/Models/GpusByMachine.cs @@ -0,0 +1,12 @@ +namespace Cicm.Database.Models +{ + public class GpusByMachine + { + public int Gpu { get; set; } + public int Machine { get; set; } + public long Id { get; set; } + + public Gpus GpuNavigation { get; set; } + public Machines MachineNavigation { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/InstructionSetExtensions.cs b/Cicm.Database/Models/InstructionSetExtensions.cs new file mode 100644 index 00000000..5929c2fe --- /dev/null +++ b/Cicm.Database/Models/InstructionSetExtensions.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; + +namespace Cicm.Database.Models +{ + public class InstructionSetExtensions + { + public InstructionSetExtensions() + { + InstructionSetExtensionsByProcessor = new HashSet(); + } + + public int Id { get; set; } + public string Extension { get; set; } + + public ICollection InstructionSetExtensionsByProcessor { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/InstructionSetExtensionsByProcessor.cs b/Cicm.Database/Models/InstructionSetExtensionsByProcessor.cs new file mode 100644 index 00000000..262c97d6 --- /dev/null +++ b/Cicm.Database/Models/InstructionSetExtensionsByProcessor.cs @@ -0,0 +1,12 @@ +namespace Cicm.Database.Models +{ + public class InstructionSetExtensionsByProcessor + { + public int Id { get; set; } + public int ProcessorId { get; set; } + public int ExtensionId { get; set; } + + public InstructionSetExtensions Extension { get; set; } + public Processors Processor { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/InstructionSets.cs b/Cicm.Database/Models/InstructionSets.cs new file mode 100644 index 00000000..056776bf --- /dev/null +++ b/Cicm.Database/Models/InstructionSets.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; + +namespace Cicm.Database.Models +{ + public class InstructionSets + { + public InstructionSets() + { + Processors = new HashSet(); + } + + public int Id { get; set; } + public string InstructionSet { get; set; } + + public ICollection Processors { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/Iso31661Numeric.cs b/Cicm.Database/Models/Iso31661Numeric.cs new file mode 100644 index 00000000..08ff270e --- /dev/null +++ b/Cicm.Database/Models/Iso31661Numeric.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; + +namespace Cicm.Database.Models +{ + public class Iso31661Numeric + { + public Iso31661Numeric() + { + Companies = new HashSet(); + } + + public short Id { get; set; } + public string Name { get; set; } + + public ICollection Companies { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/Log.cs b/Cicm.Database/Models/Log.cs new file mode 100644 index 00000000..bb16abc6 --- /dev/null +++ b/Cicm.Database/Models/Log.cs @@ -0,0 +1,11 @@ +namespace Cicm.Database.Models +{ + public class Log + { + public int Id { get; set; } + public string Browser { get; set; } + public string Ip { get; set; } + public string Date { get; set; } + public string Referer { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/MachineFamilies.cs b/Cicm.Database/Models/MachineFamilies.cs new file mode 100644 index 00000000..6fbc76ed --- /dev/null +++ b/Cicm.Database/Models/MachineFamilies.cs @@ -0,0 +1,19 @@ +using System.Collections.Generic; + +namespace Cicm.Database.Models +{ + public class MachineFamilies + { + public MachineFamilies() + { + Machines = new HashSet(); + } + + public int Id { get; set; } + public int Company { get; set; } + public string Name { get; set; } + + public Companies CompanyNavigation { get; set; } + public ICollection Machines { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/Machines.cs b/Cicm.Database/Models/Machines.cs new file mode 100644 index 00000000..a01a155e --- /dev/null +++ b/Cicm.Database/Models/Machines.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; + +namespace Cicm.Database.Models +{ + public class Machines + { + public Machines() + { + GpusByMachine = new HashSet(); + MemoryByMachine = new HashSet(); + ProcessorsByMachine = new HashSet(); + SoundByMachine = new HashSet(); + StorageByMachine = new HashSet(); + } + + public int Id { get; set; } + public int Company { get; set; } + public string Name { get; set; } + public int Type { get; set; } + public DateTime? Introduced { get; set; } + public int? Family { get; set; } + public string Model { get; set; } + + public Companies CompanyNavigation { get; set; } + public MachineFamilies FamilyNavigation { get; set; } + public ICollection GpusByMachine { get; set; } + public ICollection MemoryByMachine { get; set; } + public ICollection ProcessorsByMachine { get; set; } + public ICollection SoundByMachine { get; set; } + public ICollection StorageByMachine { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/MemoryByMachine.cs b/Cicm.Database/Models/MemoryByMachine.cs new file mode 100644 index 00000000..2ac198aa --- /dev/null +++ b/Cicm.Database/Models/MemoryByMachine.cs @@ -0,0 +1,14 @@ +namespace Cicm.Database.Models +{ + public class MemoryByMachine + { + public int Machine { get; set; } + public int Type { get; set; } + public int Usage { get; set; } + public long? Size { get; set; } + public double? Speed { get; set; } + public long Id { get; set; } + + public Machines MachineNavigation { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/MoneyDonations.cs b/Cicm.Database/Models/MoneyDonations.cs new file mode 100644 index 00000000..a19eab59 --- /dev/null +++ b/Cicm.Database/Models/MoneyDonations.cs @@ -0,0 +1,9 @@ +namespace Cicm.Database.Models +{ + public class MoneyDonations + { + public int Id { get; set; } + public string Donator { get; set; } + public decimal Quantity { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/News.cs b/Cicm.Database/Models/News.cs new file mode 100644 index 00000000..e7064576 --- /dev/null +++ b/Cicm.Database/Models/News.cs @@ -0,0 +1,10 @@ +namespace Cicm.Database.Models +{ + public class News + { + public int Id { get; set; } + public string Date { get; set; } + public int Type { get; set; } + public int AddedId { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/OwnedComputers.cs b/Cicm.Database/Models/OwnedComputers.cs new file mode 100644 index 00000000..f53680b3 --- /dev/null +++ b/Cicm.Database/Models/OwnedComputers.cs @@ -0,0 +1,24 @@ +namespace Cicm.Database.Models +{ + public class OwnedComputers + { + public int Id { get; set; } + public int DbId { get; set; } + public string Date { get; set; } + public int Status { get; set; } + public int Trade { get; set; } + public int Boxed { get; set; } + public int Manuals { get; set; } + public int Cpu1 { get; set; } + public decimal Mhz1 { get; set; } + public int Cpu2 { get; set; } + public decimal Mhz2 { get; set; } + public int Ram { get; set; } + public int Vram { get; set; } + public string Rigid { get; set; } + public int Disk1 { get; set; } + public int Cap1 { get; set; } + public int Disk2 { get; set; } + public int Cap2 { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/OwnedConsoles.cs b/Cicm.Database/Models/OwnedConsoles.cs new file mode 100644 index 00000000..262a20df --- /dev/null +++ b/Cicm.Database/Models/OwnedConsoles.cs @@ -0,0 +1,13 @@ +namespace Cicm.Database.Models +{ + public class OwnedConsoles + { + public int Id { get; set; } + public int DbId { get; set; } + public string Date { get; set; } + public int Status { get; set; } + public int Trade { get; set; } + public int Boxed { get; set; } + public int Manuals { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/Processors.cs b/Cicm.Database/Models/Processors.cs new file mode 100644 index 00000000..a84c9c6c --- /dev/null +++ b/Cicm.Database/Models/Processors.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; + +namespace Cicm.Database.Models +{ + public class Processors + { + public Processors() + { + InstructionSetExtensionsByProcessor = new HashSet(); + ProcessorsByMachine = new HashSet(); + } + + public int Id { get; set; } + public string Name { get; set; } + public int? Company { get; set; } + public string ModelCode { get; set; } + public DateTime? Introduced { get; set; } + public int? InstructionSet { get; set; } + public double? Speed { get; set; } + public string Package { get; set; } + public int? Gprs { get; set; } + public int? GprSize { get; set; } + public int? Fprs { get; set; } + public int? FprSize { get; set; } + public int? Cores { get; set; } + public int? ThreadsPerCore { get; set; } + public string Process { get; set; } + public float? ProcessNm { get; set; } + public float? DieSize { get; set; } + public long? Transistors { get; set; } + public int? DataBus { get; set; } + public int? AddrBus { get; set; } + public int? SimdRegisters { get; set; } + public int? SimdSize { get; set; } + public float? L1Instruction { get; set; } + public float? L1Data { get; set; } + public float? L2 { get; set; } + public float? L3 { get; set; } + + public Companies CompanyNavigation { get; set; } + public InstructionSets InstructionSetNavigation { get; set; } + public ICollection InstructionSetExtensionsByProcessor { get; set; } + public ICollection ProcessorsByMachine { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/ProcessorsByMachine.cs b/Cicm.Database/Models/ProcessorsByMachine.cs new file mode 100644 index 00000000..884d85fc --- /dev/null +++ b/Cicm.Database/Models/ProcessorsByMachine.cs @@ -0,0 +1,13 @@ +namespace Cicm.Database.Models +{ + public class ProcessorsByMachine + { + public int Processor { get; set; } + public int Machine { get; set; } + public float? Speed { get; set; } + public long Id { get; set; } + + public Machines MachineNavigation { get; set; } + public Processors ProcessorNavigation { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/Resolutions.cs b/Cicm.Database/Models/Resolutions.cs new file mode 100644 index 00000000..04875467 --- /dev/null +++ b/Cicm.Database/Models/Resolutions.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; + +namespace Cicm.Database.Models +{ + public class Resolutions + { + public Resolutions() + { + ResolutionsByGpu = new HashSet(); + } + + public int Id { get; set; } + public int Width { get; set; } + public int Height { get; set; } + public long? Colors { get; set; } + public long? Palette { get; set; } + public sbyte Chars { get; set; } + + public ICollection ResolutionsByGpu { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/ResolutionsByGpu.cs b/Cicm.Database/Models/ResolutionsByGpu.cs new file mode 100644 index 00000000..0025ab59 --- /dev/null +++ b/Cicm.Database/Models/ResolutionsByGpu.cs @@ -0,0 +1,12 @@ +namespace Cicm.Database.Models +{ + public class ResolutionsByGpu + { + public int Gpu { get; set; } + public int Resolution { get; set; } + public long Id { get; set; } + + public Gpus GpuNavigation { get; set; } + public Resolutions ResolutionNavigation { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/SoundByMachine.cs b/Cicm.Database/Models/SoundByMachine.cs new file mode 100644 index 00000000..2ad4e0b1 --- /dev/null +++ b/Cicm.Database/Models/SoundByMachine.cs @@ -0,0 +1,12 @@ +namespace Cicm.Database.Models +{ + public class SoundByMachine + { + public int SoundSynth { get; set; } + public int Machine { get; set; } + public long Id { get; set; } + + public Machines MachineNavigation { get; set; } + public SoundSynths SoundSynthNavigation { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/SoundSynths.cs b/Cicm.Database/Models/SoundSynths.cs new file mode 100644 index 00000000..2c6fa34d --- /dev/null +++ b/Cicm.Database/Models/SoundSynths.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; + +namespace Cicm.Database.Models +{ + public class SoundSynths + { + public SoundSynths() + { + SoundByMachine = new HashSet(); + } + + public int Id { get; set; } + public string Name { get; set; } + public int? Company { get; set; } + public string ModelCode { get; set; } + public DateTime? Introduced { get; set; } + public int? Voices { get; set; } + public double? Frequency { get; set; } + public int? Depth { get; set; } + public int? SquareWave { get; set; } + public int? WhiteNoise { get; set; } + public int? Type { get; set; } + + public Companies CompanyNavigation { get; set; } + public ICollection SoundByMachine { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/StorageByMachine.cs b/Cicm.Database/Models/StorageByMachine.cs new file mode 100644 index 00000000..a52ba1a5 --- /dev/null +++ b/Cicm.Database/Models/StorageByMachine.cs @@ -0,0 +1,13 @@ +namespace Cicm.Database.Models +{ + public class StorageByMachine + { + public int Machine { get; set; } + public int Type { get; set; } + public int Interface { get; set; } + public long? Capacity { get; set; } + public long Id { get; set; } + + public Machines MachineNavigation { get; set; } + } +} \ No newline at end of file diff --git a/Cicm.Database/Models/cicmContext.cs b/Cicm.Database/Models/cicmContext.cs new file mode 100644 index 00000000..d96b5a38 --- /dev/null +++ b/Cicm.Database/Models/cicmContext.cs @@ -0,0 +1,956 @@ +using Microsoft.EntityFrameworkCore; + +namespace Cicm.Database.Models +{ + public class cicmContext : DbContext + { + public cicmContext() { } + + public cicmContext(DbContextOptions options) : base(options) { } + + public virtual DbSet Admins { get; set; } + public virtual DbSet BrowserTests { get; set; } + public virtual DbSet CicmDb { get; set; } + public virtual DbSet Companies { get; set; } + public virtual DbSet CompanyDescriptions { get; set; } + public virtual DbSet CompanyLogos { get; set; } + public virtual DbSet Forbidden { get; set; } + public virtual DbSet Gpus { get; set; } + public virtual DbSet GpusByMachine { get; set; } + public virtual DbSet InstructionSetExtensions { get; set; } + public virtual DbSet InstructionSetExtensionsByProcessor { get; set; } + public virtual DbSet InstructionSets { get; set; } + public virtual DbSet Iso31661Numeric { get; set; } + public virtual DbSet Log { get; set; } + public virtual DbSet MachineFamilies { get; set; } + public virtual DbSet Machines { get; set; } + public virtual DbSet MemoryByMachine { get; set; } + public virtual DbSet MoneyDonations { get; set; } + public virtual DbSet News { get; set; } + public virtual DbSet OwnedComputers { get; set; } + public virtual DbSet OwnedConsoles { get; set; } + public virtual DbSet Processors { get; set; } + public virtual DbSet ProcessorsByMachine { get; set; } + public virtual DbSet Resolutions { get; set; } + public virtual DbSet ResolutionsByGpu { get; set; } + public virtual DbSet SoundByMachine { get; set; } + public virtual DbSet SoundSynths { get; set; } + public virtual DbSet StorageByMachine { get; set; } + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + if(!optionsBuilder.IsConfigured) + { + #warning To protect potentially sensitive information in your connection string, you should move it out of source code. See http://go.microsoft.com/fwlink/?LinkId=723263 for guidance on storing connection strings. + optionsBuilder.UseMySql("server=localhost;port=3306;user=cicm;password=cicmpass;database=cicm"); + } + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.ToTable("admins"); + + entity.HasIndex(e => e.User).HasName("idx_admins_user"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.Password).IsRequired().HasColumnName("password").HasColumnType("char(50)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.User).IsRequired().HasColumnName("user").HasColumnType("char(50)") + .HasDefaultValueSql("''"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("browser_tests"); + + entity.HasIndex(e => e.Browser).HasName("idx_browser_tests_browser"); + + entity.HasIndex(e => e.Os).HasName("idx_browser_tests_os"); + + entity.HasIndex(e => e.Platform).HasName("idx_browser_tests_platform"); + + entity.HasIndex(e => e.UserAgent).HasName("idx_browser_tests_user_agent"); + + entity.HasIndex(e => e.Version).HasName("idx_browser_tests_version"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.Agif).HasColumnName("agif").HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Browser).IsRequired().HasColumnName("browser").HasColumnType("varchar(64)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.Colors).HasColumnName("colors").HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Flash).HasColumnName("flash").HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Frames).HasColumnName("frames").HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Gif87).HasColumnName("gif87").HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Gif89).HasColumnName("gif89").HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Jpeg).HasColumnName("jpeg").HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Js).HasColumnName("js").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'"); + + entity.Property(e => e.Os).IsRequired().HasColumnName("os").HasColumnType("varchar(32)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.Platform).IsRequired().HasColumnName("platform").HasColumnType("varchar(8)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.Png).HasColumnName("png").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'"); + + entity.Property(e => e.Pngt).HasColumnName("pngt").HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Table).HasColumnName("table").HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.UserAgent).IsRequired().HasColumnName("user_agent").HasColumnType("varchar(128)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.Version).IsRequired().HasColumnName("version").HasColumnType("varchar(16)") + .HasDefaultValueSql("''"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("cicm_db"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.Updated).HasColumnName("updated").HasColumnType("datetime") + .HasDefaultValueSql("'CURRENT_TIMESTAMP'"); + + entity.Property(e => e.Version).HasColumnName("version").HasColumnType("int(11)"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("companies"); + + entity.HasIndex(e => e.Address).HasName("idx_companies_address"); + + entity.HasIndex(e => e.City).HasName("idx_companies_city"); + + entity.HasIndex(e => e.Country).HasName("idx_companies_country"); + + entity.HasIndex(e => e.Facebook).HasName("idx_companies_facebook"); + + entity.HasIndex(e => e.Founded).HasName("idx_companies_founded"); + + entity.HasIndex(e => e.Name).HasName("idx_companies_name"); + + entity.HasIndex(e => e.PostalCode).HasName("idx_companies_postal_code"); + + entity.HasIndex(e => e.Province).HasName("idx_companies_province"); + + entity.HasIndex(e => e.Sold).HasName("idx_companies_sold"); + + entity.HasIndex(e => e.SoldTo).HasName("idx_companies_sold_to"); + + entity.HasIndex(e => e.Status).HasName("idx_companies_status"); + + entity.HasIndex(e => e.Twitter).HasName("idx_companies_twitter"); + + entity.HasIndex(e => e.Website).HasName("idx_companies_website"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.Address).HasColumnName("address").HasColumnType("varchar(80)"); + + entity.Property(e => e.City).HasColumnName("city").HasColumnType("varchar(80)"); + + entity.Property(e => e.Country).HasColumnName("country").HasColumnType("smallint(3)"); + + entity.Property(e => e.Facebook).HasColumnName("facebook").HasColumnType("varchar(45)"); + + entity.Property(e => e.Founded).HasColumnName("founded").HasColumnType("datetime"); + + entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("varchar(128)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.PostalCode).HasColumnName("postal_code").HasColumnType("varchar(25)"); + + entity.Property(e => e.Province).HasColumnName("province").HasColumnType("varchar(80)"); + + entity.Property(e => e.Sold).HasColumnName("sold").HasColumnType("datetime"); + + entity.Property(e => e.SoldTo).HasColumnName("sold_to").HasColumnType("int(11)"); + + entity.Property(e => e.Status).HasColumnName("status").HasColumnType("int(11)"); + + entity.Property(e => e.Twitter).HasColumnName("twitter").HasColumnType("varchar(45)"); + + entity.Property(e => e.Website).HasColumnName("website").HasColumnType("varchar(255)"); + + entity.HasOne(d => d.CountryNavigation).WithMany(p => p.Companies).HasForeignKey(d => d.Country) + .HasConstraintName("fk_companies_country"); + + entity.HasOne(d => d.SoldToNavigation).WithMany(p => p.InverseSoldToNavigation) + .HasForeignKey(d => d.SoldTo).HasConstraintName("fk_companies_sold_to"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("company_descriptions"); + + entity.HasIndex(e => e.CompanyId).HasName("idx_company_id"); + + entity.HasIndex(e => e.Text).HasName("idx_text"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)").ValueGeneratedOnAdd(); + + entity.Property(e => e.CompanyId).HasColumnName("company_id").HasColumnType("int(11)"); + + entity.Property(e => e.Text).HasColumnName("text").HasColumnType("text"); + + entity.HasOne(d => d.IdNavigation).WithOne(p => p.CompanyDescriptions) + .HasForeignKey(d => d.Id).HasConstraintName("fk_company_id"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new {e.Id, e.CompanyId, e.LogoGuid}); + + entity.ToTable("company_logos"); + + entity.HasIndex(e => e.CompanyId).HasName("idx_company_id"); + + entity.HasIndex(e => e.Id).HasName("idx_id").IsUnique(); + + entity.HasIndex(e => e.LogoGuid).HasName("idx_guid"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)").ValueGeneratedOnAdd(); + + entity.Property(e => e.CompanyId).HasColumnName("company_id").HasColumnType("int(11)"); + + entity.Property(e => e.LogoGuid).HasColumnName("logo_guid").HasColumnType("char(36)"); + + entity.Property(e => e.Year).HasColumnName("year").HasColumnType("int(4)"); + + entity.HasOne(d => d.Company).WithMany(p => p.CompanyLogos).HasForeignKey(d => d.CompanyId) + .OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("fk_company_logos_company1"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("forbidden"); + + entity.HasIndex(e => e.Browser).HasName("idx_forbidden_browser"); + + entity.HasIndex(e => e.Date).HasName("idx_forbidden_date"); + + entity.HasIndex(e => e.Ip).HasName("idx_forbidden_ip"); + + entity.HasIndex(e => e.Referer).HasName("idx_forbidden_referer"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.Browser).IsRequired().HasColumnName("browser").HasColumnType("char(128)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("char(20)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.Ip).IsRequired().HasColumnName("ip").HasColumnType("char(16)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.Referer).IsRequired().HasColumnName("referer").HasColumnType("char(255)") + .HasDefaultValueSql("''"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("gpus"); + + entity.HasIndex(e => e.Company).HasName("idx_gpus_company"); + + entity.HasIndex(e => e.DieSize).HasName("idx_gpus_die_size"); + + entity.HasIndex(e => e.Introduced).HasName("idx_gpus_introduced"); + + entity.HasIndex(e => e.ModelCode).HasName("idx_gpus_model_code"); + + entity.HasIndex(e => e.Name).HasName("idx_gpus_name"); + + entity.HasIndex(e => e.Package).HasName("idx_gpus_package"); + + entity.HasIndex(e => e.Process).HasName("idx_gpus_process"); + + entity.HasIndex(e => e.ProcessNm).HasName("idx_gpus_process_nm"); + + entity.HasIndex(e => e.Transistors).HasName("idx_gpus_transistors"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.Company).HasColumnName("company").HasColumnType("int(11)"); + + entity.Property(e => e.DieSize).HasColumnName("die_size"); + + entity.Property(e => e.Introduced).HasColumnName("introduced").HasColumnType("datetime"); + + entity.Property(e => e.ModelCode).HasColumnName("model_code").HasColumnType("varchar(45)"); + + entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("char(128)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.Package).HasColumnName("package").HasColumnType("varchar(45)"); + + entity.Property(e => e.Process).HasColumnName("process").HasColumnType("varchar(45)"); + + entity.Property(e => e.ProcessNm).HasColumnName("process_nm"); + + entity.Property(e => e.Transistors).HasColumnName("transistors").HasColumnType("bigint(20)"); + + entity.HasOne(d => d.CompanyNavigation).WithMany(p => p.Gpus).HasForeignKey(d => d.Company) + .HasConstraintName("fk_gpus_company"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("gpus_by_machine"); + + entity.HasIndex(e => e.Gpu).HasName("idx_gpus_by_machine_gpus"); + + entity.HasIndex(e => e.Machine).HasName("idx_gpus_by_machine_machine"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)"); + + entity.Property(e => e.Gpu).HasColumnName("gpu").HasColumnType("int(11)"); + + entity.Property(e => e.Machine).HasColumnName("machine").HasColumnType("int(11)"); + + entity.HasOne(d => d.GpuNavigation).WithMany(p => p.GpusByMachine).HasForeignKey(d => d.Gpu) + .HasConstraintName("fk_gpus_by_machine_gpu"); + + entity.HasOne(d => d.MachineNavigation).WithMany(p => p.GpusByMachine).HasForeignKey(d => d.Machine) + .HasConstraintName("fk_gpus_by_machine_machine"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("instruction_set_extensions"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.Extension).IsRequired().HasColumnName("extension").HasColumnType("varchar(45)"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new {e.Id, e.ProcessorId, e.ExtensionId}); + + entity.ToTable("instruction_set_extensions_by_processor"); + + entity.HasIndex(e => e.ExtensionId).HasName("idx_setextension_extension"); + + entity.HasIndex(e => e.ProcessorId).HasName("idx_setextension_processor"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)").ValueGeneratedOnAdd(); + + entity.Property(e => e.ProcessorId).HasColumnName("processor_id").HasColumnType("int(11)"); + + entity.Property(e => e.ExtensionId).HasColumnName("extension_id").HasColumnType("int(11)"); + + entity.HasOne(d => d.Extension).WithMany(p => p.InstructionSetExtensionsByProcessor) + .HasForeignKey(d => d.ExtensionId).OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("fk_extension_extension_id"); + + entity.HasOne(d => d.Processor).WithMany(p => p.InstructionSetExtensionsByProcessor) + .HasForeignKey(d => d.ProcessorId).OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("fk_extension_processor_id"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("instruction_sets"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.InstructionSet).IsRequired().HasColumnName("instruction_set") + .HasColumnType("varchar(45)"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("iso3166_1_numeric"); + + entity.HasIndex(e => e.Name).HasName("idx_name"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("smallint(3)"); + + entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("varchar(64)"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("log"); + + entity.HasIndex(e => e.Browser).HasName("idx_log_browser"); + + entity.HasIndex(e => e.Date).HasName("idx_log_date"); + + entity.HasIndex(e => e.Ip).HasName("idx_log_ip"); + + entity.HasIndex(e => e.Referer).HasName("idx_log_referer"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.Browser).IsRequired().HasColumnName("browser").HasColumnType("char(128)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("char(20)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.Ip).IsRequired().HasColumnName("ip").HasColumnType("char(16)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.Referer).IsRequired().HasColumnName("referer").HasColumnType("char(255)") + .HasDefaultValueSql("''"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("machine_families"); + + entity.HasIndex(e => e.Company).HasName("idx_machine_families_company"); + + entity.HasIndex(e => e.Name).HasName("idx_machine_families_name"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.Company).HasColumnName("company").HasColumnType("int(11)"); + + entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("varchar(255)"); + + entity.HasOne(d => d.CompanyNavigation).WithMany(p => p.MachineFamilies).HasForeignKey(d => d.Company) + .HasConstraintName("fk_machine_families_company"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("machines"); + + entity.HasIndex(e => e.Company).HasName("idx_machines_company"); + + entity.HasIndex(e => e.Family).HasName("idx_machines_family"); + + entity.HasIndex(e => e.Introduced).HasName("idx_machines_introduced"); + + entity.HasIndex(e => e.Model).HasName("idx_machines_model"); + + entity.HasIndex(e => e.Name).HasName("idx_machines_name"); + + entity.HasIndex(e => e.Type).HasName("idx_machines_type"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.Company).HasColumnName("company").HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Family).HasColumnName("family").HasColumnType("int(11)"); + + entity.Property(e => e.Introduced).HasColumnName("introduced").HasColumnType("datetime"); + + entity.Property(e => e.Model).HasColumnName("model").HasColumnType("varchar(50)"); + + entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("varchar(255)"); + + entity.Property(e => e.Type).HasColumnName("type").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.HasOne(d => d.CompanyNavigation).WithMany(p => p.Machines).HasForeignKey(d => d.Company) + .OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("fk_machines_company"); + + entity.HasOne(d => d.FamilyNavigation).WithMany(p => p.Machines).HasForeignKey(d => d.Family) + .HasConstraintName("fk_machines_family"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("memory_by_machine"); + + entity.HasIndex(e => e.Machine).HasName("idx_memory_by_machine_machine"); + + entity.HasIndex(e => e.Size).HasName("idx_memory_by_machine_size"); + + entity.HasIndex(e => e.Speed).HasName("idx_memory_by_machine_speed"); + + entity.HasIndex(e => e.Type).HasName("idx_memory_by_machine_type"); + + entity.HasIndex(e => e.Usage).HasName("idx_memory_by_machine_usage"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)"); + + entity.Property(e => e.Machine).HasColumnName("machine").HasColumnType("int(11)"); + + entity.Property(e => e.Size).HasColumnName("size").HasColumnType("bigint(20)"); + + entity.Property(e => e.Speed).HasColumnName("speed"); + + entity.Property(e => e.Type).HasColumnName("type").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.Property(e => e.Usage).HasColumnName("usage").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.HasOne(d => d.MachineNavigation).WithMany(p => p.MemoryByMachine).HasForeignKey(d => d.Machine) + .HasConstraintName("fk_memory_by_machine_machine"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("money_donations"); + + entity.HasIndex(e => e.Donator).HasName("idx_money_donations_donator"); + + entity.HasIndex(e => e.Quantity).HasName("idx_money_donations_quantity"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.Donator).IsRequired().HasColumnName("donator").HasColumnType("char(128)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.Quantity).HasColumnName("quantity").HasColumnType("decimal(11,2)") + .HasDefaultValueSql("'0.00'"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("news"); + + entity.HasIndex(e => e.AddedId).HasName("idx_news_ip"); + + entity.HasIndex(e => e.Date).HasName("idx_news_date"); + + entity.HasIndex(e => e.Type).HasName("idx_news_type"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.AddedId).HasColumnName("added_id").HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("char(20)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.Type).HasColumnName("type").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("owned_computers"); + + entity.HasIndex(e => e.Boxed).HasName("idx_owned_computers_boxed"); + + entity.HasIndex(e => e.Cap1).HasName("idx_owned_computers_cap1"); + + entity.HasIndex(e => e.Cap2).HasName("idx_owned_computers_cap2"); + + entity.HasIndex(e => e.Cpu1).HasName("idx_owned_computers_cpu1"); + + entity.HasIndex(e => e.Cpu2).HasName("idx_owned_computers_cpu2"); + + entity.HasIndex(e => e.Date).HasName("idx_owned_computers_date"); + + entity.HasIndex(e => e.DbId).HasName("idx_owned_computers_db_id"); + + entity.HasIndex(e => e.Disk1).HasName("idx_owned_computers_disk1"); + + entity.HasIndex(e => e.Disk2).HasName("idx_owned_computers_disk2"); + + entity.HasIndex(e => e.Manuals).HasName("idx_owned_computers_manuals"); + + entity.HasIndex(e => e.Mhz1).HasName("idx_owned_computers_mhz1"); + + entity.HasIndex(e => e.Mhz2).HasName("idx_owned_computers_mhz2"); + + entity.HasIndex(e => e.Ram).HasName("idx_owned_computers_ram"); + + entity.HasIndex(e => e.Rigid).HasName("idx_owned_computers_rigid"); + + entity.HasIndex(e => e.Status).HasName("idx_owned_computers_status"); + + entity.HasIndex(e => e.Trade).HasName("idx_owned_computers_trade"); + + entity.HasIndex(e => e.Vram).HasName("idx_owned_computers_vram"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.Boxed).HasColumnName("boxed").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.Property(e => e.Cap1).HasColumnName("cap1").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.Property(e => e.Cap2).HasColumnName("cap2").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.Property(e => e.Cpu1).HasColumnName("cpu1").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.Property(e => e.Cpu2).HasColumnName("cpu2").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("varchar(20)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.DbId).HasColumnName("db_id").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.Property(e => e.Disk1).HasColumnName("disk1").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.Property(e => e.Disk2).HasColumnName("disk2").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.Property(e => e.Manuals).HasColumnName("manuals").HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Mhz1).HasColumnName("mhz1").HasColumnType("decimal(10,0)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Mhz2).HasColumnName("mhz2").HasColumnType("decimal(10,0)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Ram).HasColumnName("ram").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.Property(e => e.Rigid).IsRequired().HasColumnName("rigid").HasColumnType("varchar(64)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.Status).HasColumnName("status").HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Trade).HasColumnName("trade").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.Property(e => e.Vram).HasColumnName("vram").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("owned_consoles"); + + entity.HasIndex(e => e.Boxed).HasName("idx_owned_consoles_boxed"); + + entity.HasIndex(e => e.Date).HasName("idx_owned_consoles_date"); + + entity.HasIndex(e => e.DbId).HasName("idx_owned_consoles_db_id"); + + entity.HasIndex(e => e.Manuals).HasName("idx_owned_consoles_manuals"); + + entity.HasIndex(e => e.Status).HasName("idx_owned_consoles_status"); + + entity.HasIndex(e => e.Trade).HasName("idx_owned_consoles_trade"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.Boxed).HasColumnName("boxed").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("char(20)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.DbId).HasColumnName("db_id").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.Property(e => e.Manuals).HasColumnName("manuals").HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Status).HasColumnName("status").HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Trade).HasColumnName("trade").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("processors"); + + entity.HasIndex(e => e.AddrBus).HasName("idx_processors_addr_bus"); + + entity.HasIndex(e => e.Company).HasName("idx_processors_company"); + + entity.HasIndex(e => e.Cores).HasName("idx_processors_cores"); + + entity.HasIndex(e => e.DataBus).HasName("idx_processors_data_bus"); + + entity.HasIndex(e => e.DieSize).HasName("idx_processors_die_size"); + + entity.HasIndex(e => e.FprSize).HasName("idx_processors_FPR_size"); + + entity.HasIndex(e => e.Fprs).HasName("idx_processors_FPRs"); + + entity.HasIndex(e => e.GprSize).HasName("idx_processors_GPR_size"); + + entity.HasIndex(e => e.Gprs).HasName("idx_processors_GPRs"); + + entity.HasIndex(e => e.InstructionSet).HasName("idx_processors_instruction_set"); + + entity.HasIndex(e => e.Introduced).HasName("idx_processors_introduced"); + + entity.HasIndex(e => e.L1Data).HasName("idx_processors_L1_data"); + + entity.HasIndex(e => e.L1Instruction).HasName("idx_processors_L1_instruction"); + + entity.HasIndex(e => e.L2).HasName("idx_processors_L2"); + + entity.HasIndex(e => e.L3).HasName("idx_processors_L3"); + + entity.HasIndex(e => e.ModelCode).HasName("idx_processors_model_code"); + + entity.HasIndex(e => e.Name).HasName("idx_processors_name"); + + entity.HasIndex(e => e.Package).HasName("idx_processors_package"); + + entity.HasIndex(e => e.Process).HasName("idx_processors_process"); + + entity.HasIndex(e => e.ProcessNm).HasName("idx_processors_process_nm"); + + entity.HasIndex(e => e.SimdRegisters).HasName("idx_processors_SIMD_registers"); + + entity.HasIndex(e => e.SimdSize).HasName("idx_processors_SIMD_size"); + + entity.HasIndex(e => e.Speed).HasName("idx_processors_speed"); + + entity.HasIndex(e => e.ThreadsPerCore).HasName("idx_processors_threads_per_core"); + + entity.HasIndex(e => e.Transistors).HasName("idx_processors_transistors"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.AddrBus).HasColumnName("addr_bus").HasColumnType("int(11)"); + + entity.Property(e => e.Company).HasColumnName("company").HasColumnType("int(11)"); + + entity.Property(e => e.Cores).HasColumnName("cores").HasColumnType("int(11)"); + + entity.Property(e => e.DataBus).HasColumnName("data_bus").HasColumnType("int(11)"); + + entity.Property(e => e.DieSize).HasColumnName("die_size"); + + entity.Property(e => e.FprSize).HasColumnName("FPR_size").HasColumnType("int(11)"); + + entity.Property(e => e.Fprs).HasColumnName("FPRs").HasColumnType("int(11)"); + + entity.Property(e => e.GprSize).HasColumnName("GPR_size").HasColumnType("int(11)"); + + entity.Property(e => e.Gprs).HasColumnName("GPRs").HasColumnType("int(11)"); + + entity.Property(e => e.InstructionSet).HasColumnName("instruction_set").HasColumnType("int(11)"); + + entity.Property(e => e.Introduced).HasColumnName("introduced").HasColumnType("datetime"); + + entity.Property(e => e.L1Data).HasColumnName("L1_data"); + + entity.Property(e => e.L1Instruction).HasColumnName("L1_instruction"); + + entity.Property(e => e.ModelCode).HasColumnName("model_code").HasColumnType("varchar(45)"); + + entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("char(50)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.Package).HasColumnName("package").HasColumnType("varchar(45)"); + + entity.Property(e => e.Process).HasColumnName("process").HasColumnType("varchar(45)"); + + entity.Property(e => e.ProcessNm).HasColumnName("process_nm"); + + entity.Property(e => e.SimdRegisters).HasColumnName("SIMD_registers").HasColumnType("int(11)"); + + entity.Property(e => e.SimdSize).HasColumnName("SIMD_size").HasColumnType("int(11)"); + + entity.Property(e => e.Speed).HasColumnName("speed"); + + entity.Property(e => e.ThreadsPerCore).HasColumnName("threads_per_core").HasColumnType("int(11)"); + + entity.Property(e => e.Transistors).HasColumnName("transistors").HasColumnType("bigint(20)"); + + entity.HasOne(d => d.CompanyNavigation).WithMany(p => p.Processors).HasForeignKey(d => d.Company) + .HasConstraintName("fk_processors_company"); + + entity.HasOne(d => d.InstructionSetNavigation).WithMany(p => p.Processors) + .HasForeignKey(d => d.InstructionSet).HasConstraintName("fk_processors_instruction_set"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("processors_by_machine"); + + entity.HasIndex(e => e.Machine).HasName("idx_processors_by_machine_machine"); + + entity.HasIndex(e => e.Processor).HasName("idx_processors_by_machine_processor"); + + entity.HasIndex(e => e.Speed).HasName("idx_processors_by_machine_speed"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)"); + + entity.Property(e => e.Machine).HasColumnName("machine").HasColumnType("int(11)"); + + entity.Property(e => e.Processor).HasColumnName("processor").HasColumnType("int(11)"); + + entity.Property(e => e.Speed).HasColumnName("speed"); + + entity.HasOne(d => d.MachineNavigation).WithMany(p => p.ProcessorsByMachine) + .HasForeignKey(d => d.Machine).HasConstraintName("fk_processors_by_machine_machine"); + + entity.HasOne(d => d.ProcessorNavigation).WithMany(p => p.ProcessorsByMachine) + .HasForeignKey(d => d.Processor).HasConstraintName("fk_processors_by_machine_processor"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("resolutions"); + + entity.HasIndex(e => e.Colors).HasName("idx_resolutions_colors"); + + entity.HasIndex(e => e.Height).HasName("idx_resolutions_height"); + + entity.HasIndex(e => e.Palette).HasName("idx_resolutions_palette"); + + entity.HasIndex(e => e.Width).HasName("idx_resolutions_width"); + + entity.HasIndex(e => new {e.Width, e.Height}).HasName("idx_resolutions_resolution"); + + entity.HasIndex(e => new {e.Width, e.Height, e.Colors}) + .HasName("idx_resolutions_resolution_with_color"); + + entity.HasIndex(e => new {e.Width, e.Height, e.Colors, e.Palette}) + .HasName("idx_resolutions_resolution_with_color_and_palette"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.Chars).HasColumnName("chars").HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Colors).HasColumnName("colors").HasColumnType("bigint(20)"); + + entity.Property(e => e.Height).HasColumnName("height").HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Palette).HasColumnName("palette").HasColumnType("bigint(20)"); + + entity.Property(e => e.Width).HasColumnName("width").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("resolutions_by_gpu"); + + entity.HasIndex(e => e.Gpu).HasName("idx_resolutions_by_gpu_gpu"); + + entity.HasIndex(e => e.Resolution).HasName("idx_resolutions_by_gpu_resolution"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)"); + + entity.Property(e => e.Gpu).HasColumnName("gpu").HasColumnType("int(11)"); + + entity.Property(e => e.Resolution).HasColumnName("resolution").HasColumnType("int(11)"); + + entity.HasOne(d => d.GpuNavigation).WithMany(p => p.ResolutionsByGpu).HasForeignKey(d => d.Gpu) + .HasConstraintName("fk_resolutions_by_gpu_gpu"); + + entity.HasOne(d => d.ResolutionNavigation).WithMany(p => p.ResolutionsByGpu) + .HasForeignKey(d => d.Resolution).HasConstraintName("fk_resolutions_by_gpu_resolution"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("sound_by_machine"); + + entity.HasIndex(e => e.Machine).HasName("idx_sound_by_machine_machine"); + + entity.HasIndex(e => e.SoundSynth).HasName("idx_sound_by_machine_sound_synth"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)"); + + entity.Property(e => e.Machine).HasColumnName("machine").HasColumnType("int(11)"); + + entity.Property(e => e.SoundSynth).HasColumnName("sound_synth").HasColumnType("int(11)"); + + entity.HasOne(d => d.MachineNavigation).WithMany(p => p.SoundByMachine).HasForeignKey(d => d.Machine) + .HasConstraintName("fk_sound_by_machine_machine"); + + entity.HasOne(d => d.SoundSynthNavigation).WithMany(p => p.SoundByMachine) + .HasForeignKey(d => d.SoundSynth).HasConstraintName("fk_sound_by_machine_sound_synth"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("sound_synths"); + + entity.HasIndex(e => e.Company).HasName("idx_sound_synths_company"); + + entity.HasIndex(e => e.Depth).HasName("idx_sound_synths_depth"); + + entity.HasIndex(e => e.Frequency).HasName("idx_sound_synths_frequency"); + + entity.HasIndex(e => e.Introduced).HasName("idx_sound_synths_introduced"); + + entity.HasIndex(e => e.ModelCode).HasName("idx_sound_synths_model_code"); + + entity.HasIndex(e => e.Name).HasName("idx_sound_synths_name"); + + entity.HasIndex(e => e.SquareWave).HasName("idx_sound_synths_square_wave"); + + entity.HasIndex(e => e.Type).HasName("idx_sound_synths_type"); + + entity.HasIndex(e => e.Voices).HasName("idx_sound_synths_voices"); + + entity.HasIndex(e => e.WhiteNoise).HasName("idx_sound_synths_white_noise"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)"); + + entity.Property(e => e.Company).HasColumnName("company").HasColumnType("int(11)"); + + entity.Property(e => e.Depth).HasColumnName("depth").HasColumnType("int(11)"); + + entity.Property(e => e.Frequency).HasColumnName("frequency"); + + entity.Property(e => e.Introduced).HasColumnName("introduced").HasColumnType("datetime"); + + entity.Property(e => e.ModelCode).HasColumnName("model_code").HasColumnType("varchar(45)"); + + entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("char(50)") + .HasDefaultValueSql("''"); + + entity.Property(e => e.SquareWave).HasColumnName("square_wave").HasColumnType("int(11)"); + + entity.Property(e => e.Type).HasColumnName("type").HasColumnType("int(11)"); + + entity.Property(e => e.Voices).HasColumnName("voices").HasColumnType("int(11)"); + + entity.Property(e => e.WhiteNoise).HasColumnName("white_noise").HasColumnType("int(11)"); + + entity.HasOne(d => d.CompanyNavigation).WithMany(p => p.SoundSynths).HasForeignKey(d => d.Company) + .HasConstraintName("fk_sound_synths_company"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("storage_by_machine"); + + entity.HasIndex(e => e.Capacity).HasName("idx_storage_capacity"); + + entity.HasIndex(e => e.Interface).HasName("idx_storage_interface"); + + entity.HasIndex(e => e.Machine).HasName("idx_storage_machine"); + + entity.HasIndex(e => e.Type).HasName("idx_storage_type"); + + entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)"); + + entity.Property(e => e.Capacity).HasColumnName("capacity").HasColumnType("bigint(20)"); + + entity.Property(e => e.Interface).HasColumnName("interface").HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Machine).HasColumnName("machine").HasColumnType("int(11)"); + + entity.Property(e => e.Type).HasColumnName("type").HasColumnType("int(11)").HasDefaultValueSql("'0'"); + + entity.HasOne(d => d.MachineNavigation).WithMany(p => p.StorageByMachine).HasForeignKey(d => d.Machine) + .HasConstraintName("fk_storage_by_machine_machine"); + }); + } + } +} \ No newline at end of file