31 lines
844 B
C#
31 lines
844 B
C#
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; }
|
|
} |