AcaMate_API/Program/V1/Models/PushPayload.cs
2024-11-30 01:09:51 +09:00

35 lines
999 B
C#

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;
}
public Alert alert { get; set; }
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
{
public string title { get; set; } // 제목
public string body { get; set; } // 내용
public string? subtitle { get; set; } // 부제목 (선택)
}