// <auto-generated />
using System;
using EmployeeManagmentDataBaseImplement;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

#nullable disable

namespace EmployeeManagmentDataBaseImplement.Migrations
{
    [DbContext(typeof(EmployeeManagementDbContext))]
    partial class EmployeeManagementDbContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "8.0.10")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);

            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

            modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.Employee", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<float>("Bid")
                        .HasColumnType("real");

                    b.Property<DateTime?>("EndJob")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("NameJob")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<string>("PartTimeJob")
                        .HasColumnType("text");

                    b.Property<int?>("PhisicalPersonsId")
                        .HasColumnType("integer");

                    b.Property<DateTime?>("StartJob")
                        .HasColumnType("timestamp with time zone");

                    b.HasKey("Id");

                    b.HasIndex("PhisicalPersonsId");

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

            modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.PhisicalPerson", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<string>("Address")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<DateTime>("Birthday")
                        .HasColumnType("timestamp with time zone");

                    b.Property<string>("Gender")
                        .IsRequired()
                        .HasColumnType("text");

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

                    b.Property<string>("Patronymic")
                        .HasColumnType("text");

                    b.Property<string>("Surname")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<string>("Telephone")
                        .IsRequired()
                        .HasColumnType("text");

                    b.HasKey("Id");

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

            modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.Salary", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<int>("CountHours")
                        .HasColumnType("integer");

                    b.Property<DateTime?>("Data")
                        .HasColumnType("timestamp with time zone");

                    b.Property<int?>("EmployeesId")
                        .HasColumnType("integer");

                    b.Property<bool>("Passed")
                        .HasColumnType("boolean");

                    b.Property<float?>("Premium")
                        .HasColumnType("real");

                    b.Property<float>("PriceHour")
                        .HasColumnType("real");

                    b.HasKey("Id");

                    b.HasIndex("EmployeesId");

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

            modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.Vacation", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<int?>("EmployeesId")
                        .HasColumnType("integer");

                    b.Property<DateTime>("EndData")
                        .HasColumnType("timestamp with time zone");

                    b.Property<bool>("Passed")
                        .HasColumnType("boolean");

                    b.Property<DateTime>("StartData")
                        .HasColumnType("timestamp with time zone");

                    b.HasKey("Id");

                    b.HasIndex("EmployeesId");

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

            modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.Employee", b =>
                {
                    b.HasOne("EmployeeManagmentDataBaseImplement.Models.PhisicalPerson", "PhisicalPerson")
                        .WithMany("Employees")
                        .HasForeignKey("PhisicalPersonsId");

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

            modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.Salary", b =>
                {
                    b.HasOne("EmployeeManagmentDataBaseImplement.Models.Employee", "Employee")
                        .WithMany("Salaries")
                        .HasForeignKey("EmployeesId");

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

            modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.Vacation", b =>
                {
                    b.HasOne("EmployeeManagmentDataBaseImplement.Models.Employee", "Employee")
                        .WithMany("Vacations")
                        .HasForeignKey("EmployeesId");

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

            modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.Employee", b =>
                {
                    b.Navigation("Salaries");

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

            modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.PhisicalPerson", b =>
                {
                    b.Navigation("Employees");
                });
#pragma warning restore 612, 618
        }
    }
}