aboutsummaryrefslogtreecommitdiff
path: root/src/Enmarcha.Backend/Data/Models/PushSubscription.cs
blob: c72c40f7a62945cd3d2915c55a834d3623312099 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using System.ComponentModel.DataAnnotations.Schema;

namespace Enmarcha.Backend.Data.Models;

[Table("push_subscriptions")]
public class PushSubscription
{
    public Guid Id { get; set; }

    /// <summary>Push endpoint URL provided by the browser's push service.</summary>
    public string Endpoint { get; set; } = string.Empty;

    /// <summary>P-256 DH public key for payload encryption (base64url).</summary>
    [Column("p256dh_key")] public string P256DhKey { get; set; } = string.Empty;

    /// <summary>Auth secret for payload encryption (base64url).</summary>
    [Column("auth_key")] public string AuthKey { get; set; } = string.Empty;

    [Column("created_at")] public DateTime CreatedAt { get; set; }
}