//
using System;
using Manager.Data.Contexts;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Manager.Data.Migrations
{
[DbContext(typeof(LibraryDbContext))]
partial class LibraryDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.19");
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.CaptionEntity", b =>
{
b.Property("MediaId")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("LanguageCode")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.HasKey("MediaId", "LanguageCode");
b.ToTable("captions", (string)null);
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.ChannelEntity", b =>
{
b.Property("Id")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("CreatedAtUtc")
.HasColumnType("TEXT");
b.Property("Description")
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("JoinedDate")
.HasColumnType("TEXT");
b.Property("LastModifiedUtc")
.HasColumnType("TEXT");
b.Property("Name")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("Subscribers")
.HasColumnType("INTEGER");
b.Property("TotalVideos")
.HasColumnType("INTEGER");
b.Property("TotalViews")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("channels", (string)null);
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.ClientAccountEntity", b =>
{
b.Property("Id")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("CreatedAtUtc")
.HasColumnType("TEXT");
b.Property("LastModifiedUtc")
.HasColumnType("TEXT");
b.Property("UserAgent")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("client_accounts", (string)null);
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.HttpCookieEntity", b =>
{
b.Property("Name")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("ClientId")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("CreatedAtUtc")
.HasColumnType("TEXT");
b.Property("Domain")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("ExpiresUtc")
.HasColumnType("TEXT");
b.Property("HttpOnly")
.HasColumnType("INTEGER");
b.Property("LastModifiedUtc")
.HasColumnType("TEXT");
b.Property("Path")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("SameSite")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("Secure")
.HasColumnType("INTEGER");
b.Property("Value")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.HasKey("Name");
b.HasIndex("ClientId");
b.ToTable("http_cookies", (string)null);
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.Join.PlaylistMedia", b =>
{
b.Property("PlaylistId")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("MediaId")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("DateAddedUtc")
.HasColumnType("TEXT");
b.Property("DateModifiedUtc")
.HasColumnType("TEXT");
b.HasKey("PlaylistId", "MediaId");
b.HasIndex("MediaId");
b.ToTable("join_playlist_media", (string)null);
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.MediaEntity", b =>
{
b.Property("Id")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("ChannelId")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("CreatedAtUtc")
.HasColumnType("TEXT");
b.Property("Description")
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("ExternalState")
.HasColumnType("INTEGER");
b.Property("IsDownloaded")
.HasColumnType("INTEGER");
b.Property("LastModifiedUtc")
.HasColumnType("TEXT");
b.Property("State")
.HasColumnType("INTEGER");
b.Property("Title")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("UploadDateUtc")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ChannelId");
b.ToTable("media", (string)null);
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.MediaFormatEntity", b =>
{
b.Property("MediaId")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("Itag")
.HasColumnType("INTEGER");
b.Property("ApproxDurationMs")
.HasColumnType("INTEGER");
b.Property("AudioChannels")
.HasColumnType("INTEGER");
b.Property("AudioSampleRate")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("AverageBitrate")
.HasColumnType("INTEGER");
b.Property("Bitrate")
.HasColumnType("INTEGER");
b.Property("ContentLengthBytes")
.HasColumnType("INTEGER");
b.Property("Framerate")
.HasColumnType("REAL");
b.Property("Height")
.HasColumnType("INTEGER");
b.Property("IsAdaptive")
.HasColumnType("INTEGER");
b.Property("LastModifiedUnixEpoch")
.HasColumnType("INTEGER");
b.Property("LoudnessDb")
.HasColumnType("REAL");
b.Property("MimeType")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("Quality")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("QualityLabel")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("Width")
.HasColumnType("INTEGER");
b.HasKey("MediaId", "Itag");
b.ToTable("media_formats", (string)null);
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.PlaylistEntity", b =>
{
b.Property("Id")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("ChannelId")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("CreatedAtUtc")
.HasColumnType("TEXT");
b.Property("Description")
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("LastModifiedUtc")
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ChannelId");
b.ToTable("playlists", (string)null);
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.CaptionEntity", b =>
{
b.HasOne("Manager.Data.Entities.LibraryContext.MediaEntity", null)
.WithMany("Captions")
.HasForeignKey("MediaId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.ClientAccountEntity", b =>
{
b.HasOne("Manager.Data.Entities.LibraryContext.ChannelEntity", null)
.WithOne("ClientAccount")
.HasForeignKey("Manager.Data.Entities.LibraryContext.ClientAccountEntity", "Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.HttpCookieEntity", b =>
{
b.HasOne("Manager.Data.Entities.LibraryContext.ClientAccountEntity", null)
.WithMany("HttpCookies")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.Join.PlaylistMedia", b =>
{
b.HasOne("Manager.Data.Entities.LibraryContext.MediaEntity", null)
.WithMany("PlaylistMedias")
.HasForeignKey("MediaId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Manager.Data.Entities.LibraryContext.PlaylistEntity", null)
.WithMany("PlaylistMedias")
.HasForeignKey("PlaylistId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.MediaEntity", b =>
{
b.HasOne("Manager.Data.Entities.LibraryContext.ChannelEntity", null)
.WithMany("Media")
.HasForeignKey("ChannelId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.MediaFormatEntity", b =>
{
b.HasOne("Manager.Data.Entities.LibraryContext.MediaEntity", null)
.WithMany("Formats")
.HasForeignKey("MediaId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.PlaylistEntity", b =>
{
b.HasOne("Manager.Data.Entities.LibraryContext.ChannelEntity", null)
.WithMany("Playlists")
.HasForeignKey("ChannelId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.ChannelEntity", b =>
{
b.Navigation("ClientAccount");
b.Navigation("Media");
b.Navigation("Playlists");
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.ClientAccountEntity", b =>
{
b.Navigation("HttpCookies");
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.MediaEntity", b =>
{
b.Navigation("Captions");
b.Navigation("Formats");
b.Navigation("PlaylistMedias");
});
modelBuilder.Entity("Manager.Data.Entities.LibraryContext.PlaylistEntity", b =>
{
b.Navigation("PlaylistMedias");
});
#pragma warning restore 612, 618
}
}
}