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

@@ -0,0 +1,33 @@
using PARR.DAL.Models.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models
{
/// <summary>
/// История работы агентов
/// </summary>
[Table("AgentHistories")]
public class AgentHistory : IBase
{
[Key]
public Guid Id { get; set; }
public DateTimeOffset DateCreated { get; set; }
[NotMapped]
public DateTimeOffset? DateModified { get; set; }
public string? Message { get; set; }
public int HistoryLevelId { get; set; }
public Guid TemplateId { get; set; }
[ForeignKey(nameof(TemplateId))]
public Template? Template { get; set; }
[ForeignKey(nameof(HistoryLevelId))]
public AgentHistoryLevel? AgentHistoryLevel { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models
{
[Table("AgentHistoryLevels")]
public class AgentHistoryLevel
{
[Key]
public int Id { get; set; }
public required string Name { get; set; }
public required string Description { get; set; }
public ICollection<AgentHistory> AgentHistories { get; set; } = new HashSet<AgentHistory>();
}
}

View File

@@ -25,7 +25,7 @@ namespace PARR.DAL.Models
/// <summary>
/// Номер расписания еспп
/// </summary>
public string? ScheduleEsppId { get; set; }
public string? ScheduleEsppId { get; set; }
///// <summary>
@@ -51,5 +51,7 @@ namespace PARR.DAL.Models
public ICollection<RobotConfiguration> RobotConfigurations { get; set; } = new HashSet<RobotConfiguration>();
public ICollection<AgentHistory> AgentHistories { get; set; } = new HashSet<AgentHistory>();
}
}