feat(api): AgentTask, AgentHistory
This commit is contained in:
33
PARR.DAL/Models/AgentHistory.cs
Normal file
33
PARR.DAL/Models/AgentHistory.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
19
PARR.DAL/Models/AgentHistoryLevel.cs
Normal file
19
PARR.DAL/Models/AgentHistoryLevel.cs
Normal 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>();
|
||||
}
|
||||
}
|
||||
@@ -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>();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user