feat(api): изменены респонсы Job и JobGroup.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
namespace PARR.API.Contracts.V1.Requests.Queries
|
||||
using PARR.API.Contracts.V1.Requests.BaseRequests;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Requests.Queries
|
||||
{
|
||||
public class JobQuery
|
||||
public class JobQuery : FullQuery
|
||||
{
|
||||
/// <summary>
|
||||
/// Поиск по имени
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using PARR.DAL.Models.Job;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Responses
|
||||
namespace PARR.API.Contracts.V1.Responses
|
||||
{
|
||||
public class JobBaseResponse
|
||||
{
|
||||
@@ -10,24 +8,65 @@ namespace PARR.API.Contracts.V1.Responses
|
||||
|
||||
public required string TemplateNameMask { get; set; }
|
||||
|
||||
public TnkResponse? Tnk { get; set; }
|
||||
public JobGroupBaseResponse? Group { get; set; }
|
||||
public required string WorkName { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class JobResponse : JobBaseResponse
|
||||
{
|
||||
public int TemplatesCount { get; set; }
|
||||
|
||||
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 TemplateStats? TemplateStatistics { get; set; }
|
||||
|
||||
public ScheduleStats? ScheduleStatistics { 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>
|
||||
@@ -32,9 +32,9 @@
|
||||
|
||||
public bool IsAutoDistributionEnabled { get; set; }
|
||||
|
||||
public UnitBaseResponse? Unit { get; set; }
|
||||
public UnitResponse? Unit { get; set; }
|
||||
|
||||
public JobBaseResponse? Job { get; set; }
|
||||
public JobResponse? Job { get; set; }
|
||||
|
||||
public ProcessResponse? Process { get; set; }
|
||||
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
/// <summary>
|
||||
/// Response с всеми аттребутами и их значениями
|
||||
/// </summary>
|
||||
public class UnitWithAttributesResponse : UnitBaseResponse
|
||||
public class UnitWithAttributesResponse : UnitResponse
|
||||
{
|
||||
public DateTimeOffset? LastLogon { get; set; }
|
||||
|
||||
public List<AttributeResponse>? Attributes { get; set; }
|
||||
|
||||
public List<UnitBaseResponse>? Parents { get; set; }
|
||||
public List<UnitResponse>? Parents { get; set; }
|
||||
|
||||
public List<UnitBaseResponse>? Childrens { get; set; }
|
||||
public List<UnitResponse>? Childrens { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user