91 lines
2.6 KiB
C#
91 lines
2.6 KiB
C#
using PARR.Domain.Enums;
|
||
|
||
namespace PARR.API.Contracts.V1.Responses.Statistics
|
||
{
|
||
/// <summary>
|
||
/// Response отчета о загруженности
|
||
/// </summary>
|
||
public record StatWorkloadReportResponse
|
||
{
|
||
/// <summary>
|
||
/// Тип отчета (все ЗО, все РГ, одна ЗО, одна РГ)
|
||
/// </summary>
|
||
public WorkloadReportType Type { get; init; }
|
||
|
||
/// <summary>
|
||
/// Название отчета (По всем ЗО, по одной ЗО)
|
||
/// </summary>
|
||
public required string DisplayName { get; init; }
|
||
|
||
/// <summary>
|
||
/// Подзаголовок, наименование конкретной ЗО/РГ
|
||
/// </summary>
|
||
public string? SubfilterName { get; init; }
|
||
|
||
/// <summary>
|
||
/// Дата формирования отчета
|
||
/// </summary>
|
||
public DateTimeOffset ReportCacheCreatedAt { get; init; }
|
||
|
||
/// <summary>
|
||
/// Дата формирования кэша ЗО и РГ
|
||
/// </summary>
|
||
public DateTimeOffset TemplateCacheCreatedAt { get; init; }
|
||
|
||
/// <summary>
|
||
/// Список дней
|
||
/// </summary>
|
||
public required List<WorkloadDayItemResponse> Days { get; init; }
|
||
|
||
/// <summary>
|
||
/// Нагруженность
|
||
/// </summary>
|
||
public required List<WorkloadStatisticItemResponse> Statistics { get; init; }
|
||
}
|
||
|
||
public record WorkloadSummaryResponse
|
||
{
|
||
public required WorkloadSummaryItemResponse Total { get; init; }
|
||
|
||
public required WorkloadSummaryItemResponse Activated { get; init; }
|
||
|
||
public required WorkloadSummaryItemResponse Deactivated { get; init; }
|
||
}
|
||
|
||
public record WorkloadSummaryItemResponse
|
||
{
|
||
public int Count { get; init; }
|
||
|
||
public double Average { get; init; }
|
||
}
|
||
|
||
public record WorkloadDayItemResponse
|
||
{
|
||
public DateOnly Date { get; init; }
|
||
|
||
public bool IsWeekend { get; init; }
|
||
}
|
||
|
||
public record WorkloadStatisticItemResponse
|
||
{
|
||
public required string Title { get; init; }
|
||
|
||
public required WorkloadSummaryResponse Summary { get; init; }
|
||
|
||
public required List<WorkloadDailyItemResponse> DailyMetrics { get; init; }
|
||
}
|
||
|
||
public record WorkloadDailyItemResponse
|
||
{
|
||
public DateOnly Date { get; init; }
|
||
|
||
public bool IsWeekend { get; init; }
|
||
|
||
public int Total { get; init; }
|
||
|
||
public int Activated { get; init; }
|
||
|
||
public int Deactivated { get; init; }
|
||
}
|
||
}
|