Связь Hosts & templates. Переделал респонс для get all templates

This commit is contained in:
Mikhail Trubnikov
2023-09-19 15:47:50 +10:00
parent 7b17d3260d
commit bb2e063d2f
7 changed files with 1471 additions and 17 deletions

View File

@@ -391,6 +391,9 @@ namespace PARR.DAL.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<Guid?>("HostId")
.HasColumnType("uuid");
b.Property<string>("IP")
.IsRequired()
.HasColumnType("text");
@@ -406,6 +409,8 @@ namespace PARR.DAL.Migrations
b.HasKey("Id");
b.HasIndex("HostId");
b.ToTable("Hosts");
});
@@ -556,6 +561,9 @@ namespace PARR.DAL.Migrations
b.Property<DateTimeOffset?>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("HostId")
.HasColumnType("uuid");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
@@ -570,6 +578,8 @@ namespace PARR.DAL.Migrations
b.HasIndex("ApplicationInWorkId");
b.HasIndex("HostId");
b.HasIndex("Name")
.IsUnique();
@@ -1055,6 +1065,13 @@ namespace PARR.DAL.Migrations
b.Navigation("Work");
});
modelBuilder.Entity("PARR.DAL.Models.Host", b =>
{
b.HasOne("PARR.DAL.Models.Host", null)
.WithMany("Hosts")
.HasForeignKey("HostId");
});
modelBuilder.Entity("PARR.DAL.Models.Subprocess", b =>
{
b.HasOne("PARR.DAL.Models.Process", "Process")
@@ -1074,6 +1091,12 @@ namespace PARR.DAL.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("PARR.DAL.Models.Host", "Host")
.WithMany()
.HasForeignKey("HostId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("PARR.DAL.Models.StatusTemplate", "StatusTemplate")
.WithMany("Templates")
.HasForeignKey("StatusCode")
@@ -1082,6 +1105,8 @@ namespace PARR.DAL.Migrations
b.Navigation("ApplicationsInWork");
b.Navigation("Host");
b.Navigation("StatusTemplate");
});
@@ -1226,6 +1251,8 @@ namespace PARR.DAL.Migrations
modelBuilder.Entity("PARR.DAL.Models.Host", b =>
{
b.Navigation("ApplicationsInHosts");
b.Navigation("Hosts");
});
modelBuilder.Entity("PARR.DAL.Models.Process", b =>