feat(api): AgentTask, AgentHistory
This commit is contained in:
@@ -369,6 +369,68 @@ namespace PARR.DAL.Migrations
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.AgentHistory", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("DateCreated")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("HistoryLevelId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Message")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid>("TemplateId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("HistoryLevelId");
|
||||
|
||||
b.HasIndex("TemplateId");
|
||||
|
||||
b.ToTable("AgentHistories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.AgentHistoryLevel", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AgentHistoryLevels");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
Description = "Агент начал выполнять задание",
|
||||
Name = "Start"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 5,
|
||||
Description = "Агент завершил выполнение задания",
|
||||
Name = "End"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Application", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@@ -2066,6 +2128,25 @@ namespace PARR.DAL.Migrations
|
||||
b.ToTable("Works");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.AgentHistory", b =>
|
||||
{
|
||||
b.HasOne("PARR.DAL.Models.AgentHistoryLevel", "AgentHistoryLevel")
|
||||
.WithMany("AgentHistories")
|
||||
.HasForeignKey("HistoryLevelId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PARR.DAL.Models.Template", "Template")
|
||||
.WithMany("AgentHistories")
|
||||
.HasForeignKey("TemplateId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("AgentHistoryLevel");
|
||||
|
||||
b.Navigation("Template");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Application", b =>
|
||||
{
|
||||
b.HasOne("PARR.DAL.Models.ApplicationType", "ApplicationType")
|
||||
@@ -2305,6 +2386,11 @@ namespace PARR.DAL.Migrations
|
||||
b.Navigation("Tnk");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.AgentHistoryLevel", b =>
|
||||
{
|
||||
b.Navigation("AgentHistories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Application", b =>
|
||||
{
|
||||
b.Navigation("ApplicationsInHosts");
|
||||
@@ -2402,6 +2488,8 @@ namespace PARR.DAL.Migrations
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Template", b =>
|
||||
{
|
||||
b.Navigation("AgentHistories");
|
||||
|
||||
b.Navigation("RobotConfigurations");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user