using System.ComponentModel.DataAnnotations; using System.Security.Cryptography.X509Certificates; namespace AcaMate.V1.Models; public class Payload { public Aps aps { get; set; } // public string customKey { get; set; } 이런식으로 추가도 가능 public string ToJson() { return System.Text.Json.JsonSerializer.Serialize(this); } } public class Aps { public Aps() { sound = "default"; content_available = 1; } [Required(ErrorMessage = "필수 입력 누락 (alert)")] public Alert alert { get; set; } [Required(ErrorMessage = "필수 입력 누락 (badge")] public int badge { get; set; } // 앱 아이콘 표시 배지 숫자 설정 public string sound { get; set; } // 사운드 파일 이름 default = "default" public int content_available { get; set; } // 백그라운드 알림 활성화: 필수 (1) public string? category { get; set; } // 알림에 대한 특정 액션을 정의 } public class Alert { [Required(ErrorMessage = "필수 입력 누락 (title")] public string title { get; set; } // 제목 [Required(ErrorMessage = "필수 입력 누락 (body)")] public string body { get; set; } // 내용 public string? subtitle { get; set; } // 부제목 (선택) } /// /// 푸시 등록하기 위한 여러 데이터 목록 /// public class PushFileSetting { public string uri { get; set; } public string p12Path { get; set; } public string p12PWPath { get; set; } public string apnsTopic { get; set; } } public class PushRequest { public string deviceToken { get; set; } public Payload payload { get; set; } }