Stream forwarding

This commit is contained in:
2023-12-07 22:46:36 +00:00
parent 1ad5186aff
commit cef1b845bc
17 changed files with 594 additions and 10 deletions

View File

@ -0,0 +1,19 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace NostrStreamer.Database.Configuration;
public class UserStreamForwardsConfiguration : IEntityTypeConfiguration<UserStreamForwards>
{
public void Configure(EntityTypeBuilder<UserStreamForwards> builder)
{
builder.HasKey(a => a.Id);
builder.Property(a => a.Name);
builder.Property(a => a.Target);
builder.HasOne(a => a.User)
.WithMany(a => a.Forwards)
.HasForeignKey(a => a.UserPubkey)
.HasPrincipalKey(a => a.PubKey);
}
}