WebPush-and-photo-upload-fixes
This commit is contained in:
40
LittleShop/DTOs/PushSubscriptionDto.cs
Normal file
40
LittleShop/DTOs/PushSubscriptionDto.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user