//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Ombi.Store.Context.MySql;
namespace Ombi.Store.Migrations.ExternalMySql
{
[DbContext(typeof(ExternalMySqlContext))]
partial class ExternalMySqlContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Relational:MaxIdentifierLength", 64)
.HasAnnotation("ProductVersion", "5.0.1");
modelBuilder.Entity("Ombi.Store.Entities.CouchPotatoCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property("TheMovieDbId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("CouchPotatoCache");
});
modelBuilder.Entity("Ombi.Store.Entities.EmbyContent", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property("AddedAt")
.HasColumnType("datetime(6)");
b.Property("EmbyId")
.IsRequired()
.HasColumnType("varchar(255)");
b.Property("ImdbId")
.HasColumnType("longtext");
b.Property("ProviderId")
.HasColumnType("longtext");
b.Property("TheMovieDbId")
.HasColumnType("longtext");
b.Property("Title")
.HasColumnType("longtext");
b.Property("TvDbId")
.HasColumnType("longtext");
b.Property("Type")
.HasColumnType("int");
b.Property("Url")
.HasColumnType("longtext");
b.HasKey("Id");
b.ToTable("EmbyContent");
});
modelBuilder.Entity("Ombi.Store.Entities.EmbyEpisode", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property("AddedAt")
.HasColumnType("datetime(6)");
b.Property("EmbyId")
.HasColumnType("longtext");
b.Property("EpisodeNumber")
.HasColumnType("int");
b.Property("ImdbId")
.HasColumnType("longtext");
b.Property("ParentId")
.HasColumnType("varchar(255)");
b.Property("ProviderId")
.HasColumnType("longtext");
b.Property("SeasonNumber")
.HasColumnType("int");
b.Property("TheMovieDbId")
.HasColumnType("longtext");
b.Property("Title")
.HasColumnType("longtext");
b.Property("TvDbId")
.HasColumnType("longtext");
b.HasKey("Id");
b.HasIndex("ParentId");
b.ToTable("EmbyEpisode");
});
modelBuilder.Entity("Ombi.Store.Entities.JellyfinContent", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property("AddedAt")
.HasColumnType("datetime(6)");
b.Property("ImdbId")
.HasColumnType("longtext");
b.Property("JellyfinId")
.IsRequired()
.HasColumnType("varchar(255)");
b.Property("ProviderId")
.HasColumnType("longtext");
b.Property("TheMovieDbId")
.HasColumnType("longtext");
b.Property("Title")
.HasColumnType("longtext");
b.Property("TvDbId")
.HasColumnType("longtext");
b.Property("Type")
.HasColumnType("int");
b.Property("Url")
.HasColumnType("longtext");
b.HasKey("Id");
b.ToTable("JellyfinContent");
});
modelBuilder.Entity("Ombi.Store.Entities.JellyfinEpisode", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property("AddedAt")
.HasColumnType("datetime(6)");
b.Property("EpisodeNumber")
.HasColumnType("int");
b.Property("ImdbId")
.HasColumnType("longtext");
b.Property("JellyfinId")
.HasColumnType("longtext");
b.Property("ParentId")
.HasColumnType("varchar(255)");
b.Property("ProviderId")
.HasColumnType("longtext");
b.Property("SeasonNumber")
.HasColumnType("int");
b.Property("TheMovieDbId")
.HasColumnType("longtext");
b.Property("Title")
.HasColumnType("longtext");
b.Property("TvDbId")
.HasColumnType("longtext");
b.HasKey("Id");
b.HasIndex("ParentId");
b.ToTable("JellyfinEpisode");
});
modelBuilder.Entity("Ombi.Store.Entities.LidarrAlbumCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property("AddedAt")
.HasColumnType("datetime(6)");
b.Property("ArtistId")
.HasColumnType("int");
b.Property("ForeignAlbumId")
.HasColumnType("longtext");
b.Property("Monitored")
.HasColumnType("tinyint(1)");
b.Property("PercentOfTracks")
.HasColumnType("decimal(65,30)");
b.Property("ReleaseDate")
.HasColumnType("datetime(6)");
b.Property("Title")
.HasColumnType("longtext");
b.Property("TrackCount")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("LidarrAlbumCache");
});
modelBuilder.Entity("Ombi.Store.Entities.LidarrArtistCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property("ArtistId")
.HasColumnType("int");
b.Property("ArtistName")
.HasColumnType("longtext");
b.Property("ForeignArtistId")
.HasColumnType("longtext");
b.Property("Monitored")
.HasColumnType("tinyint(1)");
b.HasKey("Id");
b.ToTable("LidarrArtistCache");
});
modelBuilder.Entity("Ombi.Store.Entities.PlexEpisode", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property("EpisodeNumber")
.HasColumnType("int");
b.Property("GrandparentKey")
.HasColumnType("int");
b.Property("Key")
.HasColumnType("int");
b.Property("ParentKey")
.HasColumnType("int");
b.Property("SeasonNumber")
.HasColumnType("int");
b.Property("Title")
.HasColumnType("longtext");
b.HasKey("Id");
b.HasIndex("GrandparentKey");
b.ToTable("PlexEpisode");
});
modelBuilder.Entity("Ombi.Store.Entities.PlexSeasonsContent", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property("ParentKey")
.HasColumnType("int");
b.Property("PlexContentId")
.HasColumnType("int");
b.Property("PlexServerContentId")
.HasColumnType("int");
b.Property("SeasonKey")
.HasColumnType("int");
b.Property("SeasonNumber")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("PlexServerContentId");
b.ToTable("PlexSeasonsContent");
});
modelBuilder.Entity("Ombi.Store.Entities.PlexServerContent", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property("AddedAt")
.HasColumnType("datetime(6)");
b.Property("ImdbId")
.HasColumnType("longtext");
b.Property("Key")
.HasColumnType("int");
b.Property("Quality")
.HasColumnType("longtext");
b.Property("ReleaseYear")
.HasColumnType("longtext");
b.Property("RequestId")
.HasColumnType("int");
b.Property("TheMovieDbId")
.HasColumnType("longtext");
b.Property("Title")
.HasColumnType("longtext");
b.Property("TvDbId")
.HasColumnType("longtext");
b.Property("Type")
.HasColumnType("int");
b.Property("Url")
.HasColumnType("longtext");
b.HasKey("Id");
b.ToTable("PlexServerContent");
});
modelBuilder.Entity("Ombi.Store.Entities.RadarrCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property("HasFile")
.HasColumnType("tinyint(1)");
b.Property("TheMovieDbId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("RadarrCache");
});
modelBuilder.Entity("Ombi.Store.Entities.SickRageCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property("TvDbId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("SickRageCache");
});
modelBuilder.Entity("Ombi.Store.Entities.SickRageEpisodeCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property("EpisodeNumber")
.HasColumnType("int");
b.Property("SeasonNumber")
.HasColumnType("int");
b.Property("TvDbId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("SickRageEpisodeCache");
});
modelBuilder.Entity("Ombi.Store.Entities.SonarrCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property("TvDbId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("SonarrCache");
});
modelBuilder.Entity("Ombi.Store.Entities.SonarrEpisodeCache", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property("EpisodeNumber")
.HasColumnType("int");
b.Property("HasFile")
.HasColumnType("tinyint(1)");
b.Property("SeasonNumber")
.HasColumnType("int");
b.Property("TvDbId")
.HasColumnType("int");
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");
b.Navigation("Series");
});
modelBuilder.Entity("Ombi.Store.Entities.JellyfinEpisode", b =>
{
b.HasOne("Ombi.Store.Entities.JellyfinContent", "Series")
.WithMany("Episodes")
.HasForeignKey("ParentId")
.HasPrincipalKey("JellyfinId");
b.Navigation("Series");
});
modelBuilder.Entity("Ombi.Store.Entities.PlexEpisode", b =>
{
b.HasOne("Ombi.Store.Entities.PlexServerContent", "Series")
.WithMany("Episodes")
.HasForeignKey("GrandparentKey")
.HasPrincipalKey("Key")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Series");
});
modelBuilder.Entity("Ombi.Store.Entities.PlexSeasonsContent", b =>
{
b.HasOne("Ombi.Store.Entities.PlexServerContent", null)
.WithMany("Seasons")
.HasForeignKey("PlexServerContentId");
});
modelBuilder.Entity("Ombi.Store.Entities.EmbyContent", b =>
{
b.Navigation("Episodes");
});
modelBuilder.Entity("Ombi.Store.Entities.JellyfinContent", b =>
{
b.Navigation("Episodes");
});
modelBuilder.Entity("Ombi.Store.Entities.PlexServerContent", b =>
{
b.Navigation("Episodes");
b.Navigation("Seasons");
});
#pragma warning restore 612, 618
}
}
}