Browse Source

cascade more deletes

pull/31/head
Jason Dove 6 years ago
parent
commit
12ba1cf850
  1. 5
      ErsatzTV.Application/Playouts/Mapper.cs
  2. 6
      ErsatzTV.Infrastructure/Data/Configurations/Collection/CollectionConfiguration.cs
  3. 8
      ErsatzTV.Infrastructure/Data/Configurations/MediaItem/MediaFileConfiguration.cs
  4. 4
      ErsatzTV.Infrastructure/Data/Configurations/MediaItem/MediaItemConfiguration.cs
  5. 10
      ErsatzTV.Infrastructure/Data/Configurations/PlayoutItemConfiguration.cs
  6. 2
      ErsatzTV.Infrastructure/Data/Configurations/PlayoutProgramScheduleAnchorConfiguration.cs
  7. 3
      ErsatzTV.Infrastructure/Data/Configurations/ProgramScheduleConfiguration.cs
  8. 2
      ErsatzTV.Infrastructure/Data/Configurations/ProgramScheduleItemConfiguration.cs
  9. 7
      ErsatzTV.Infrastructure/Data/Repositories/PlayoutRepository.cs
  10. 1
      ErsatzTV.Infrastructure/Migrations/20210228114929_Update_MediaVersionDateAdded.cs
  11. 1462
      ErsatzTV.Infrastructure/Migrations/20210228134438_Add_PlayoutDeleteCascades.Designer.cs
  12. 119
      ErsatzTV.Infrastructure/Migrations/20210228134438_Add_PlayoutDeleteCascades.cs
  13. 385
      ErsatzTV.Infrastructure/Migrations/TvContextModelSnapshot.cs

5
ErsatzTV.Application/Playouts/Mapper.cs

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
using System;
using ErsatzTV.Core.Domain;
using ErsatzTV.Core.Domain;
namespace ErsatzTV.Application.Playouts
{
@ -15,7 +14,7 @@ namespace ErsatzTV.Application.Playouts @@ -15,7 +14,7 @@ namespace ErsatzTV.Application.Playouts
internal static PlayoutItemViewModel ProjectToViewModel(PlayoutItem playoutItem) =>
new(
GetDisplayTitle(playoutItem.MediaItem),
new DateTimeOffset(playoutItem.Start, TimeSpan.Zero).ToLocalTime(),
playoutItem.StartOffset,
GetDisplayDuration(playoutItem.MediaItem));
private static PlayoutChannelViewModel Project(Channel channel) =>

6
ErsatzTV.Infrastructure/Data/Configurations/Collection/CollectionConfiguration.cs

@ -15,10 +15,12 @@ namespace ErsatzTV.Infrastructure.Data.Configurations @@ -15,10 +15,12 @@ namespace ErsatzTV.Infrastructure.Data.Configurations
.UsingEntity<CollectionItem>(
j => j.HasOne(ci => ci.MediaItem)
.WithMany(mi => mi.CollectionItems)
.HasForeignKey(ci => ci.MediaItemId),
.HasForeignKey(ci => ci.MediaItemId)
.OnDelete(DeleteBehavior.Cascade),
j => j.HasOne(ci => ci.Collection)
.WithMany(c => c.CollectionItems)
.HasForeignKey(ci => ci.CollectionId),
.HasForeignKey(ci => ci.CollectionId)
.OnDelete(DeleteBehavior.Cascade),
j => j.HasKey(ci => new { ci.CollectionId, ci.MediaItemId }));
}
}

8
ErsatzTV.Infrastructure/Data/Configurations/MediaItem/MediaFileConfiguration.cs

@ -6,6 +6,12 @@ namespace ErsatzTV.Infrastructure.Data.Configurations @@ -6,6 +6,12 @@ namespace ErsatzTV.Infrastructure.Data.Configurations
{
public class MediaFileConfiguration : IEntityTypeConfiguration<MediaFile>
{
public void Configure(EntityTypeBuilder<MediaFile> builder) => builder.ToTable("MediaFile");
public void Configure(EntityTypeBuilder<MediaFile> builder)
{
builder.ToTable("MediaFile");
builder.HasIndex(f => f.Path)
.IsUnique();
}
}
}

4
ErsatzTV.Infrastructure/Data/Configurations/MediaItem/MediaItemConfiguration.cs

@ -7,9 +7,5 @@ namespace ErsatzTV.Infrastructure.Data.Configurations @@ -7,9 +7,5 @@ namespace ErsatzTV.Infrastructure.Data.Configurations
public class MediaItemConfiguration : IEntityTypeConfiguration<MediaItem>
{
public void Configure(EntityTypeBuilder<MediaItem> builder) => builder.ToTable("MediaItem");
// builder.OwnsOne(c => c.Statistics).WithOwner();
//
// builder.HasIndex(i => i.Path)
// .IsUnique();
}
}

10
ErsatzTV.Infrastructure/Data/Configurations/PlayoutItemConfiguration.cs

@ -7,6 +7,14 @@ namespace ErsatzTV.Infrastructure.Data.Configurations @@ -7,6 +7,14 @@ namespace ErsatzTV.Infrastructure.Data.Configurations
public class PlayoutItemConfiguration : IEntityTypeConfiguration<PlayoutItem>
{
public void Configure(EntityTypeBuilder<PlayoutItem> builder) => builder.ToTable("PlayoutItem");
public void Configure(EntityTypeBuilder<PlayoutItem> builder)
{
builder.ToTable("PlayoutItem");
builder.HasOne(pi => pi.MediaItem)
.WithMany()
.HasForeignKey(pi => pi.MediaItemId)
.OnDelete(DeleteBehavior.Cascade);
}
}
}

2
ErsatzTV.Infrastructure/Data/Configurations/PlayoutProgramScheduleAnchorConfiguration.cs

@ -16,11 +16,13 @@ namespace ErsatzTV.Infrastructure.Data.Configurations @@ -16,11 +16,13 @@ namespace ErsatzTV.Infrastructure.Data.Configurations
builder.HasOne(i => i.Collection)
.WithMany()
.HasForeignKey(i => i.CollectionId)
.OnDelete(DeleteBehavior.Cascade)
.IsRequired(false);
builder.HasOne(i => i.MediaItem)
.WithMany()
.HasForeignKey(i => i.MediaItemId)
.OnDelete(DeleteBehavior.Cascade)
.IsRequired(false);
}
}

3
ErsatzTV.Infrastructure/Data/Configurations/ProgramScheduleConfiguration.cs

@ -20,7 +20,8 @@ namespace ErsatzTV.Infrastructure.Data.Configurations @@ -20,7 +20,8 @@ namespace ErsatzTV.Infrastructure.Data.Configurations
builder.HasMany(ps => ps.Playouts)
.WithOne(p => p.ProgramSchedule)
.HasForeignKey(p => p.ProgramScheduleId);
.HasForeignKey(p => p.ProgramScheduleId)
.OnDelete(DeleteBehavior.Cascade);
}
}
}

2
ErsatzTV.Infrastructure/Data/Configurations/ProgramScheduleItemConfiguration.cs

@ -13,11 +13,13 @@ namespace ErsatzTV.Infrastructure.Data.Configurations @@ -13,11 +13,13 @@ namespace ErsatzTV.Infrastructure.Data.Configurations
builder.HasOne(i => i.Collection)
.WithMany()
.HasForeignKey(i => i.CollectionId)
.OnDelete(DeleteBehavior.Cascade)
.IsRequired(false);
builder.HasOne(i => i.MediaItem)
.WithMany()
.HasForeignKey(i => i.MediaItemId)
.OnDelete(DeleteBehavior.Cascade)
.IsRequired(false);
}
}

7
ErsatzTV.Infrastructure/Data/Repositories/PlayoutRepository.cs

@ -5,7 +5,6 @@ using System.Threading.Tasks; @@ -5,7 +5,6 @@ using System.Threading.Tasks;
using ErsatzTV.Core.Domain;
using ErsatzTV.Core.Interfaces.Repositories;
using LanguageExt;
using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
using static LanguageExt.Prelude;
@ -45,9 +44,8 @@ namespace ErsatzTV.Infrastructure.Data.Repositories @@ -45,9 +44,8 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
.OrderBy(p => p.Id) // https://github.com/dotnet/efcore/issues/22579#issuecomment-694772289
.SingleOrDefaultAsync(p => p.Id == id);
public async Task<Option<PlayoutItem>> GetPlayoutItem(int channelId, DateTimeOffset now)
{
return await _dbContext.PlayoutItems
public async Task<Option<PlayoutItem>> GetPlayoutItem(int channelId, DateTimeOffset now) =>
await _dbContext.PlayoutItems
.Where(pi => pi.Playout.ChannelId == channelId)
.Where(pi => pi.Start <= now.UtcDateTime && pi.Finish > now.UtcDateTime)
.Include(i => i.MediaItem)
@ -58,7 +56,6 @@ namespace ErsatzTV.Infrastructure.Data.Repositories @@ -58,7 +56,6 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
.ThenInclude(mv => mv.MediaFiles)
.AsNoTracking()
.SingleOrDefaultAsync();
}
public Task<List<PlayoutItem>> GetPlayoutItems(int playoutId) =>
_dbContext.PlayoutItems

1
ErsatzTV.Infrastructure/Migrations/20210228114929_Update_MediaVersionDateAdded.cs

@ -13,7 +13,6 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -13,7 +13,6 @@ namespace ErsatzTV.Infrastructure.Migrations
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

1462
ErsatzTV.Infrastructure/Migrations/20210228134438_Add_PlayoutDeleteCascades.Designer.cs generated

File diff suppressed because it is too large Load Diff

119
ErsatzTV.Infrastructure/Migrations/20210228134438_Add_PlayoutDeleteCascades.cs

@ -0,0 +1,119 @@ @@ -0,0 +1,119 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace ErsatzTV.Infrastructure.Migrations
{
public partial class Add_PlayoutDeleteCascades : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
"FK_PlayoutProgramScheduleAnchor_Collection_CollectionId",
"PlayoutProgramScheduleAnchor");
migrationBuilder.DropForeignKey(
"FK_PlayoutProgramScheduleAnchor_MediaItem_MediaItemId",
"PlayoutProgramScheduleAnchor");
migrationBuilder.DropForeignKey(
"FK_ProgramScheduleItem_Collection_CollectionId",
"ProgramScheduleItem");
migrationBuilder.DropForeignKey(
"FK_ProgramScheduleItem_MediaItem_MediaItemId",
"ProgramScheduleItem");
migrationBuilder.CreateIndex(
"IX_MediaFile_Path",
"MediaFile",
"Path",
unique: true);
migrationBuilder.AddForeignKey(
"FK_PlayoutProgramScheduleAnchor_Collection_CollectionId",
"PlayoutProgramScheduleAnchor",
"CollectionId",
"Collection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
"FK_PlayoutProgramScheduleAnchor_MediaItem_MediaItemId",
"PlayoutProgramScheduleAnchor",
"MediaItemId",
"MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
"FK_ProgramScheduleItem_Collection_CollectionId",
"ProgramScheduleItem",
"CollectionId",
"Collection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
"FK_ProgramScheduleItem_MediaItem_MediaItemId",
"ProgramScheduleItem",
"MediaItemId",
"MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
"FK_PlayoutProgramScheduleAnchor_Collection_CollectionId",
"PlayoutProgramScheduleAnchor");
migrationBuilder.DropForeignKey(
"FK_PlayoutProgramScheduleAnchor_MediaItem_MediaItemId",
"PlayoutProgramScheduleAnchor");
migrationBuilder.DropForeignKey(
"FK_ProgramScheduleItem_Collection_CollectionId",
"ProgramScheduleItem");
migrationBuilder.DropForeignKey(
"FK_ProgramScheduleItem_MediaItem_MediaItemId",
"ProgramScheduleItem");
migrationBuilder.DropIndex(
"IX_MediaFile_Path",
"MediaFile");
migrationBuilder.AddForeignKey(
"FK_PlayoutProgramScheduleAnchor_Collection_CollectionId",
"PlayoutProgramScheduleAnchor",
"CollectionId",
"Collection",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
"FK_PlayoutProgramScheduleAnchor_MediaItem_MediaItemId",
"PlayoutProgramScheduleAnchor",
"MediaItemId",
"MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
"FK_ProgramScheduleItem_Collection_CollectionId",
"ProgramScheduleItem",
"CollectionId",
"Collection",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
"FK_ProgramScheduleItem_MediaItem_MediaItemId",
"ProgramScheduleItem",
"MediaItemId",
"MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
}
}

385
ErsatzTV.Infrastructure/Migrations/TvContextModelSnapshot.cs

@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
// <auto-generated />
using System;
using ErsatzTV.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ErsatzTV.Infrastructure.Migrations
{
[DbContext(typeof(TvContext))]
partial class TvContextModelSnapshot : ModelSnapshot
internal class TvContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
@ -16,7 +16,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -16,7 +16,9 @@ namespace ErsatzTV.Infrastructure.Migrations
modelBuilder
.HasAnnotation("ProductVersion", "5.0.3");
modelBuilder.Entity("ErsatzTV.Core.Domain.Artwork", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Artwork",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -59,7 +61,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -59,7 +61,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Artwork");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Channel", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Channel",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -93,7 +97,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -93,7 +97,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Channel");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Collection", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Collection",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -107,7 +113,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -107,7 +113,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Collection");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.CollectionItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.CollectionItem",
b =>
{
b.Property<int>("CollectionId")
.HasColumnType("INTEGER");
@ -122,7 +130,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -122,7 +130,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("CollectionItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ConfigElement", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ConfigElement",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -142,7 +152,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -142,7 +152,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ConfigElement");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.EpisodeMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.EpisodeMetadata",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -191,7 +203,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -191,7 +203,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("EpisodeMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.FFmpegProfile", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.FFmpegProfile",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -255,7 +269,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -255,7 +269,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("FFmpegProfile");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Library", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Library",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -280,7 +296,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -280,7 +296,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Library");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LibraryPath", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LibraryPath",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -299,7 +317,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -299,7 +317,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("LibraryPath");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaFile", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaFile",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -315,10 +335,15 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -315,10 +335,15 @@ namespace ErsatzTV.Infrastructure.Migrations
b.HasIndex("MediaVersionId");
b.HasIndex("Path")
.IsUnique();
b.ToTable("MediaFile");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaItem",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -334,7 +359,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -334,7 +359,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("MediaItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaSource", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaSource",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -345,7 +372,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -345,7 +372,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("MediaSource");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaVersion", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaVersion",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -399,7 +428,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -399,7 +428,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("MediaVersion");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MovieMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MovieMetadata",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -448,7 +479,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -448,7 +479,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("MovieMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Playout", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Playout",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -472,7 +505,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -472,7 +505,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Playout");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlayoutItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlayoutItem",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -499,7 +534,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -499,7 +534,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlayoutItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlayoutProgramScheduleAnchor", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlayoutProgramScheduleAnchor",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -533,7 +570,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -533,7 +570,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlayoutProgramScheduleAnchor");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexConnection", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexConnection",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -555,7 +594,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -555,7 +594,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexConnection");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaItemPart", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMediaItemPart",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -581,7 +622,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -581,7 +622,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexMediaItemPart");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramSchedule", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramSchedule",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -601,7 +644,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -601,7 +644,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ProgramSchedule");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItem",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -636,7 +681,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -636,7 +681,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ProgramScheduleItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Resolution", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Resolution",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -656,7 +703,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -656,7 +703,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Resolution");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.SeasonMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.SeasonMetadata",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -699,7 +748,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -699,7 +748,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("SeasonMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ShowMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ShowMetadata",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -748,14 +799,18 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -748,14 +799,18 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ShowMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LocalLibrary", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LocalLibrary",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.Library");
b.ToTable("LocalLibrary");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexLibrary", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexLibrary",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.Library");
@ -768,7 +823,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -768,7 +823,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexLibrary");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Episode", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Episode",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
@ -783,14 +840,18 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -783,14 +840,18 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Episode");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Movie", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Movie",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
b.ToTable("Movie");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Season", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Season",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
@ -805,21 +866,27 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -805,21 +866,27 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Season");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Show", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Show",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
b.ToTable("Show");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LocalMediaSource", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LocalMediaSource",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaSource");
b.ToTable("LocalMediaSource");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaSource", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMediaSource",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaSource");
@ -835,7 +902,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -835,7 +902,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexMediaSource");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemDuration", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemDuration",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
@ -848,14 +917,18 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -848,14 +917,18 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ProgramScheduleDurationItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemFlood", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemFlood",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
b.ToTable("ProgramScheduleFloodItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemMultiple", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemMultiple",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
@ -865,14 +938,18 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -865,14 +938,18 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ProgramScheduleMultipleItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemOne", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemOne",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
b.ToTable("ProgramScheduleOneItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMovie", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMovie",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.Movie");
@ -887,7 +964,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -887,7 +964,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexMovie");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Artwork", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Artwork",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.EpisodeMetadata", null)
.WithMany("Artwork")
@ -910,7 +989,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -910,7 +989,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Channel", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Channel",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.FFmpegProfile", "FFmpegProfile")
.WithMany()
@ -921,7 +1002,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -921,7 +1002,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("FFmpegProfile");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.CollectionItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.CollectionItem",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Collection", "Collection")
.WithMany("CollectionItems")
@ -940,7 +1023,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -940,7 +1023,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("MediaItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.EpisodeMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.EpisodeMetadata",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Episode", "Episode")
.WithMany("EpisodeMetadata")
@ -951,7 +1036,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -951,7 +1036,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Episode");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.FFmpegProfile", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.FFmpegProfile",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Resolution", "Resolution")
.WithMany()
@ -962,7 +1049,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -962,7 +1049,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Resolution");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Library", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Library",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaSource", "MediaSource")
.WithMany("Libraries")
@ -973,7 +1062,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -973,7 +1062,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("MediaSource");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LibraryPath", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LibraryPath",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Library", "Library")
.WithMany("Paths")
@ -984,7 +1075,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -984,7 +1075,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Library");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaFile", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaFile",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaVersion", "MediaVersion")
.WithMany("MediaFiles")
@ -995,7 +1088,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -995,7 +1088,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("MediaVersion");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaItem",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.LibraryPath", "LibraryPath")
.WithMany("MediaItems")
@ -1006,7 +1101,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1006,7 +1101,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("LibraryPath");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaVersion", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaVersion",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Episode", null)
.WithMany("MediaVersions")
@ -1019,7 +1116,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1019,7 +1116,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MovieMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MovieMetadata",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Movie", "Movie")
.WithMany("MovieMetadata")
@ -1030,7 +1129,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1030,7 +1129,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Movie");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Playout", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Playout",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Channel", "Channel")
.WithMany("Playouts")
@ -1044,7 +1145,10 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1044,7 +1145,10 @@ namespace ErsatzTV.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsOne("ErsatzTV.Core.Domain.PlayoutAnchor", "Anchor", b1 =>
b.OwnsOne(
"ErsatzTV.Core.Domain.PlayoutAnchor",
"Anchor",
b1 =>
{
b1.Property<int>("PlayoutId")
.HasColumnType("INTEGER");
@ -1080,7 +1184,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1080,7 +1184,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("ProgramSchedule");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlayoutItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlayoutItem",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaItem", "MediaItem")
.WithMany()
@ -1099,15 +1205,19 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1099,15 +1205,19 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Playout");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlayoutProgramScheduleAnchor", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlayoutProgramScheduleAnchor",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Collection", "Collection")
.WithMany()
.HasForeignKey("CollectionId");
.HasForeignKey("CollectionId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.MediaItem", "MediaItem")
.WithMany()
.HasForeignKey("MediaItemId");
.HasForeignKey("MediaItemId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.Playout", "Playout")
.WithMany("ProgramScheduleAnchors")
@ -1121,7 +1231,10 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1121,7 +1231,10 @@ namespace ErsatzTV.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsOne("ErsatzTV.Core.Domain.CollectionEnumeratorState", "EnumeratorState", b1 =>
b.OwnsOne(
"ErsatzTV.Core.Domain.CollectionEnumeratorState",
"EnumeratorState",
b1 =>
{
b1.Property<int>("PlayoutProgramScheduleAnchorId")
.HasColumnType("INTEGER");
@ -1151,7 +1264,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1151,7 +1264,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("ProgramSchedule");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexConnection", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexConnection",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.PlexMediaSource", "PlexMediaSource")
.WithMany("Connections")
@ -1162,15 +1277,19 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1162,15 +1277,19 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("PlexMediaSource");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItem",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Collection", "Collection")
.WithMany()
.HasForeignKey("CollectionId");
.HasForeignKey("CollectionId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.MediaItem", "MediaItem")
.WithMany()
.HasForeignKey("MediaItemId");
.HasForeignKey("MediaItemId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.ProgramSchedule", "ProgramSchedule")
.WithMany("Items")
@ -1185,7 +1304,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1185,7 +1304,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("ProgramSchedule");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.SeasonMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.SeasonMetadata",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Season", "Season")
.WithMany("SeasonMetadata")
@ -1196,7 +1317,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1196,7 +1317,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Season");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ShowMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ShowMetadata",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Show", "Show")
.WithMany("ShowMetadata")
@ -1207,7 +1330,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1207,7 +1330,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Show");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LocalLibrary", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LocalLibrary",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Library", null)
.WithOne()
@ -1216,7 +1341,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1216,7 +1341,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexLibrary", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexLibrary",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Library", null)
.WithOne()
@ -1225,7 +1352,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1225,7 +1352,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Episode", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Episode",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaItem", null)
.WithOne()
@ -1242,7 +1371,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1242,7 +1371,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Season");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Movie", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Movie",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaItem", null)
.WithOne()
@ -1251,7 +1382,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1251,7 +1382,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Season", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Season",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaItem", null)
.WithOne()
@ -1268,7 +1401,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1268,7 +1401,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Show");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Show", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Show",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaItem", null)
.WithOne()
@ -1277,7 +1412,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1277,7 +1412,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LocalMediaSource", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LocalMediaSource",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaSource", null)
.WithOne()
@ -1286,7 +1423,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1286,7 +1423,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaSource", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMediaSource",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaSource", null)
.WithOne()
@ -1295,7 +1434,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1295,7 +1434,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemDuration", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemDuration",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.ProgramScheduleItem", null)
.WithOne()
@ -1304,7 +1445,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1304,7 +1445,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemFlood", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemFlood",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.ProgramScheduleItem", null)
.WithOne()
@ -1313,7 +1456,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1313,7 +1456,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemMultiple", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemMultiple",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.ProgramScheduleItem", null)
.WithOne()
@ -1322,7 +1467,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1322,7 +1467,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemOne", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemOne",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.ProgramScheduleItem", null)
.WithOne()
@ -1331,7 +1478,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1331,7 +1478,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMovie", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMovie",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Movie", null)
.WithOne()
@ -1346,107 +1495,83 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1346,107 +1495,83 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Part");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Channel", b =>
{
b.Navigation("Playouts");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Channel", b => { b.Navigation("Playouts"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.Collection", b =>
{
b.Navigation("CollectionItems");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Collection", b => { b.Navigation("CollectionItems"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.EpisodeMetadata", b =>
{
b.Navigation("Artwork");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.EpisodeMetadata", b => { b.Navigation("Artwork"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.Library", b =>
{
b.Navigation("Paths");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Library", b => { b.Navigation("Paths"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.LibraryPath", b =>
{
b.Navigation("MediaItems");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LibraryPath", b => { b.Navigation("MediaItems"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaItem", b =>
{
b.Navigation("CollectionItems");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaItem", b => { b.Navigation("CollectionItems"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaSource", b =>
{
b.Navigation("Libraries");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaSource", b => { b.Navigation("Libraries"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaVersion", b =>
{
b.Navigation("MediaFiles");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaVersion", b => { b.Navigation("MediaFiles"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.MovieMetadata", b =>
{
b.Navigation("Artwork");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MovieMetadata", b => { b.Navigation("Artwork"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.Playout", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Playout",
b =>
{
b.Navigation("Items");
b.Navigation("ProgramScheduleAnchors");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramSchedule", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramSchedule",
b =>
{
b.Navigation("Items");
b.Navigation("Playouts");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.SeasonMetadata", b =>
{
b.Navigation("Artwork");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.SeasonMetadata", b => { b.Navigation("Artwork"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.ShowMetadata", b =>
{
b.Navigation("Artwork");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ShowMetadata", b => { b.Navigation("Artwork"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.Episode", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Episode",
b =>
{
b.Navigation("EpisodeMetadata");
b.Navigation("MediaVersions");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Movie", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Movie",
b =>
{
b.Navigation("MediaVersions");
b.Navigation("MovieMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Season", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Season",
b =>
{
b.Navigation("Episodes");
b.Navigation("SeasonMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Show", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Show",
b =>
{
b.Navigation("Seasons");
b.Navigation("ShowMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaSource", b =>
{
b.Navigation("Connections");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaSource", b => { b.Navigation("Connections"); });
#pragma warning restore 612, 618
}
}

Loading…
Cancel
Save