using ROLAC.API.Entities; namespace ROLAC.API.Entities.Notifications; /// /// A browser/device Web Push subscription owned by a member. Unlike /// (one external id per channel), web push needs the endpoint URL plus two keys, and a member can /// have several — one per device/browser they enable notifications on. Targeting a member resolves /// all of their subscriptions. /// public class WebPushSubscription { public int Id { get; set; } public int MemberId { get; set; } public Member? Member { get; set; } /// The push service endpoint URL (unique per subscription). public string Endpoint { get; set; } = null!; /// The subscription's P-256 ECDH public key (base64url). public string P256dh { get; set; } = null!; /// The subscription's auth secret (base64url). public string Auth { get; set; } = null!; /// The originating user agent, kept for display/debugging. public string? UserAgent { get; set; } public DateTime CreatedAt { get; set; } /// Last time a push to this subscription succeeded. public DateTime? LastUsedAt { get; set; } }