68 lines
1.7 KiB
C#
68 lines
1.7 KiB
C#
using PARR.DAL.Models.Job;
|
||
|
||
namespace PARR.API.Contracts.V1.Responses
|
||
{
|
||
public class JobBaseResponse
|
||
{
|
||
public Guid Id { get; set; }
|
||
|
||
public required string Name { get; set; }
|
||
|
||
public required string TemplateNameMask { get; set; }
|
||
|
||
public TnkResponse? Tnk { get; set; }
|
||
public JobGroupBaseResponse? Group { get; set; }
|
||
}
|
||
|
||
public class JobResponse : JobBaseResponse
|
||
{
|
||
public int TemplatesCount { get; set; }
|
||
|
||
#region Статистика
|
||
|
||
public TemplateStats? TemplateStatistics { get; set; }
|
||
|
||
public ScheduleStats? ScheduleStatistics { get; set; }
|
||
|
||
#endregion
|
||
}
|
||
|
||
|
||
public class TemplateStats
|
||
{
|
||
/// <summary>
|
||
/// Активированных шаблонов
|
||
/// </summary>
|
||
public int Activated { get; set; }
|
||
|
||
/// <summary>
|
||
/// Синхронизировано шаблонов (TaskStatus = 30/Ok)
|
||
/// </summary>
|
||
public int Synchronized { get; set; }
|
||
|
||
/// <summary>
|
||
/// Ошибок синхронизации (RobotStatus = 33/Error)
|
||
/// </summary>
|
||
public int Errors { get; set; }
|
||
}
|
||
|
||
|
||
public class ScheduleStats
|
||
{
|
||
/// <summary>
|
||
/// Активированных шаблонов
|
||
/// </summary>
|
||
public int Activated { get; set; }
|
||
|
||
/// <summary>
|
||
/// Синхронизировано шаблонов (TaskStatus = 30/Ok)
|
||
/// </summary>
|
||
public int Synchronized { get; set; }
|
||
|
||
/// <summary>
|
||
/// Ошибок синхронизации (RobotStatus = 33/Error)
|
||
/// </summary>
|
||
public int Errors { get; set; }
|
||
}
|
||
}
|