WebPush-and-photo-upload-fixes

This commit is contained in:
sysadmin
2025-09-01 06:01:05 +01:00
parent 5eb7647faf
commit c8a55c143b
16 changed files with 2000 additions and 6 deletions

View 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; }
}