2017-09-01 08:55:02 +00:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage.Internal;
|
|
|
|
|
using System;
|
|
|
|
|
using YTManager;
|
|
|
|
|
|
|
|
|
|
namespace YTManager.Migrations
|
|
|
|
|
{
|
|
|
|
|
[DbContext(typeof(MediaDB))]
|
|
|
|
|
partial class MediaDBModelSnapshot : ModelSnapshot
|
|
|
|
|
{
|
|
|
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
#pragma warning disable 612, 618
|
|
|
|
|
modelBuilder
|
|
|
|
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
|
|
|
|
.HasAnnotation("ProductVersion", "2.0.0-rtm-26452");
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("YTManager.Models.Channel", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<long>("ChannelId")
|
|
|
|
|
.ValueGeneratedOnAdd();
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Description")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ThumbnailURL")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Title")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Property<string>("YTChannelID")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasKey("ChannelId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Channels");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("YTManager.Models.Video", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<long>("VideoId")
|
|
|
|
|
.ValueGeneratedOnAdd();
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("AddedtoDB");
|
|
|
|
|
|
|
|
|
|
b.Property<long>("ChannelId");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Description")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ThumbnailURL")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Title")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("Uploaded");
|
|
|
|
|
|
2017-09-03 01:05:50 +00:00
|
|
|
|
b.Property<string>("YTChannelID")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2017-09-01 08:55:02 +00:00
|
|
|
|
b.Property<string>("YTVideoID")
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasKey("VideoId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ChannelId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Videos");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("YTManager.Models.Video", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("YTManager.Models.Channel", "Channel")
|
|
|
|
|
.WithMany("Videos")
|
|
|
|
|
.HasForeignKey("ChannelId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
|
});
|
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|