feat(api): AgentTask, AgentHistory

This commit is contained in:
Mikhail Trubnikov
2023-10-19 11:22:35 +10:00
parent 5a40e5c1c1
commit b3b3cc8e0d
21 changed files with 3031 additions and 3 deletions

View File

@@ -43,6 +43,9 @@ namespace PARR.DAL.Context
public DbSet<EsppSchTypeSchedule> EsppSchTypeSchedules { get; set; }
public DbSet<EsppSchValue> EsppSchValues { get; set; }
public DbSet<AgentHistory> AgentHistories { get; set; }
public DbSet<AgentHistoryLevel> AgentHistoryLevels { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
@@ -318,6 +321,14 @@ namespace PARR.DAL.Context
#endregion
modelBuilder.Entity<AgentHistoryLevel>(f =>
{
f.HasData(
new { Id = (int)AgentHistoryLevelEnum.Start, Name = AgentHistoryLevelEnum.Start.ToString(), Description= "Агент начал выполнять задание" },
new { Id = (int)AgentHistoryLevelEnum.End, Name = AgentHistoryLevelEnum.End.ToString(), Description = "Агент завершил выполнение задания" }
);
});
}