using PARR.Domain.Enums.Workload;
namespace PARR.API.Contracts.V1.Responses.Statistics
{
///
/// Response отчета о загруженности
///
public record StatWorkloadReportResponse
{
///
/// Тип отчета (все ЗО, все РГ, одна ЗО, одна РГ)
///
public WorkloadReportType Type { get; init; }
///
/// Название отчета (По всем ЗО, по одной ЗО)
///
public required string DisplayName { get; init; }
///
/// Подзаголовок, наименование конкретной ЗО/РГ
///
public string? SubfilterName { get; init; }
///
/// Дата формирования отчета
///
public DateTimeOffset ReportCacheCreatedAt { get; init; }
///
/// Дата формирования кэша ЗО и РГ
///
public DateTimeOffset TemplateCacheCreatedAt { get; init; }
///
/// Список дней
///
public required List Days { get; init; }
///
/// Нагруженность
///
public required List 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 int Max { 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 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; }
}
}