- TopMessageDto에 status 필드 추가 (SendStatus.Determine 적용) - 대시보드/이력 간 동일 건의 상태 라벨 일치 보장 Closes #193
76 lines
2.0 KiB
C#
76 lines
2.0 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace SPMS.Application.DTOs.Stats;
|
|
|
|
public class DashboardResponseDto
|
|
{
|
|
[JsonPropertyName("kpi")]
|
|
public DashboardKpiDto Kpi { get; set; } = new();
|
|
|
|
[JsonPropertyName("daily")]
|
|
public List<DailyStatItemDto> Daily { get; set; } = [];
|
|
|
|
[JsonPropertyName("hourly")]
|
|
public List<HourlyStatItemDto> Hourly { get; set; } = [];
|
|
|
|
[JsonPropertyName("platform_share")]
|
|
public List<PlatformStatDto> PlatformShare { get; set; } = [];
|
|
|
|
[JsonPropertyName("top_messages")]
|
|
public List<TopMessageDto> TopMessages { get; set; } = [];
|
|
}
|
|
|
|
public class DashboardKpiDto
|
|
{
|
|
[JsonPropertyName("total_devices")]
|
|
public int TotalDevices { get; set; }
|
|
|
|
[JsonPropertyName("active_devices")]
|
|
public int ActiveDevices { get; set; }
|
|
|
|
[JsonPropertyName("total_messages")]
|
|
public int TotalMessages { get; set; }
|
|
|
|
[JsonPropertyName("total_send")]
|
|
public long TotalSend { get; set; }
|
|
|
|
[JsonPropertyName("total_success")]
|
|
public long TotalSuccess { get; set; }
|
|
|
|
[JsonPropertyName("total_open")]
|
|
public long TotalOpen { get; set; }
|
|
|
|
[JsonPropertyName("avg_ctr")]
|
|
public double AvgCtr { get; set; }
|
|
|
|
[JsonPropertyName("active_service_count")]
|
|
public int ActiveServiceCount { get; set; }
|
|
|
|
[JsonPropertyName("today")]
|
|
public PeriodStatDto Today { get; set; } = new();
|
|
|
|
[JsonPropertyName("this_month")]
|
|
public PeriodStatDto ThisMonth { get; set; } = new();
|
|
}
|
|
|
|
public class TopMessageDto
|
|
{
|
|
[JsonPropertyName("message_code")]
|
|
public string MessageCode { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("title")]
|
|
public string Title { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("service_name")]
|
|
public string ServiceName { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("total_send_count")]
|
|
public int TotalSendCount { get; set; }
|
|
|
|
[JsonPropertyName("success_count")]
|
|
public int SuccessCount { get; set; }
|
|
|
|
[JsonPropertyName("status")]
|
|
public string Status { get; set; } = string.Empty;
|
|
}
|