// <auto-generated />
using System;
using AcademyManager.Infraestructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

#nullable disable

namespace AcademyManager.Migrations
{
    [DbContext(typeof(DataContext))]
    partial class DataContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "7.0.7")
                .HasAnnotation("Relational:MaxIdentifierLength", 128);

            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);

            modelBuilder.Entity("AcademyManager.Domain.Academy", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));

                    b.Property<DateTime>("CreatedDate")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("datetime")
                        .HasDefaultValueSql("(getutcdate())");

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

                    b.Property<bool>("Enabled")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bit")
                        .HasDefaultValueSql("((1))");

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

                    b.Property<DateTime?>("UpdatedDate")
                        .HasColumnType("datetime");

                    b.HasKey("Id");

                    b.ToTable("Academy", (string)null);
                });

            modelBuilder.Entity("AcademyManager.Domain.Classroom", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));

                    b.Property<int>("AcademyId")
                        .HasColumnType("int");

                    b.Property<DateTime>("CreatedDate")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("datetime")
                        .HasDefaultValueSql("(getutcdate())");

                    b.Property<bool>("Enabled")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bit")
                        .HasDefaultValueSql("((1))");

                    b.Property<int>("Number")
                        .HasColumnType("int");

                    b.Property<DateTime?>("UpdatedDate")
                        .HasColumnType("datetime");

                    b.HasKey("Id");

                    b.HasIndex(new[] { "AcademyId" }, "IX_Classroom_AcademyId");

                    b.ToTable("Classroom", (string)null);
                });

            modelBuilder.Entity("AcademyManager.Domain.Course", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));

                    b.Property<int>("AcademyId")
                        .HasColumnType("int");

                    b.Property<int>("ClassroomId")
                        .HasColumnType("int");

                    b.Property<DateTime>("CreatedDate")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("datetime")
                        .HasDefaultValueSql("(getutcdate())");

                    b.Property<bool>("Enabled")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bit")
                        .HasDefaultValueSql("((1))");

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

                    b.Property<DateTime?>("UpdatedDate")
                        .HasColumnType("datetime");

                    b.HasKey("Id");

                    b.HasIndex("ClassroomId");

                    b.HasIndex(new[] { "AcademyId" }, "IX_Course_AcademyId");

                    b.ToTable("Course", (string)null);
                });

            modelBuilder.Entity("AcademyManager.Domain.Subject", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));

                    b.Property<int>("AcademyId")
                        .HasColumnType("int");

                    b.Property<int>("CourseId")
                        .HasColumnType("int");

                    b.Property<DateTime>("CreatedDate")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("datetime")
                        .HasDefaultValueSql("(getutcdate())");

                    b.Property<bool>("Enabled")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bit")
                        .HasDefaultValueSql("((1))");

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

                    b.Property<int>("TeacherId")
                        .HasColumnType("int");

                    b.Property<DateTime?>("UpdatedDate")
                        .HasColumnType("datetime");

                    b.HasKey("Id");

                    b.HasIndex("CourseId");

                    b.HasIndex("TeacherId");

                    b.HasIndex(new[] { "AcademyId" }, "IX_Subject_AcademyId");

                    b.ToTable("Subject", (string)null);
                });

            modelBuilder.Entity("AcademyManager.Domain.Teacher", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));

                    b.Property<int>("AcademyId")
                        .HasColumnType("int");

                    b.Property<DateTime>("CreatedDate")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("datetime")
                        .HasDefaultValueSql("(getutcdate())");

                    b.Property<bool>("Enabled")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("bit")
                        .HasDefaultValueSql("((1))");

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

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

                    b.Property<DateTime?>("UpdatedDate")
                        .HasColumnType("datetime");

                    b.HasKey("Id");

                    b.HasIndex(new[] { "AcademyId" }, "IX_Teacher_AcademyId");

                    b.ToTable("Teacher", (string)null);
                });

            modelBuilder.Entity("AcademyManager.Domain.Classroom", b =>
                {
                    b.HasOne("AcademyManager.Domain.Academy", "Academy")
                        .WithMany("Classroom")
                        .HasForeignKey("AcademyId")
                        .IsRequired();

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

            modelBuilder.Entity("AcademyManager.Domain.Course", b =>
                {
                    b.HasOne("AcademyManager.Domain.Academy", "Academy")
                        .WithMany("Course")
                        .HasForeignKey("AcademyId")
                        .IsRequired();

                    b.HasOne("AcademyManager.Domain.Classroom", "Classroom")
                        .WithMany("Course")
                        .HasForeignKey("ClassroomId")
                        .IsRequired();

                    b.Navigation("Academy");

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

            modelBuilder.Entity("AcademyManager.Domain.Subject", b =>
                {
                    b.HasOne("AcademyManager.Domain.Academy", "Academy")
                        .WithMany("Subject")
                        .HasForeignKey("AcademyId")
                        .IsRequired();

                    b.HasOne("AcademyManager.Domain.Course", "Course")
                        .WithMany("Subject")
                        .HasForeignKey("CourseId")
                        .IsRequired();

                    b.HasOne("AcademyManager.Domain.Teacher", "Teacher")
                        .WithMany("Subject")
                        .HasForeignKey("TeacherId")
                        .IsRequired();

                    b.Navigation("Academy");

                    b.Navigation("Course");

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

            modelBuilder.Entity("AcademyManager.Domain.Teacher", b =>
                {
                    b.HasOne("AcademyManager.Domain.Academy", "Academy")
                        .WithMany("Teacher")
                        .HasForeignKey("AcademyId")
                        .IsRequired();

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

            modelBuilder.Entity("AcademyManager.Domain.Academy", b =>
                {
                    b.Navigation("Classroom");

                    b.Navigation("Course");

                    b.Navigation("Subject");

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

            modelBuilder.Entity("AcademyManager.Domain.Classroom", b =>
                {
                    b.Navigation("Course");
                });

            modelBuilder.Entity("AcademyManager.Domain.Course", b =>
                {
                    b.Navigation("Subject");
                });

            modelBuilder.Entity("AcademyManager.Domain.Teacher", b =>
                {
                    b.Navigation("Subject");
                });
#pragma warning restore 612, 618
        }
    }
}
