WebPush-and-photo-upload-fixes
This commit is contained in:
31
LittleShop/Models/PushSubscription.cs
Normal file
31
LittleShop/Models/PushSubscription.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace LittleShop.Models;
|
||||
|
||||
public class PushSubscription
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[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 Guid? UserId { get; set; }
|
||||
public User? User { get; set; }
|
||||
|
||||
public Guid? CustomerId { get; set; }
|
||||
public Customer? Customer { get; set; }
|
||||
|
||||
public DateTime SubscribedAt { get; set; } = DateTime.UtcNow;
|
||||
public DateTime? LastUsedAt { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
|
||||
// Browser/device information for identification
|
||||
public string? UserAgent { get; set; }
|
||||
public string? IpAddress { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user