Add person model.

This commit is contained in:
2019-06-02 03:29:43 +01:00
parent b4045475ee
commit 4ff9016e41
7 changed files with 5898 additions and 1 deletions

View File

@@ -4180,6 +4180,51 @@ namespace Cicm.Database.Migrations
b.ToTable("OwnedMachinePhotos");
});
modelBuilder.Entity("Cicm.Database.Models.Person", b =>
{
b.Property<int>("Id").ValueGeneratedOnAdd();
b.Property<DateTime>("BirthDate");
b.Property<short?>("CountryOfBirthId");
b.Property<DateTime?>("DeathDate");
b.Property<string>("Facebook");
b.Property<string>("Name").IsRequired();
b.Property<Guid>("Photo");
b.Property<string>("Surname").IsRequired();
b.Property<string>("Twitter");
b.Property<string>("Webpage");
b.HasKey("Id");
b.HasIndex("BirthDate");
b.HasIndex("CountryOfBirthId");
b.HasIndex("DeathDate");
b.HasIndex("Facebook");
b.HasIndex("Name");
b.HasIndex("Photo");
b.HasIndex("Surname");
b.HasIndex("Twitter");
b.HasIndex("Webpage");
b.ToTable("People");
});
modelBuilder.Entity("Cicm.Database.Models.Processor", b =>
{
b.Property<int>("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)");
@@ -4864,6 +4909,13 @@ namespace Cicm.Database.Migrations
.HasForeignKey("UserId").OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Cicm.Database.Models.Person",
b =>
{
b.HasOne("Cicm.Database.Models.Iso31661Numeric", "CountryOfBirth")
.WithMany("People").HasForeignKey("CountryOfBirthId");
});
modelBuilder.Entity("Cicm.Database.Models.Processor", b =>
{
b.HasOne("Cicm.Database.Models.Company", "Company").WithMany("Processors").HasForeignKey("CompanyId")