* rename collection type * split collections into separate pages * add rerun collection types, migration, editor * add rerun to classic schedule items * rerun plumbing in classic playout builder * start to implement rerun enumerator * add scheduledAt to enumerator movenext * maintain rerun history in db * fix shuffle * fix rerun allowed playback orders * fix updating rerun collections * update changelog; fix editing * update changelog
29 lines
897 B
C#
29 lines
897 B
C#
using ErsatzTV.Core.Domain.Scheduling;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace ErsatzTV.Infrastructure.Data.Configurations.Scheduling;
|
|
|
|
public class RerunHistoryConfiguration : IEntityTypeConfiguration<RerunHistory>
|
|
{
|
|
public void Configure(EntityTypeBuilder<RerunHistory> builder)
|
|
{
|
|
builder.ToTable("RerunHistory");
|
|
|
|
builder.HasOne(p => p.Playout)
|
|
.WithMany()
|
|
.HasForeignKey(pi => pi.PlayoutId)
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
builder.HasOne(p => p.RerunCollection)
|
|
.WithMany()
|
|
.HasForeignKey(pi => pi.RerunCollectionId)
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
builder.HasOne(p => p.MediaItem)
|
|
.WithMany()
|
|
.HasForeignKey(pi => pi.MediaItemId)
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
}
|
|
}
|