Files
zap-stream-api/NostrStreamer/Database/Configuration/UserConfiguration.cs
Kieran 7ca87a6181 TOS
Bugfix stream editor
2023-08-01 15:35:11 +01:00

27 lines
700 B
C#

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace NostrStreamer.Database.Configuration;
public class UserConfiguration : IEntityTypeConfiguration<User>
{
public void Configure(EntityTypeBuilder<User> builder)
{
builder.HasKey(a => a.PubKey);
builder.Property(a => a.StreamKey)
.IsRequired();
builder.Property(a => a.Balance)
.IsRequired();
builder.Property(a => a.TosAccepted)
.IsRequired();
builder.Property(a => a.Version)
.IsRowVersion();
builder.Property(a => a.Tags);
builder.Property(a => a.ContentWarning);
}
}