SPMS_API/SPMS.Application/DTOs/Stats/DeviceStatResponseDto.cs
seonkyu.kim 0911fc763a feat: 통계 API 구현 (8.1~8.5) (#132)
- POST /v1/in/stats/daily: 기간별 일별 통계
- POST /v1/in/stats/summary: 대시보드 요약 통계
- POST /v1/in/stats/message: 메시지별 발송 통계
- POST /v1/in/stats/hourly: 시간대별 발송 추이
- POST /v1/in/stats/device: 디바이스 분포 통계
- IDailyStatRepository, DailyStatRepository 신규
- IPushSendLogRepository 통계 메서드 확장

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 23:08:04 +09:00

55 lines
1.2 KiB
C#

using System.Text.Json.Serialization;
namespace SPMS.Application.DTOs.Stats;
public class DeviceStatResponseDto
{
[JsonPropertyName("total")]
public int Total { get; set; }
[JsonPropertyName("by_platform")]
public List<PlatformStatDto> ByPlatform { get; set; } = [];
[JsonPropertyName("by_push_agreed")]
public List<PushAgreedStatDto> ByPushAgreed { get; set; } = [];
[JsonPropertyName("by_tag")]
public List<TagStatDto> ByTag { get; set; } = [];
}
public class PlatformStatDto
{
[JsonPropertyName("platform")]
public string Platform { get; set; } = string.Empty;
[JsonPropertyName("count")]
public int Count { get; set; }
[JsonPropertyName("ratio")]
public double Ratio { get; set; }
}
public class PushAgreedStatDto
{
[JsonPropertyName("agreed")]
public bool Agreed { get; set; }
[JsonPropertyName("count")]
public int Count { get; set; }
[JsonPropertyName("ratio")]
public double Ratio { get; set; }
}
public class TagStatDto
{
[JsonPropertyName("tag_index")]
public int TagIndex { get; set; }
[JsonPropertyName("tag_name")]
public string TagName { get; set; } = string.Empty;
[JsonPropertyName("count")]
public int Count { get; set; }
}