feat(api): изменены респонсы Job и JobGroup.
This commit is contained in:
106
PARR.API/Contracts/V1/Responses/JobResponse.cs
Normal file
106
PARR.API/Contracts/V1/Responses/JobResponse.cs
Normal file
@@ -0,0 +1,106 @@
|
||||
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 required string WorkName { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class JobResponse : JobBaseResponse
|
||||
{
|
||||
|
||||
public TnkResponse? Tnk { get; set; }
|
||||
|
||||
public JobGroupBaseResponse? Group { get; set; }
|
||||
|
||||
public int? TemplatesCount { get; set; }
|
||||
|
||||
public List<UnitFilterResponse>? UnitFilters { get; set; }
|
||||
|
||||
#region Статистика
|
||||
|
||||
//public TemplateStats? TemplateStatistics { get; set; }
|
||||
|
||||
//public ScheduleStats? ScheduleStatistics { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
public class UnitFilterResponse
|
||||
{
|
||||
public required string UnitFilterMask { get; set; }
|
||||
|
||||
public List<FieldFilterResponse>? FieldFilters { get; set; }
|
||||
|
||||
public List<RelationshipFilterResponse>? RelationshipFilters { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class FieldFilterResponse
|
||||
{
|
||||
public required FieldResponse Field { get; set; }
|
||||
|
||||
public string? ValueMask { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class RelationshipFilterResponse
|
||||
{
|
||||
public required FieldResponse Field { get; set; }
|
||||
|
||||
public bool? IsParent { get; set; }
|
||||
|
||||
public string? ValueMask { get; set; }
|
||||
|
||||
public bool? IsFullMatch { get; set; }
|
||||
|
||||
public bool? IsInverse { get; set; }
|
||||
}
|
||||
|
||||
|
||||
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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user