- ServiceCodeMiddleware: message/list를 OPTIONAL_FOR_ADMIN에 추가 - MessageListRequestDto: service_code, send_status 필터 필드 추가 - MessageSummaryDto: service_name, service_code, latest_send_status 추가 - IMessageRepository + MessageRepository: GetPagedForListAsync 구현 (Service 조인 + PushSendLog 집계 한 번의 쿼리) - IMessageService + MessageService: serviceId nullable 변경, DetermineSendStatus 헬퍼 - MessageController: GetServiceIdOrNull() 헬퍼 + Swagger 업데이트 Closes #224
38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
using System.Text.Json.Serialization;
|
|
using SPMS.Application.DTOs.Notice;
|
|
|
|
namespace SPMS.Application.DTOs.Message;
|
|
|
|
public class MessageListResponseDto
|
|
{
|
|
[JsonPropertyName("items")]
|
|
public List<MessageSummaryDto> Items { get; set; } = new();
|
|
|
|
[JsonPropertyName("pagination")]
|
|
public PaginationDto Pagination { get; set; } = new();
|
|
}
|
|
|
|
public class MessageSummaryDto
|
|
{
|
|
[JsonPropertyName("message_code")]
|
|
public string MessageCode { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("title")]
|
|
public string Title { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("is_active")]
|
|
public bool IsActive { get; set; }
|
|
|
|
[JsonPropertyName("created_at")]
|
|
public DateTime CreatedAt { get; set; }
|
|
|
|
[JsonPropertyName("service_name")]
|
|
public string ServiceName { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("service_code")]
|
|
public string ServiceCode { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("latest_send_status")]
|
|
public string LatestSendStatus { get; set; } = "pending";
|
|
}
|