Files
zap-stream-api/NostrStreamer/Database/Configuration/PushSubscriptionConfiguration.cs
2023-12-18 12:19:09 +00:00

33 lines
842 B
C#

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();
}
}