mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Use enumerations in EF models.
This commit is contained in:
1721
Cicm.Database/Migrations/20180806192514_UseExistingEnumerations.Designer.cs
generated
Normal file
1721
Cicm.Database/Migrations/20180806192514_UseExistingEnumerations.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Cicm.Database.Migrations
|
||||
{
|
||||
public partial class UseExistingEnumerations : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder) { }
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder) { }
|
||||
}
|
||||
}
|
||||
@@ -199,17 +199,17 @@ namespace Cicm.Database.Migrations
|
||||
|
||||
b.Property<int>("CompanyId").HasColumnName("company_id").HasColumnType("int(11)");
|
||||
|
||||
b.Property<string>("LogoGuid").HasColumnName("logo_guid").HasColumnType("char(36)");
|
||||
b.Property<string>("Guid").HasColumnName("logo_guid").HasColumnType("char(36)");
|
||||
|
||||
b.Property<int?>("Year").HasColumnName("year").HasColumnType("int(4)");
|
||||
|
||||
b.HasKey("Id", "CompanyId", "LogoGuid");
|
||||
b.HasKey("Id", "CompanyId", "Guid");
|
||||
|
||||
b.HasIndex("CompanyId").HasName("idx_company_id");
|
||||
|
||||
b.HasIndex("Id").IsUnique().HasName("idx_id");
|
||||
b.HasIndex("Guid").HasName("idx_guid");
|
||||
|
||||
b.HasIndex("LogoGuid").HasName("idx_guid");
|
||||
b.HasIndex("Id").IsUnique().HasName("idx_id");
|
||||
|
||||
b.ToTable("company_logos");
|
||||
});
|
||||
@@ -938,7 +938,7 @@ namespace Cicm.Database.Migrations
|
||||
modelBuilder.Entity("Cicm.Database.Models.CompanyDescriptions",
|
||||
b =>
|
||||
{
|
||||
b.HasOne("Cicm.Database.Models.Companies", "Company").WithOne("CompanyDescriptions")
|
||||
b.HasOne("Cicm.Database.Models.Companies", "Company").WithOne("Description")
|
||||
.HasForeignKey("Cicm.Database.Models.CompanyDescriptions", "Id")
|
||||
.HasConstraintName("fk_company_id").OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
@@ -16,24 +16,24 @@ namespace Cicm.Database.Models
|
||||
SoundSynths = new HashSet<SoundSynths>();
|
||||
}
|
||||
|
||||
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? SoldToId { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string City { get; set; }
|
||||
public string Province { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
public short? CountryId { get; set; }
|
||||
public int Status { get; set; }
|
||||
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? SoldToId { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string City { get; set; }
|
||||
public string Province { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
public short? CountryId { get; set; }
|
||||
public CompanyStatus Status { get; set; }
|
||||
|
||||
public Iso31661Numeric Country { get; set; }
|
||||
public Companies SoldTo { get; set; }
|
||||
public CompanyDescriptions CompanyDescriptions { get; set; }
|
||||
public CompanyDescriptions Description { get; set; }
|
||||
public ICollection<CompanyLogos> CompanyLogos { get; set; }
|
||||
public ICollection<Gpus> Gpus { get; set; }
|
||||
public ICollection<Companies> InverseSoldToNavigation { get; set; }
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
public int Id { get; set; }
|
||||
public int CompanyId { get; set; }
|
||||
public int? Year { get; set; }
|
||||
public string LogoGuid { get; set; }
|
||||
public string Guid { get; set; }
|
||||
|
||||
public Companies Company { get; set; }
|
||||
}
|
||||
|
||||
@@ -14,13 +14,13 @@ namespace Cicm.Database.Models
|
||||
Storage = new HashSet<StorageByMachine>();
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public int CompanyId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int Type { get; set; }
|
||||
public DateTime? Introduced { get; set; }
|
||||
public int? FamilyId { get; set; }
|
||||
public string Model { get; set; }
|
||||
public int Id { get; set; }
|
||||
public int CompanyId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public MachineType Type { get; set; }
|
||||
public DateTime? Introduced { get; set; }
|
||||
public int? FamilyId { get; set; }
|
||||
public string Model { get; set; }
|
||||
|
||||
public Companies Company { get; set; }
|
||||
public MachineFamilies Family { get; set; }
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
{
|
||||
public class MemoryByMachine
|
||||
{
|
||||
public int MachineId { 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 int MachineId { get; set; }
|
||||
public MemoryType Type { get; set; }
|
||||
public MemoryUsage Usage { get; set; }
|
||||
public long? Size { get; set; }
|
||||
public double? Speed { get; set; }
|
||||
public long Id { get; set; }
|
||||
|
||||
public Machines Machine { get; set; }
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
{
|
||||
public class News
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Date { get; set; }
|
||||
public int Type { get; set; }
|
||||
public int AddedId { get; set; }
|
||||
public int Id { get; set; }
|
||||
public string Date { get; set; }
|
||||
public NewsType Type { get; set; }
|
||||
public int AddedId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,23 +2,23 @@
|
||||
{
|
||||
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; }
|
||||
public int Id { get; set; }
|
||||
public int DbId { get; set; }
|
||||
public string Date { get; set; }
|
||||
public StatusType 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; }
|
||||
}
|
||||
}
|
||||
@@ -2,12 +2,12 @@
|
||||
{
|
||||
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; }
|
||||
public int Id { get; set; }
|
||||
public int DbId { get; set; }
|
||||
public string Date { get; set; }
|
||||
public StatusType Status { get; set; }
|
||||
public int Trade { get; set; }
|
||||
public int Boxed { get; set; }
|
||||
public int Manuals { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,11 +2,11 @@
|
||||
{
|
||||
public class StorageByMachine
|
||||
{
|
||||
public int MachineId { get; set; }
|
||||
public int Type { get; set; }
|
||||
public int Interface { get; set; }
|
||||
public long? Capacity { get; set; }
|
||||
public long Id { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
public StorageType Type { get; set; }
|
||||
public StorageInterface Interface { get; set; }
|
||||
public long? Capacity { get; set; }
|
||||
public long Id { get; set; }
|
||||
|
||||
public Machines Machine { get; set; }
|
||||
}
|
||||
|
||||
@@ -218,13 +218,13 @@ namespace Cicm.Database.Models
|
||||
|
||||
entity.Property(e => e.Text).HasColumnName("text").HasColumnType("text");
|
||||
|
||||
entity.HasOne(d => d.Company).WithOne(p => p.CompanyDescriptions)
|
||||
.HasForeignKey<CompanyDescriptions>(d => d.Id).HasConstraintName("fk_company_id");
|
||||
entity.HasOne(d => d.Company).WithOne(p => p.Description).HasForeignKey<CompanyDescriptions>(d => d.Id)
|
||||
.HasConstraintName("fk_company_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<CompanyLogos>(entity =>
|
||||
{
|
||||
entity.HasKey(e => new {e.Id, e.CompanyId, e.LogoGuid});
|
||||
entity.HasKey(e => new {e.Id, e.CompanyId, LogoGuid = e.Guid});
|
||||
|
||||
entity.ToTable("company_logos");
|
||||
|
||||
@@ -232,13 +232,13 @@ namespace Cicm.Database.Models
|
||||
|
||||
entity.HasIndex(e => e.Id).HasName("idx_id").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.LogoGuid).HasName("idx_guid");
|
||||
entity.HasIndex(e => e.Guid).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.Guid).HasColumnName("logo_guid").HasColumnType("char(36)");
|
||||
|
||||
entity.Property(e => e.Year).HasColumnName("year").HasColumnType("int(4)");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user