//
using System;
using ErsatzTV.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ErsatzTV.Infrastructure.Migrations
{
[DbContext(typeof(TvContext))]
[Migration("20210407233717_Update_ArtistMetadata_FK")]
partial class Update_ArtistMetadata_FK
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "5.0.4");
modelBuilder.Entity("ErsatzTV.Core.Domain.ArtistMetadata", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("ArtistId")
.HasColumnType("INTEGER");
b.Property("Biography")
.HasColumnType("TEXT");
b.Property("DateAdded")
.HasColumnType("TEXT");
b.Property("DateUpdated")
.HasColumnType("TEXT");
b.Property("Disambiguation")
.HasColumnType("TEXT");
b.Property("Formed")
.HasColumnType("TEXT");
b.Property("MetadataKind")
.HasColumnType("INTEGER");
b.Property("OriginalTitle")
.HasColumnType("TEXT");
b.Property("ReleaseDate")
.HasColumnType("TEXT");
b.Property("SortTitle")
.HasColumnType("TEXT");
b.Property("Title")
.HasColumnType("TEXT");
b.Property("Year")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ArtistId");
b.ToTable("ArtistMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Artwork", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("ArtistMetadataId")
.HasColumnType("INTEGER");
b.Property("ArtworkKind")
.HasColumnType("INTEGER");
b.Property("ChannelId")
.HasColumnType("INTEGER");
b.Property("DateAdded")
.HasColumnType("TEXT");
b.Property("DateUpdated")
.HasColumnType("TEXT");
b.Property("EpisodeMetadataId")
.HasColumnType("INTEGER");
b.Property("MovieMetadataId")
.HasColumnType("INTEGER");
b.Property("MusicVideoMetadataId")
.HasColumnType("INTEGER");
b.Property("Path")
.HasColumnType("TEXT");
b.Property("SeasonMetadataId")
.HasColumnType("INTEGER");
b.Property("ShowMetadataId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ArtistMetadataId");
b.HasIndex("ChannelId");
b.HasIndex("EpisodeMetadataId");
b.HasIndex("MovieMetadataId");
b.HasIndex("MusicVideoMetadataId");
b.HasIndex("SeasonMetadataId");
b.HasIndex("ShowMetadataId");
b.ToTable("Artwork");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Channel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("FFmpegProfileId")
.HasColumnType("INTEGER");
b.Property("Name")
.HasColumnType("TEXT");
b.Property("Number")
.HasColumnType("TEXT");
b.Property("PreferredLanguageCode")
.HasColumnType("TEXT");
b.Property("StreamingMode")
.HasColumnType("INTEGER");
b.Property("UniqueId")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("FFmpegProfileId");
b.HasIndex("Number")
.IsUnique();
b.ToTable("Channel");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Collection", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Name")
.HasColumnType("TEXT");
b.Property("UseCustomPlaybackOrder")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("Collection");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.CollectionItem", b =>
{
b.Property("CollectionId")
.HasColumnType("INTEGER");
b.Property("MediaItemId")
.HasColumnType("INTEGER");
b.Property("CustomIndex")
.HasColumnType("INTEGER");
b.HasKey("CollectionId", "MediaItemId");
b.HasIndex("MediaItemId");
b.ToTable("CollectionItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ConfigElement", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Key")
.HasColumnType("TEXT");
b.Property("Value")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("Key")
.IsUnique();
b.ToTable("ConfigElement");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.EpisodeMetadata", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("DateAdded")
.HasColumnType("TEXT");
b.Property("DateUpdated")
.HasColumnType("TEXT");
b.Property("EpisodeId")
.HasColumnType("INTEGER");
b.Property("MetadataKind")
.HasColumnType("INTEGER");
b.Property("OriginalTitle")
.HasColumnType("TEXT");
b.Property("Outline")
.HasColumnType("TEXT");
b.Property("Plot")
.HasColumnType("TEXT");
b.Property("ReleaseDate")
.HasColumnType("TEXT");
b.Property("SortTitle")
.HasColumnType("TEXT");
b.Property("Tagline")
.HasColumnType("TEXT");
b.Property("Title")
.HasColumnType("TEXT");
b.Property("Year")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("EpisodeId");
b.ToTable("EpisodeMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.FFmpegProfile", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AudioBitrate")
.HasColumnType("INTEGER");
b.Property("AudioBufferSize")
.HasColumnType("INTEGER");
b.Property("AudioChannels")
.HasColumnType("INTEGER");
b.Property("AudioCodec")
.HasColumnType("TEXT");
b.Property("AudioSampleRate")
.HasColumnType("INTEGER");
b.Property("FrameRate")
.HasColumnType("TEXT");
b.Property("HardwareAcceleration")
.HasColumnType("INTEGER");
b.Property("Name")
.HasColumnType("TEXT");
b.Property("NormalizeAudio")
.HasColumnType("INTEGER");
b.Property("NormalizeLoudness")
.HasColumnType("INTEGER");
b.Property("NormalizeVideo")
.HasColumnType("INTEGER");
b.Property("ResolutionId")
.HasColumnType("INTEGER");
b.Property("ThreadCount")
.HasColumnType("INTEGER");
b.Property("Transcode")
.HasColumnType("INTEGER");
b.Property("VideoBitrate")
.HasColumnType("INTEGER");
b.Property("VideoBufferSize")
.HasColumnType("INTEGER");
b.Property("VideoCodec")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ResolutionId");
b.ToTable("FFmpegProfile");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Genre", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("ArtistMetadataId")
.HasColumnType("INTEGER");
b.Property("EpisodeMetadataId")
.HasColumnType("INTEGER");
b.Property("MovieMetadataId")
.HasColumnType("INTEGER");
b.Property("MusicVideoMetadataId")
.HasColumnType("INTEGER");
b.Property("Name")
.HasColumnType("TEXT");
b.Property("SeasonMetadataId")
.HasColumnType("INTEGER");
b.Property("ShowMetadataId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ArtistMetadataId");
b.HasIndex("EpisodeMetadataId");
b.HasIndex("MovieMetadataId");
b.HasIndex("MusicVideoMetadataId");
b.HasIndex("SeasonMetadataId");
b.HasIndex("ShowMetadataId");
b.ToTable("Genre");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Library", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("LastScan")
.HasColumnType("TEXT");
b.Property("MediaKind")
.HasColumnType("INTEGER");
b.Property("MediaSourceId")
.HasColumnType("INTEGER");
b.Property("Name")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("MediaSourceId");
b.ToTable("Library");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LibraryPath", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("LastScan")
.HasColumnType("TEXT");
b.Property("LibraryId")
.HasColumnType("INTEGER");
b.Property("Path")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("LibraryId");
b.ToTable("LibraryPath");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaFile", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("MediaVersionId")
.HasColumnType("INTEGER");
b.Property("Path")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("MediaVersionId");
b.HasIndex("Path")
.IsUnique();
b.ToTable("MediaFile");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaItem", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("LibraryPathId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("LibraryPathId");
b.ToTable("MediaItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaSource", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("MediaSource");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaStream", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Channels")
.HasColumnType("INTEGER");
b.Property("Codec")
.HasColumnType("TEXT");
b.Property("Default")
.HasColumnType("INTEGER");
b.Property("Forced")
.HasColumnType("INTEGER");
b.Property("Index")
.HasColumnType("INTEGER");
b.Property("Language")
.HasColumnType("TEXT");
b.Property("MediaStreamKind")
.HasColumnType("INTEGER");
b.Property("MediaVersionId")
.HasColumnType("INTEGER");
b.Property("Profile")
.HasColumnType("TEXT");
b.Property("Title")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("MediaVersionId");
b.ToTable("MediaStream");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaVersion", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("DateAdded")
.HasColumnType("TEXT");
b.Property("DateUpdated")
.HasColumnType("TEXT");
b.Property("DisplayAspectRatio")
.HasColumnType("TEXT");
b.Property("Duration")
.HasColumnType("TEXT");
b.Property("EpisodeId")
.HasColumnType("INTEGER");
b.Property("Height")
.HasColumnType("INTEGER");
b.Property("MovieId")
.HasColumnType("INTEGER");
b.Property("MusicVideoId")
.HasColumnType("INTEGER");
b.Property("Name")
.HasColumnType("TEXT");
b.Property("SampleAspectRatio")
.HasColumnType("TEXT");
b.Property("VideoScanKind")
.HasColumnType("INTEGER");
b.Property("Width")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("EpisodeId");
b.HasIndex("MovieId");
b.HasIndex("MusicVideoId");
b.ToTable("MediaVersion");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Mood", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("ArtistMetadataId")
.HasColumnType("INTEGER");
b.Property("Name")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ArtistMetadataId");
b.ToTable("Mood");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MovieMetadata", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("DateAdded")
.HasColumnType("TEXT");
b.Property("DateUpdated")
.HasColumnType("TEXT");
b.Property("MetadataKind")
.HasColumnType("INTEGER");
b.Property("MovieId")
.HasColumnType("INTEGER");
b.Property("OriginalTitle")
.HasColumnType("TEXT");
b.Property("Outline")
.HasColumnType("TEXT");
b.Property("Plot")
.HasColumnType("TEXT");
b.Property("ReleaseDate")
.HasColumnType("TEXT");
b.Property("SortTitle")
.HasColumnType("TEXT");
b.Property("Tagline")
.HasColumnType("TEXT");
b.Property("Title")
.HasColumnType("TEXT");
b.Property("Year")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("MovieId");
b.ToTable("MovieMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MusicVideoMetadata", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Album")
.HasColumnType("TEXT");
b.Property("Artist")
.HasColumnType("TEXT");
b.Property("DateAdded")
.HasColumnType("TEXT");
b.Property("DateUpdated")
.HasColumnType("TEXT");
b.Property("MetadataKind")
.HasColumnType("INTEGER");
b.Property("MusicVideoId")
.HasColumnType("INTEGER");
b.Property("OriginalTitle")
.HasColumnType("TEXT");
b.Property("Plot")
.HasColumnType("TEXT");
b.Property("ReleaseDate")
.HasColumnType("TEXT");
b.Property("SortTitle")
.HasColumnType("TEXT");
b.Property("Title")
.HasColumnType("TEXT");
b.Property("Year")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("MusicVideoId");
b.ToTable("MusicVideoMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Playout", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("ChannelId")
.HasColumnType("INTEGER");
b.Property("ProgramScheduleId")
.HasColumnType("INTEGER");
b.Property("ProgramSchedulePlayoutType")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ChannelId");
b.HasIndex("ProgramScheduleId");
b.ToTable("Playout");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlayoutItem", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CustomGroup")
.HasColumnType("INTEGER");
b.Property("CustomTitle")
.HasColumnType("TEXT");
b.Property("Finish")
.HasColumnType("TEXT");
b.Property("MediaItemId")
.HasColumnType("INTEGER");
b.Property("PlayoutId")
.HasColumnType("INTEGER");
b.Property("Start")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("MediaItemId");
b.HasIndex("PlayoutId");
b.ToTable("PlayoutItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlayoutProgramScheduleAnchor", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CollectionId")
.HasColumnType("INTEGER");
b.Property("CollectionType")
.HasColumnType("INTEGER");
b.Property("MediaItemId")
.HasColumnType("INTEGER");
b.Property("PlayoutId")
.HasColumnType("INTEGER");
b.Property("ProgramScheduleId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("CollectionId");
b.HasIndex("MediaItemId");
b.HasIndex("PlayoutId");
b.HasIndex("ProgramScheduleId");
b.ToTable("PlayoutProgramScheduleAnchor");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexConnection", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("IsActive")
.HasColumnType("INTEGER");
b.Property("PlexMediaSourceId")
.HasColumnType("INTEGER");
b.Property("Uri")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("PlexMediaSourceId");
b.ToTable("PlexConnection");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexPathReplacement", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("LocalPath")
.HasColumnType("TEXT");
b.Property("PlexMediaSourceId")
.HasColumnType("INTEGER");
b.Property("PlexPath")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("PlexMediaSourceId");
b.ToTable("PlexPathReplacement");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramSchedule", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("MediaCollectionPlaybackOrder")
.HasColumnType("INTEGER");
b.Property("Name")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("ProgramSchedule");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItem", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CollectionId")
.HasColumnType("INTEGER");
b.Property("CollectionType")
.HasColumnType("INTEGER");
b.Property("CustomTitle")
.HasColumnType("TEXT");
b.Property("Index")
.HasColumnType("INTEGER");
b.Property("MediaItemId")
.HasColumnType("INTEGER");
b.Property("ProgramScheduleId")
.HasColumnType("INTEGER");
b.Property("StartTime")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CollectionId");
b.HasIndex("MediaItemId");
b.HasIndex("ProgramScheduleId");
b.ToTable("ProgramScheduleItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Resolution", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Height")
.HasColumnType("INTEGER");
b.Property("Name")
.HasColumnType("TEXT");
b.Property("Width")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("Resolution");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.SeasonMetadata", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("DateAdded")
.HasColumnType("TEXT");
b.Property("DateUpdated")
.HasColumnType("TEXT");
b.Property("MetadataKind")
.HasColumnType("INTEGER");
b.Property("OriginalTitle")
.HasColumnType("TEXT");
b.Property("Outline")
.HasColumnType("TEXT");
b.Property("ReleaseDate")
.HasColumnType("TEXT");
b.Property("SeasonId")
.HasColumnType("INTEGER");
b.Property("SortTitle")
.HasColumnType("TEXT");
b.Property("Title")
.HasColumnType("TEXT");
b.Property("Year")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("SeasonId");
b.ToTable("SeasonMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ShowMetadata", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("DateAdded")
.HasColumnType("TEXT");
b.Property("DateUpdated")
.HasColumnType("TEXT");
b.Property("MetadataKind")
.HasColumnType("INTEGER");
b.Property("OriginalTitle")
.HasColumnType("TEXT");
b.Property("Outline")
.HasColumnType("TEXT");
b.Property("Plot")
.HasColumnType("TEXT");
b.Property("ReleaseDate")
.HasColumnType("TEXT");
b.Property("ShowId")
.HasColumnType("INTEGER");
b.Property("SortTitle")
.HasColumnType("TEXT");
b.Property("Tagline")
.HasColumnType("TEXT");
b.Property("Title")
.HasColumnType("TEXT");
b.Property("Year")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ShowId");
b.ToTable("ShowMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Studio", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("ArtistMetadataId")
.HasColumnType("INTEGER");
b.Property("EpisodeMetadataId")
.HasColumnType("INTEGER");
b.Property("MovieMetadataId")
.HasColumnType("INTEGER");
b.Property("MusicVideoMetadataId")
.HasColumnType("INTEGER");
b.Property("Name")
.HasColumnType("TEXT");
b.Property("SeasonMetadataId")
.HasColumnType("INTEGER");
b.Property("ShowMetadataId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ArtistMetadataId");
b.HasIndex("EpisodeMetadataId");
b.HasIndex("MovieMetadataId");
b.HasIndex("MusicVideoMetadataId");
b.HasIndex("SeasonMetadataId");
b.HasIndex("ShowMetadataId");
b.ToTable("Studio");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Style", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("ArtistMetadataId")
.HasColumnType("INTEGER");
b.Property("Name")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ArtistMetadataId");
b.ToTable("Style");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Tag", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("ArtistMetadataId")
.HasColumnType("INTEGER");
b.Property("EpisodeMetadataId")
.HasColumnType("INTEGER");
b.Property("MovieMetadataId")
.HasColumnType("INTEGER");
b.Property("MusicVideoMetadataId")
.HasColumnType("INTEGER");
b.Property("Name")
.HasColumnType("TEXT");
b.Property("SeasonMetadataId")
.HasColumnType("INTEGER");
b.Property("ShowMetadataId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ArtistMetadataId");
b.HasIndex("EpisodeMetadataId");
b.HasIndex("MovieMetadataId");
b.HasIndex("MusicVideoMetadataId");
b.HasIndex("SeasonMetadataId");
b.HasIndex("ShowMetadataId");
b.ToTable("Tag");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LocalLibrary", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.Library");
b.ToTable("LocalLibrary");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexLibrary", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.Library");
b.Property("Key")
.HasColumnType("TEXT");
b.Property("ShouldSyncItems")
.HasColumnType("INTEGER");
b.ToTable("PlexLibrary");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaFile", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaFile");
b.Property("Key")
.HasColumnType("TEXT");
b.Property("PlexId")
.HasColumnType("INTEGER");
b.ToTable("PlexMediaFile");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Artist", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
b.ToTable("Artist");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Episode", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
b.Property("EpisodeNumber")
.HasColumnType("INTEGER");
b.Property("SeasonId")
.HasColumnType("INTEGER");
b.HasIndex("SeasonId");
b.ToTable("Episode");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Movie", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
b.ToTable("Movie");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MusicVideo", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
b.Property("ArtistId")
.HasColumnType("INTEGER");
b.HasIndex("ArtistId");
b.ToTable("MusicVideo");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Season", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
b.Property("SeasonNumber")
.HasColumnType("INTEGER");
b.Property("ShowId")
.HasColumnType("INTEGER");
b.HasIndex("ShowId");
b.ToTable("Season");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Show", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
b.ToTable("Show");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LocalMediaSource", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaSource");
b.ToTable("LocalMediaSource");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaSource", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaSource");
b.Property("ClientIdentifier")
.HasColumnType("TEXT");
b.Property("Platform")
.HasColumnType("TEXT");
b.Property("PlatformVersion")
.HasColumnType("TEXT");
b.Property("ProductVersion")
.HasColumnType("TEXT");
b.Property("ServerName")
.HasColumnType("TEXT");
b.ToTable("PlexMediaSource");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemDuration", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
b.Property("OfflineTail")
.HasColumnType("INTEGER");
b.Property("PlayoutDuration")
.HasColumnType("TEXT");
b.ToTable("ProgramScheduleDurationItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemFlood", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
b.ToTable("ProgramScheduleFloodItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemMultiple", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
b.Property("Count")
.HasColumnType("INTEGER");
b.ToTable("ProgramScheduleMultipleItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemOne", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
b.ToTable("ProgramScheduleOneItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexEpisode", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.Episode");
b.Property("Key")
.HasColumnType("TEXT");
b.ToTable("PlexEpisode");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMovie", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.Movie");
b.Property("Key")
.HasColumnType("TEXT");
b.ToTable("PlexMovie");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexSeason", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.Season");
b.Property("Key")
.HasColumnType("TEXT");
b.ToTable("PlexSeason");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexShow", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.Show");
b.Property("Key")
.HasColumnType("TEXT");
b.ToTable("PlexShow");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ArtistMetadata", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Artist", "Artist")
.WithMany("ArtistMetadata")
.HasForeignKey("ArtistId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Artist");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Artwork", b =>
{
b.HasOne("ErsatzTV.Core.Domain.ArtistMetadata", null)
.WithMany("Artwork")
.HasForeignKey("ArtistMetadataId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.Channel", null)
.WithMany("Artwork")
.HasForeignKey("ChannelId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.EpisodeMetadata", null)
.WithMany("Artwork")
.HasForeignKey("EpisodeMetadataId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.MovieMetadata", null)
.WithMany("Artwork")
.HasForeignKey("MovieMetadataId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.MusicVideoMetadata", null)
.WithMany("Artwork")
.HasForeignKey("MusicVideoMetadataId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.SeasonMetadata", null)
.WithMany("Artwork")
.HasForeignKey("SeasonMetadataId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.ShowMetadata", null)
.WithMany("Artwork")
.HasForeignKey("ShowMetadataId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Channel", b =>
{
b.HasOne("ErsatzTV.Core.Domain.FFmpegProfile", "FFmpegProfile")
.WithMany()
.HasForeignKey("FFmpegProfileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("FFmpegProfile");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.CollectionItem", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Collection", "Collection")
.WithMany("CollectionItems")
.HasForeignKey("CollectionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("ErsatzTV.Core.Domain.MediaItem", "MediaItem")
.WithMany("CollectionItems")
.HasForeignKey("MediaItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Collection");
b.Navigation("MediaItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.EpisodeMetadata", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Episode", "Episode")
.WithMany("EpisodeMetadata")
.HasForeignKey("EpisodeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Episode");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.FFmpegProfile", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Resolution", "Resolution")
.WithMany()
.HasForeignKey("ResolutionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Resolution");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Genre", b =>
{
b.HasOne("ErsatzTV.Core.Domain.ArtistMetadata", null)
.WithMany("Genres")
.HasForeignKey("ArtistMetadataId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.EpisodeMetadata", null)
.WithMany("Genres")
.HasForeignKey("EpisodeMetadataId");
b.HasOne("ErsatzTV.Core.Domain.MovieMetadata", null)
.WithMany("Genres")
.HasForeignKey("MovieMetadataId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.MusicVideoMetadata", null)
.WithMany("Genres")
.HasForeignKey("MusicVideoMetadataId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.SeasonMetadata", null)
.WithMany("Genres")
.HasForeignKey("SeasonMetadataId");
b.HasOne("ErsatzTV.Core.Domain.ShowMetadata", null)
.WithMany("Genres")
.HasForeignKey("ShowMetadataId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Library", b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaSource", "MediaSource")
.WithMany("Libraries")
.HasForeignKey("MediaSourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("MediaSource");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LibraryPath", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Library", "Library")
.WithMany("Paths")
.HasForeignKey("LibraryId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Library");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaFile", b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaVersion", "MediaVersion")
.WithMany("MediaFiles")
.HasForeignKey("MediaVersionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("MediaVersion");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaItem", b =>
{
b.HasOne("ErsatzTV.Core.Domain.LibraryPath", "LibraryPath")
.WithMany("MediaItems")
.HasForeignKey("LibraryPathId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LibraryPath");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaStream", b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaVersion", "MediaVersion")
.WithMany("Streams")
.HasForeignKey("MediaVersionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("MediaVersion");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaVersion", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Episode", null)
.WithMany("MediaVersions")
.HasForeignKey("EpisodeId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.Movie", null)
.WithMany("MediaVersions")
.HasForeignKey("MovieId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.MusicVideo", null)
.WithMany("MediaVersions")
.HasForeignKey("MusicVideoId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Mood", b =>
{
b.HasOne("ErsatzTV.Core.Domain.ArtistMetadata", null)
.WithMany("Moods")
.HasForeignKey("ArtistMetadataId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MovieMetadata", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Movie", "Movie")
.WithMany("MovieMetadata")
.HasForeignKey("MovieId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Movie");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MusicVideoMetadata", b =>
{
b.HasOne("ErsatzTV.Core.Domain.MusicVideo", "MusicVideo")
.WithMany("MusicVideoMetadata")
.HasForeignKey("MusicVideoId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("MusicVideo");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Playout", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Channel", "Channel")
.WithMany("Playouts")
.HasForeignKey("ChannelId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("ErsatzTV.Core.Domain.ProgramSchedule", "ProgramSchedule")
.WithMany("Playouts")
.HasForeignKey("ProgramScheduleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsOne("ErsatzTV.Core.Domain.PlayoutAnchor", "Anchor", b1 =>
{
b1.Property("PlayoutId")
.HasColumnType("INTEGER");
b1.Property("DurationFinish")
.HasColumnType("TEXT");
b1.Property