52 lines
1.9 KiB
C#
52 lines
1.9 KiB
C#
namespace PARR.API.Contracts.V1.Responses.Statistics
|
||
{
|
||
public class StatTemplateDistributorResponse
|
||
{
|
||
public required JobGroupWithDistributionConfigResponse JobGroup { get; set; }
|
||
|
||
/// <summary>
|
||
/// Всего шаблонов
|
||
/// </summary>
|
||
public int AllCount => ItemsList?.Sum(t => t.AllCount) ?? 0;
|
||
|
||
/// <summary>
|
||
/// Всего шаблонов с активированными шаблонами и расписаниями
|
||
/// </summary>
|
||
public int IsActivatedAllCount => ItemsList?.Sum(t => t.IsActivatedCount) ?? 0;
|
||
|
||
/// <summary>
|
||
/// Всего шаблонов с деактивированными шаблонами и/или расписаниями
|
||
/// </summary>
|
||
public int IsDeactivatedAllCount => ItemsList?.Sum(t => t.IsDeactivatedCount) ?? 0;
|
||
|
||
public List<StatDistributorItemResponse>? ItemsList { get; set; }
|
||
}
|
||
|
||
public class StatDistributorItemResponse
|
||
{
|
||
public string? WorkGroupName { get; set; }
|
||
|
||
public int AllCount => Statistics?.Sum(t => t.AllCount) ?? 0;
|
||
public int IsActivatedCount => Statistics?.Sum(t => t.IsActivatedCount) ?? 0;
|
||
public int IsDeactivatedCount => Statistics?.Sum(t => t.IsDeactivatedCount) ?? 0;
|
||
|
||
public List<StatTemplateDistributorDateStat>? Statistics { get; set; }
|
||
}
|
||
|
||
public class StatTemplateDistributorDateStat
|
||
{
|
||
public DateOnly Date { get; set; }
|
||
public int AllCount { get; set; }
|
||
public int IsActivatedCount { get; set; }
|
||
public int IsDeactivatedCount { get; set; }
|
||
public List<StatTempleteDistribItem>? Templates { get; set; }
|
||
}
|
||
|
||
public class StatTempleteDistribItem
|
||
{
|
||
public required string Name { get; set; }
|
||
public bool IsActiveTemplate { get; set; }
|
||
public bool IsActiveSchedular { get; set; }
|
||
}
|
||
}
|