Add document people.

This commit is contained in:
2019-06-17 00:28:17 +01:00
parent f9f347937a
commit e2c9416bbe
7 changed files with 7676 additions and 11 deletions

View File

@@ -229,6 +229,27 @@ namespace Cicm.Database.Migrations
b.ToTable("Documents");
});
modelBuilder.Entity("Cicm.Database.Models.DocumentPerson", b =>
{
b.Property<int>("Id").ValueGeneratedOnAdd();
b.Property<string>("Name").IsRequired();
b.Property<int?>("PersonId");
b.Property<string>("Surname").IsRequired();
b.HasKey("Id");
b.HasIndex("Name");
b.HasIndex("PersonId").IsUnique();
b.HasIndex("Surname");
b.ToTable("DocumentPeople");
});
modelBuilder.Entity("Cicm.Database.Models.DocumentRole", b =>
{
b.Property<string>("Id").ValueGeneratedOnAdd().HasColumnType("char(3)");
@@ -4577,6 +4598,8 @@ namespace Cicm.Database.Migrations
b.Property<DateTime?>("DeathDate");
b.Property<int?>("DocumentPersonId");
b.Property<string>("Facebook");
b.Property<string>("Name").IsRequired();
@@ -5203,6 +5226,14 @@ namespace Cicm.Database.Migrations
.HasForeignKey("CountryId");
});
modelBuilder.Entity("Cicm.Database.Models.DocumentPerson",
b =>
{
b.HasOne("Cicm.Database.Models.Person", "Person").WithOne("DocumentPerson")
.HasForeignKey("Cicm.Database.Models.DocumentPerson", "PersonId")
.OnDelete(DeleteBehavior.SetNull);
});
modelBuilder.Entity("Cicm.Database.Models.Gpu",
b =>
{