mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Add companies by document.
This commit is contained in:
@@ -97,6 +97,27 @@ namespace Cicm.Database.Migrations
|
||||
b.ToTable("cicm_db");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.CompaniesByDocument", b =>
|
||||
{
|
||||
b.Property<long>("Id").ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("CompanyId");
|
||||
|
||||
b.Property<long>("DocumentId");
|
||||
|
||||
b.Property<string>("RoleId").IsRequired().HasColumnType("char(3)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CompanyId");
|
||||
|
||||
b.HasIndex("DocumentId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("CompaniesByDocuments");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.Company", b =>
|
||||
{
|
||||
b.Property<int>("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)");
|
||||
@@ -5238,6 +5259,18 @@ namespace Cicm.Database.Migrations
|
||||
b.HasDiscriminator().HasValue("ApplicationUser");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.CompaniesByDocument", b =>
|
||||
{
|
||||
b.HasOne("Cicm.Database.Models.DocumentCompany", "Company").WithMany("Documents")
|
||||
.HasForeignKey("CompanyId").OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("Cicm.Database.Models.Document", "Document").WithMany("Companies").HasForeignKey("DocumentId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("Cicm.Database.Models.DocumentRole", "Role").WithMany().HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.Company", b =>
|
||||
{
|
||||
b.HasOne("Cicm.Database.Models.Iso31661Numeric", "Country").WithMany("Companies")
|
||||
|
||||
Reference in New Issue
Block a user