SPMS_API/SPMS.Application/DTOs/Service/PlatformSummaryDto.cs
SEAN e3ed3d4267 improvement: 서비스 목록/상세 응답에 플랫폼 상태 판정 추가 (#216)
- PlatformSummaryDto / PlatformCredentialSummaryDto 신규 생성
- ServiceSummaryDto에 Platforms 필드 추가 (목록 응답)
- ServiceResponseDto에 ApnsAuthType + Platforms 필드 추가 (상세 응답)
- BuildPlatformSummary 메서드로 Android/iOS 상태 판정
  - Android: FcmCredentials 유무 → ok/none
  - iOS p8: → ok
  - iOS p12: 만료됨→error, 30일 이내→warn, 그 외→ok
- Swagger Description 업데이트

Closes #216
2026-02-25 13:21:30 +09:00

34 lines
873 B
C#

namespace SPMS.Application.DTOs.Service;
/// <summary>
/// 서비스의 플랫폼(Android/iOS) 자격증명 상태 요약
/// </summary>
public class PlatformSummaryDto
{
public PlatformCredentialSummaryDto? Android { get; set; }
public PlatformCredentialSummaryDto? Ios { get; set; }
}
/// <summary>
/// 개별 플랫폼 자격증명 상태
/// </summary>
public class PlatformCredentialSummaryDto
{
public bool Registered { get; set; }
/// <summary>
/// 자격증명 상태: ok | warn | error | none
/// </summary>
public string CredentialStatus { get; set; } = "none";
/// <summary>
/// 상태 사유 (warn/error 시 표시)
/// </summary>
public string? StatusReason { get; set; }
/// <summary>
/// p12 인증서 만료일 (p12 타입만 해당)
/// </summary>
public DateTime? ExpiresAt { get; set; }
}