SPMS_API/SPMS.Application/DTOs/Stats/HistoryDetailResponseDto.cs
SEAN 347c9aa4bf improvement: 이력 목록/상세 API 추가 (#233)
- POST /v1/in/stats/history/list: 메시지별 발송 이력 목록 조회
  (keyword/status/date 필터, 페이지네이션)
- POST /v1/in/stats/history/detail: 특정 메시지 상세 이력 조회
  (기본정보+집계+실패사유 Top 5+본문)
- SendStatus.Determine() 규칙 재사용

Closes #233
2026-02-25 16:23:11 +09:00

61 lines
1.6 KiB
C#

using System.Text.Json.Serialization;
namespace SPMS.Application.DTOs.Stats;
public class HistoryDetailResponseDto
{
[JsonPropertyName("message_code")]
public string MessageCode { get; set; } = string.Empty;
[JsonPropertyName("title")]
public string Title { get; set; } = string.Empty;
[JsonPropertyName("body")]
public string Body { get; set; } = string.Empty;
[JsonPropertyName("service_name")]
public string ServiceName { get; set; } = string.Empty;
[JsonPropertyName("first_sent_at")]
public DateTime? FirstSentAt { get; set; }
[JsonPropertyName("last_sent_at")]
public DateTime? LastSentAt { get; set; }
[JsonPropertyName("status")]
public string Status { get; set; } = string.Empty;
[JsonPropertyName("target_count")]
public int TargetCount { get; set; }
[JsonPropertyName("success_count")]
public int SuccessCount { get; set; }
[JsonPropertyName("fail_count")]
public int FailCount { get; set; }
[JsonPropertyName("success_rate")]
public double SuccessRate { get; set; }
[JsonPropertyName("open_count")]
public int OpenCount { get; set; }
[JsonPropertyName("open_rate")]
public double OpenRate { get; set; }
[JsonPropertyName("fail_reasons")]
public List<HistoryFailReasonDto> FailReasons { get; set; } = [];
}
public class HistoryFailReasonDto
{
[JsonPropertyName("reason")]
public string Reason { get; set; } = string.Empty;
[JsonPropertyName("count")]
public int Count { get; set; }
[JsonPropertyName("description")]
public string Description { get; set; } = string.Empty;
}