// <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.Database.Migrations
{
    [DbContext(typeof(BotDb))]
    [Migration("20190307173026_PermanentWarnings")]
    partial class PermanentWarnings
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "2.2.2-servicing-10034");

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

                    b.Property<string>("Key")
                        .HasColumnName("key");

                    b.Property<string>("Value")
                        .HasColumnName("value");

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

                    b.HasIndex("Key")
                        .IsUnique()
                        .HasName("bot_state_key");

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

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

                    b.Property<string>("Command")
                        .IsRequired()
                        .HasColumnName("command");

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

                    b.HasIndex("Command")
                        .IsUnique()
                        .HasName("disabled_command_command");

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

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

                    b.Property<long>("End")
                        .HasColumnName("end");

                    b.Property<string>("EventName")
                        .HasColumnName("event_name");

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

                    b.Property<long>("Start")
                        .HasColumnName("start");

                    b.Property<int>("Year")
                        .HasColumnName("year");

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

                    b.HasIndex("Year", "EventName")
                        .HasName("event_schedule_year_event_name");

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

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

                    b.Property<byte[]>("Attachment")
                        .HasColumnName("attachment")
                        .HasMaxLength(7340032);

                    b.Property<string>("AttachmentFilename")
                        .HasColumnName("attachment_filename");

                    b.Property<string>("Keyword")
                        .IsRequired()
                        .HasColumnName("keyword");

                    b.Property<string>("Text")
                        .IsRequired()
                        .HasColumnName("text");

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

                    b.HasIndex("Keyword")
                        .IsUnique()
                        .HasName("explanation_keyword");

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

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

                    b.Property<ulong>("DiscordId")
                        .HasColumnName("discord_id");

                    b.Property<bool>("Sudoer")
                        .HasColumnName("sudoer");

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

                    b.HasIndex("DiscordId")
                        .IsUnique()
                        .HasName("moderator_discord_id");

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

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

                    b.Property<string>("String")
                        .IsRequired()
                        .HasColumnName("string")
                        .HasColumnType("varchar(255)");

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

                    b.HasIndex("String")
                        .IsUnique()
                        .HasName("piracystring_string");

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

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

                    b.Property<string>("Category")
                        .IsRequired()
                        .HasColumnName("category");

                    b.Property<long>("ExpirationTimestamp")
                        .HasColumnName("expiration_timestamp");

                    b.Property<string>("Key")
                        .IsRequired()
                        .HasColumnName("key");

                    b.Property<int>("Value")
                        .HasColumnName("value");

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

                    b.HasIndex("Category", "Key")
                        .IsUnique()
                        .HasName("stats_category_key");

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

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

                    b.Property<ulong>("DiscordId")
                        .HasColumnName("discord_id");

                    b.Property<string>("FullReason")
                        .IsRequired()
                        .HasColumnName("full_reason");

                    b.Property<ulong>("IssuerId")
                        .HasColumnName("issuer_id");

                    b.Property<string>("Reason")
                        .IsRequired()
                        .HasColumnName("reason");

                    b.Property<bool>("Retracted")
                        .HasColumnName("retracted");

                    b.Property<ulong?>("RetractedBy")
                        .HasColumnName("retracted_by");

                    b.Property<string>("RetractionReason")
                        .HasColumnName("retraction_reason");

                    b.Property<long?>("RetractionTimestamp")
                        .HasColumnName("retraction_timestamp");

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

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

                    b.HasIndex("DiscordId")
                        .HasName("warning_discord_id");

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

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

                    b.Property<ulong>("GuildId")
                        .HasColumnName("guild_id");

                    b.Property<string>("InviteCode")
                        .HasColumnName("invite_code");

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

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

                    b.HasIndex("GuildId")
                        .IsUnique()
                        .HasName("whitelisted_invite_guild_id");

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