40 lines
987 B
C#
40 lines
987 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace SPMS.Application.DTOs.Stats;
|
|
|
|
public class FailureStatResponseDto
|
|
{
|
|
[JsonPropertyName("total_fail")]
|
|
public int TotalFail { get; set; }
|
|
|
|
[JsonPropertyName("period")]
|
|
public FailureStatPeriodDto Period { get; set; } = new();
|
|
|
|
[JsonPropertyName("items")]
|
|
public List<FailureStatItemDto> Items { get; set; } = new();
|
|
}
|
|
|
|
public class FailureStatPeriodDto
|
|
{
|
|
[JsonPropertyName("start_date")]
|
|
public string StartDate { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("end_date")]
|
|
public string EndDate { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class FailureStatItemDto
|
|
{
|
|
[JsonPropertyName("fail_reason")]
|
|
public string FailReason { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("count")]
|
|
public int Count { get; set; }
|
|
|
|
[JsonPropertyName("ratio")]
|
|
public double Ratio { get; set; }
|
|
|
|
[JsonPropertyName("description")]
|
|
public string Description { get; set; } = string.Empty;
|
|
}
|