mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Add document company.
This commit is contained in:
@@ -107,6 +107,8 @@ namespace Cicm.Database.Migrations
|
||||
|
||||
b.Property<short?>("CountryId").HasColumnName("country").HasColumnType("smallint(3)");
|
||||
|
||||
b.Property<int?>("DocumentCompanyId");
|
||||
|
||||
b.Property<string>("Facebook").HasColumnName("facebook").HasColumnType("varchar(45)").HasMaxLength(45);
|
||||
|
||||
b.Property<DateTime?>("Founded").HasColumnName("founded").HasColumnType("datetime");
|
||||
@@ -137,6 +139,8 @@ namespace Cicm.Database.Migrations
|
||||
|
||||
b.HasIndex("CountryId").HasName("idx_companies_country");
|
||||
|
||||
b.HasIndex("DocumentCompanyId").IsUnique();
|
||||
|
||||
b.HasIndex("Facebook").HasName("idx_companies_facebook");
|
||||
|
||||
b.HasIndex("Founded").HasName("idx_companies_founded");
|
||||
@@ -229,6 +233,23 @@ namespace Cicm.Database.Migrations
|
||||
b.ToTable("Documents");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.DocumentCompany", b =>
|
||||
{
|
||||
b.Property<int>("Id").ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("CompanyId");
|
||||
|
||||
b.Property<string>("Name").IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CompanyId").IsUnique();
|
||||
|
||||
b.HasIndex("Name");
|
||||
|
||||
b.ToTable("DocumentCompanies");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.DocumentPerson", b =>
|
||||
{
|
||||
b.Property<int>("Id").ValueGeneratedOnAdd();
|
||||
@@ -5222,6 +5243,9 @@ namespace Cicm.Database.Migrations
|
||||
b.HasOne("Cicm.Database.Models.Iso31661Numeric", "Country").WithMany("Companies")
|
||||
.HasForeignKey("CountryId").HasConstraintName("fk_companies_country");
|
||||
|
||||
b.HasOne("Cicm.Database.Models.DocumentCompany", "DocumentCompany").WithOne("Company")
|
||||
.HasForeignKey("Cicm.Database.Models.Company", "DocumentCompanyId").OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
b.HasOne("Cicm.Database.Models.Company", "SoldTo").WithMany("InverseSoldToNavigation")
|
||||
.HasForeignKey("SoldToId").HasConstraintName("fk_companies_sold_to");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user