V2 upgrade

This commit is contained in:
2023-07-25 17:45:44 +01:00
parent dae8f99d33
commit 3c16cb51d4
41 changed files with 2056 additions and 427 deletions

View File

@ -0,0 +1,30 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace NostrStreamer.Database.Configuration;
public class IngestEndpointConfiguration : IEntityTypeConfiguration<IngestEndpoint>
{
public void Configure(EntityTypeBuilder<IngestEndpoint> builder)
{
builder.HasKey(a => a.Id);
builder.Property(a => a.Name)
.IsRequired();
builder.Property(a => a.App)
.IsRequired();
builder.Property(a => a.Forward)
.IsRequired();
builder.Property(a => a.Cost)
.IsRequired();
builder.Property(a => a.Capabilities)
.IsRequired();
builder.HasIndex(a => a.App)
.IsUnique();
}
}