// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Model.DAL;

#nullable disable

namespace Model.Migrations
{
    [DbContext(typeof(ZooDBContext))]
    [Migration("20221109104643_fix")]
    partial class fix
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "7.0.0")
                .HasAnnotation("Relational:MaxIdentifierLength", 128);

            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);

            modelBuilder.Entity("Model.Models.Animel", b =>
                {
                    b.Property<Guid>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<DateTime>("BirthDate")
                        .HasColumnType("datetime2");

                    b.Property<Guid?>("CategoryID")
                        .IsRequired()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("Description")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("Image")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("ID");

                    b.HasIndex("CategoryID");

                    b.ToTable("Animel");

                    b.HasData(
                        new
                        {
                            ID = new Guid("3e2a4b8b-8b48-4074-aa49-99f51720e0e5"),
                            BirthDate = new DateTime(2002, 6, 12, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            CategoryID = new Guid("9aedc624-4b60-459a-84c2-246f8f91da6b"),
                            Description = "",
                            Image = "~/Images/Defult.jpg",
                            Name = "Elephent"
                        },
                        new
                        {
                            ID = new Guid("894f13d0-5ef6-43dc-be09-0fd47af00796"),
                            BirthDate = new DateTime(2009, 12, 12, 0, 0, 0, 0, DateTimeKind.Unspecified),
                            CategoryID = new Guid("9cb6f21a-2821-47d0-b3a9-b1bec34451e6"),
                            Description = "",
                            Image = "~/Images/Defult.jpg",
                            Name = "Eagel"
                        });
                });

            modelBuilder.Entity("Model.Models.Category", b =>
                {
                    b.Property<Guid>("CategoryID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("CategoryID");

                    b.ToTable("Category");

                    b.HasData(
                        new
                        {
                            CategoryID = new Guid("9aedc624-4b60-459a-84c2-246f8f91da6b"),
                            Name = "Mammal"
                        },
                        new
                        {
                            CategoryID = new Guid("9cb6f21a-2821-47d0-b3a9-b1bec34451e6"),
                            Name = "Avian"
                        });
                });

            modelBuilder.Entity("Model.Models.Comment", b =>
                {
                    b.Property<Guid>("CommentId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier");

                    b.Property<Guid>("AnimelID")
                        .HasColumnType("uniqueidentifier");

                    b.Property<string>("Content")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("CommentId");

                    b.HasIndex("AnimelID");

                    b.ToTable("Comment");

                    b.HasData(
                        new
                        {
                            CommentId = new Guid("30d9a3d3-c93b-437b-86e3-2327c0e5f4a6"),
                            AnimelID = new Guid("3e2a4b8b-8b48-4074-aa49-99f51720e0e5"),
                            Content = "Content"
                        },
                        new
                        {
                            CommentId = new Guid("bd0bf81b-2d86-47cf-84aa-6d75dcc21ab4"),
                            AnimelID = new Guid("894f13d0-5ef6-43dc-be09-0fd47af00796"),
                            Content = "Content"
                        });
                });

            modelBuilder.Entity("Model.Models.Animel", b =>
                {
                    b.HasOne("Model.Models.Category", "Category")
                        .WithMany()
                        .HasForeignKey("CategoryID")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Category");
                });

            modelBuilder.Entity("Model.Models.Comment", b =>
                {
                    b.HasOne("Model.Models.Animel", "Animel")
                        .WithMany("Comments")
                        .HasForeignKey("AnimelID")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Animel");
                });

            modelBuilder.Entity("Model.Models.Animel", b =>
                {
                    b.Navigation("Comments");
                });
#pragma warning restore 612, 618
        }
    }
}
