// <auto-generated />
using System;
using CompatBot.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

namespace CompatBot.Migrations
{
    [DbContext(typeof(ThumbnailDb))]
    [Migration("20190306154836_ThumbsColorCache")]
    partial class ThumbsColorCache
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "2.2.2-servicing-10034");

            modelBuilder.Entity("CompatBot.Database.State", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id");

                    b.Property<string>("Locale")
                        .HasColumnName("locale");

                    b.Property<long>("Timestamp")
                        .HasColumnName("timestamp");

                    b.HasKey("Id")
                        .HasName("id");

                    b.HasIndex("Locale")
                        .IsUnique()
                        .HasName("state_locale");

                    b.HasIndex("Timestamp")
                        .HasName("state_timestamp");

                    b.ToTable("state");
                });

            modelBuilder.Entity("CompatBot.Database.Thumbnail", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id");

                    b.Property<string>("ContentId")
                        .HasColumnName("content_id");

                    b.Property<string>("EmbeddableUrl")
                        .HasColumnName("embeddable_url");

                    b.Property<string>("Name")
                        .HasColumnName("name");

                    b.Property<string>("ProductCode")
                        .IsRequired()
                        .HasColumnName("product_code");

                    b.Property<long>("Timestamp")
                        .HasColumnName("timestamp");

                    b.Property<string>("Url")
                        .HasColumnName("url");

                    b.HasKey("Id")
                        .HasName("id");

                    b.HasIndex("ContentId")
                        .IsUnique()
                        .HasName("thumbnail_content_id");

                    b.HasIndex("ProductCode")
                        .IsUnique()
                        .HasName("thumbnail_product_code");

                    b.HasIndex("Timestamp")
                        .HasName("thumbnail_timestamp");

                    b.ToTable("thumbnail");
                });

            modelBuilder.Entity("CompatBot.Database.TitleInfo", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("id");

                    b.Property<string>("ContentId")
                        .IsRequired()
                        .HasColumnName("content_id");

                    b.Property<int?>("EmbedColor")
                        .HasColumnName("embed_color");

                    b.Property<string>("ThumbnailEmbeddableUrl")
                        .HasColumnName("thumbnail_embeddable_url");

                    b.Property<string>("ThumbnailUrl")
                        .HasColumnName("thumbnail_url");

                    b.Property<long>("Timestamp")
                        .HasColumnName("timestamp");

                    b.HasKey("Id")
                        .HasName("id");

                    b.HasIndex("ContentId")
                        .IsUnique()
                        .HasName("title_info_content_id");

                    b.HasIndex("Timestamp")
                        .HasName("title_info_timestamp");

                    b.ToTable("title_info");
                });
#pragma warning restore 612, 618
        }
    }
}
