// <auto-generated />
using BasicApi.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

namespace BasicApi.Migrations
{
    [DbContext(typeof(BasicApiContext))]
    partial class BasicApiContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
                .HasAnnotation("ProductVersion", "2.1.0-rtm-30799")
                .HasAnnotation("Relational:MaxIdentifierLength", 63)
                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

            modelBuilder.Entity("BasicApi.Models.Category", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

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

                    b.HasKey("Id");

                    b.ToTable("Categories");

                    b.HasData(
                        new { Id = -1, Name = "Dogs" },
                        new { Id = -2, Name = "Cats" },
                        new { Id = -3, Name = "Rabbits" },
                        new { Id = -4, Name = "Lions" }
                    );
                });

            modelBuilder.Entity("BasicApi.Models.Image", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

                    b.Property<int?>("PetId");

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

                    b.HasKey("Id");

                    b.HasIndex("PetId");

                    b.ToTable("Images");

                    b.HasData(
                        new { Id = -1, PetId = -1, Url = "http://example.com/pets/-1_1.png" },
                        new { Id = -2, PetId = -2, Url = "http://example.com/pets/-2_1.png" },
                        new { Id = -3, PetId = -3, Url = "http://example.com/pets/-3_1.png" },
                        new { Id = -4, PetId = -4, Url = "http://example.com/pets/-4_1.png" },
                        new { Id = -5, PetId = -5, Url = "http://example.com/pets/-5_1.png" },
                        new { Id = -6, PetId = -6, Url = "http://example.com/pets/-6_1.png" },
                        new { Id = -7, PetId = -7, Url = "http://example.com/pets/-7_1.png" },
                        new { Id = -8, PetId = -8, Url = "http://example.com/pets/-8_1.png" },
                        new { Id = -9, PetId = -9, Url = "http://example.com/pets/-9_1.png" },
                        new { Id = -10, PetId = -10, Url = "http://example.com/pets/-10_1.png" },
                        new { Id = -11, PetId = -11, Url = "http://example.com/pets/-11_1.png" },
                        new { Id = -12, PetId = -12, Url = "http://example.com/pets/-12_1.png" }
                    );
                });

            modelBuilder.Entity("BasicApi.Models.Pet", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

                    b.Property<int>("Age");

                    b.Property<int?>("CategoryId");

                    b.Property<bool>("HasVaccinations");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(50);

                    b.Property<string>("Status")
                        .IsRequired();

                    b.HasKey("Id");

                    b.HasIndex("CategoryId");

                    b.ToTable("Pets");

                    b.HasData(
                        new { Id = -1, Age = 1, CategoryId = -1, HasVaccinations = true, Name = "Dogs1", Status = "available" },
                        new { Id = -2, Age = 1, CategoryId = -1, HasVaccinations = true, Name = "Dogs2", Status = "available" },
                        new { Id = -3, Age = 1, CategoryId = -1, HasVaccinations = true, Name = "Dogs3", Status = "available" },
                        new { Id = -4, Age = 1, CategoryId = -2, HasVaccinations = true, Name = "Cats1", Status = "available" },
                        new { Id = -5, Age = 1, CategoryId = -2, HasVaccinations = true, Name = "Cats2", Status = "available" },
                        new { Id = -6, Age = 1, CategoryId = -2, HasVaccinations = true, Name = "Cats3", Status = "available" },
                        new { Id = -7, Age = 1, CategoryId = -3, HasVaccinations = true, Name = "Rabbits1", Status = "available" },
                        new { Id = -8, Age = 1, CategoryId = -3, HasVaccinations = true, Name = "Rabbits2", Status = "available" },
                        new { Id = -9, Age = 1, CategoryId = -3, HasVaccinations = true, Name = "Rabbits3", Status = "available" },
                        new { Id = -10, Age = 1, CategoryId = -4, HasVaccinations = true, Name = "Lions1", Status = "available" },
                        new { Id = -11, Age = 1, CategoryId = -4, HasVaccinations = true, Name = "Lions2", Status = "available" },
                        new { Id = -12, Age = 1, CategoryId = -4, HasVaccinations = true, Name = "Lions3", Status = "available" }
                    );
                });

            modelBuilder.Entity("BasicApi.Models.Tag", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

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

                    b.Property<int?>("PetId");

                    b.HasKey("Id");

                    b.HasIndex("PetId");

                    b.ToTable("Tags");

                    b.HasData(
                        new { Id = -1, Name = "Tag1", PetId = -1 },
                        new { Id = -2, Name = "Tag1", PetId = -2 },
                        new { Id = -3, Name = "Tag1", PetId = -3 },
                        new { Id = -4, Name = "Tag1", PetId = -4 },
                        new { Id = -5, Name = "Tag1", PetId = -5 },
                        new { Id = -6, Name = "Tag1", PetId = -6 },
                        new { Id = -7, Name = "Tag1", PetId = -7 },
                        new { Id = -8, Name = "Tag1", PetId = -8 },
                        new { Id = -9, Name = "Tag1", PetId = -9 },
                        new { Id = -10, Name = "Tag1", PetId = -10 },
                        new { Id = -11, Name = "Tag1", PetId = -11 },
                        new { Id = -12, Name = "Tag1", PetId = -12 }
                    );
                });

            modelBuilder.Entity("BasicApi.Models.Image", b =>
                {
                    b.HasOne("BasicApi.Models.Pet")
                        .WithMany("Images")
                        .HasForeignKey("PetId");
                });

            modelBuilder.Entity("BasicApi.Models.Pet", b =>
                {
                    b.HasOne("BasicApi.Models.Category", "Category")
                        .WithMany()
                        .HasForeignKey("CategoryId");
                });

            modelBuilder.Entity("BasicApi.Models.Tag", b =>
                {
                    b.HasOne("BasicApi.Models.Pet")
                        .WithMany("Tags")
                        .HasForeignKey("PetId");
                });
#pragma warning restore 612, 618
        }
    }
}
