40 lines
896 B
C#
40 lines
896 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace LittleShop.DTOs;
|
|
|
|
public class PushSubscriptionDto
|
|
{
|
|
[Required]
|
|
public string Endpoint { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public string P256DH { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public string Auth { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class PushNotificationDto
|
|
{
|
|
[Required]
|
|
public string Title { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public string Body { get; set; } = string.Empty;
|
|
|
|
public string? Icon { get; set; }
|
|
public string? Badge { get; set; }
|
|
public string? Url { get; set; }
|
|
public object? Data { get; set; }
|
|
}
|
|
|
|
public class TestPushNotificationDto
|
|
{
|
|
[Required]
|
|
public string Title { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public string Body { get; set; } = string.Empty;
|
|
|
|
public string? UserId { get; set; }
|
|
} |