Push notifications

This commit is contained in:
2023-12-18 12:19:09 +00:00
parent d087850f69
commit 053d34cde7
19 changed files with 1175 additions and 4 deletions

View File

@ -0,0 +1,32 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace NostrStreamer.Database.Configuration;
public class PushSubscriptionConfiguration : IEntityTypeConfiguration<PushSubscription>
{
public void Configure(EntityTypeBuilder<PushSubscription> builder)
{
builder.HasKey(a => a.Id);
builder.Property(a => a.Created)
.IsRequired();
builder.Property(a => a.LastUsed)
.IsRequired();
builder.Property(a => a.Pubkey)
.IsRequired();
builder.Property(a => a.Endpoint)
.IsRequired();
builder.Property(a => a.Auth)
.IsRequired();
builder.Property(a => a.Key)
.IsRequired();
builder.Property(a => a.Scope)
.IsRequired();
}
}