2026-06-04 17:20:16 +10:00
|
|
|
|
using PARR.Domain.Enums.Workload;
|
2026-05-07 10:33:53 +10:00
|
|
|
|
|
|
|
|
|
|
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; }
|
2026-05-12 10:41:02 +10:00
|
|
|
|
|
|
|
|
|
|
public int Max { get; init; }
|
2026-05-07 10:33:53 +10:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public record WorkloadDayItemResponse
|
|
|
|
|
|
{
|
|
|
|
|
|
public DateOnly Date { get; init; }
|
|
|
|
|
|
|
|
|
|
|
|
public bool IsWeekend { get; init; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public record WorkloadStatisticItemResponse
|
|
|
|
|
|
{
|
|
|
|
|
|
public required string Title { get; init; }
|
|
|
|
|
|
|
2026-06-05 10:28:15 +10:00
|
|
|
|
public Guid? ObjId { get; init; }
|
|
|
|
|
|
|
2026-05-07 10:33:53 +10:00
|
|
|
|
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; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|