//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Ombi.Store.Context.Sqlite;
namespace Ombi.Store.Migrations.ExternalSqlite
{
[DbContext(typeof(ExternalSqliteContext))]
[Migration("20191113213617_RequestIdPatch")]
partial class RequestIdPatch
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079");
modelBuilder.Entity("Ombi.Store.Entities.CouchPotatoCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("TheMovieDbId");
b.HasKey("Id");
b.ToTable("CouchPotatoCache");
});
modelBuilder.Entity("Ombi.Store.Entities.EmbyContent", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("AddedAt");
b.Property("EmbyId")
.IsRequired();
b.Property("ImdbId");
b.Property("ProviderId");
b.Property("TheMovieDbId");
b.Property("Title");
b.Property("TvDbId");
b.Property("Type");
b.Property("Url");
b.HasKey("Id");
b.ToTable("EmbyContent");
});
modelBuilder.Entity("Ombi.Store.Entities.EmbyEpisode", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("AddedAt");
b.Property("EmbyId");
b.Property("EpisodeNumber");
b.Property("ImdbId");
b.Property("ParentId");
b.Property("ProviderId");
b.Property("SeasonNumber");
b.Property("TheMovieDbId");
b.Property("Title");
b.Property("TvDbId");
b.HasKey("Id");
b.HasIndex("ParentId");
b.ToTable("EmbyEpisode");
});
modelBuilder.Entity("Ombi.Store.Entities.LidarrAlbumCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("AddedAt");
b.Property("ArtistId");
b.Property("ForeignAlbumId");
b.Property("Monitored");
b.Property("PercentOfTracks");
b.Property("ReleaseDate");
b.Property("Title");
b.Property("TrackCount");
b.HasKey("Id");
b.ToTable("LidarrAlbumCache");
});
modelBuilder.Entity("Ombi.Store.Entities.LidarrArtistCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("ArtistId");
b.Property("ArtistName");
b.Property("ForeignArtistId");
b.Property("Monitored");
b.HasKey("Id");
b.ToTable("LidarrArtistCache");
});
modelBuilder.Entity("Ombi.Store.Entities.PlexEpisode", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("EpisodeNumber");
b.Property("GrandparentKey");
b.Property("Key");
b.Property("ParentKey");
b.Property("SeasonNumber");
b.Property("Title");
b.HasKey("Id");
b.HasIndex("GrandparentKey");
b.ToTable("PlexEpisode");
});
modelBuilder.Entity("Ombi.Store.Entities.PlexSeasonsContent", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("ParentKey");
b.Property("PlexContentId");
b.Property("PlexServerContentId");
b.Property("SeasonKey");
b.Property("SeasonNumber");
b.HasKey("Id");
b.HasIndex("PlexServerContentId");
b.ToTable("PlexSeasonsContent");
});
modelBuilder.Entity("Ombi.Store.Entities.PlexServerContent", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("AddedAt");
b.Property("ImdbId");
b.Property("Key");
b.Property("Quality");
b.Property("ReleaseYear");
b.Property("RequestId");
b.Property("TheMovieDbId");
b.Property("Title");
b.Property("TvDbId");
b.Property("Type");
b.Property("Url");
b.HasKey("Id");
b.ToTable("PlexServerContent");
});
modelBuilder.Entity("Ombi.Store.Entities.RadarrCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("HasFile");
b.Property("TheMovieDbId");
b.HasKey("Id");
b.ToTable("RadarrCache");
});
modelBuilder.Entity("Ombi.Store.Entities.SickRageCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("TvDbId");
b.HasKey("Id");
b.ToTable("SickRageCache");
});
modelBuilder.Entity("Ombi.Store.Entities.SickRageEpisodeCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("EpisodeNumber");
b.Property("SeasonNumber");
b.Property("TvDbId");
b.HasKey("Id");
b.ToTable("SickRageEpisodeCache");
});
modelBuilder.Entity("Ombi.Store.Entities.SonarrCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("TvDbId");
b.HasKey("Id");
b.ToTable("SonarrCache");
});
modelBuilder.Entity("Ombi.Store.Entities.SonarrEpisodeCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd();
b.Property("EpisodeNumber");
b.Property("HasFile");
b.Property("SeasonNumber");
b.Property("TvDbId");
b.HasKey("Id");
b.ToTable("SonarrEpisodeCache");
});
modelBuilder.Entity("Ombi.Store.Entities.EmbyEpisode", b =>
{
b.HasOne("Ombi.Store.Entities.EmbyContent", "Series")
.WithMany("Episodes")
.HasForeignKey("ParentId")
.HasPrincipalKey("EmbyId");
});
modelBuilder.Entity("Ombi.Store.Entities.PlexEpisode", b =>
{
b.HasOne("Ombi.Store.Entities.PlexServerContent", "Series")
.WithMany("Episodes")
.HasForeignKey("GrandparentKey")
.HasPrincipalKey("Key")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Ombi.Store.Entities.PlexSeasonsContent", b =>
{
b.HasOne("Ombi.Store.Entities.PlexServerContent")
.WithMany("Seasons")
.HasForeignKey("PlexServerContentId");
});
#pragma warning restore 612, 618
}
}
}