// using System; using EmployeeManagmentDataBaseImplement; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace EmployeeManagmentDataBaseImplement.Migrations { [DbContext(typeof(EmployeeManagementDbContext))] [Migration("20241113084724_InitialMigration")] partial class InitialMigration { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "8.0.10") .HasAnnotation("Relational:MaxIdentifierLength", 64); modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.Employee", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property("Bid") .HasColumnType("float"); b.Property("EndJob") .HasColumnType("datetime(6)"); b.Property("NameJob") .IsRequired() .HasColumnType("longtext"); b.Property("PartTimeJob") .HasColumnType("longtext"); b.Property("PhisicalPersonsId") .HasColumnType("int"); b.Property("StartJob") .HasColumnType("datetime(6)"); b.HasKey("Id"); b.HasIndex("PhisicalPersonsId"); b.ToTable("Employees"); }); modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.PhisicalPerson", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property("Address") .IsRequired() .HasColumnType("longtext"); b.Property("Birthday") .HasColumnType("datetime(6)"); b.Property("Gender") .IsRequired() .HasColumnType("longtext"); b.Property("Name") .IsRequired() .HasColumnType("longtext"); b.Property("Patronymic") .HasColumnType("longtext"); b.Property("Surname") .IsRequired() .HasColumnType("longtext"); b.Property("Telephone") .IsRequired() .HasColumnType("longtext"); b.HasKey("Id"); b.ToTable("PhysicalPersons"); }); modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.Salary", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property("CountHours") .HasColumnType("int"); b.Property("Data") .HasColumnType("datetime(6)"); b.Property("EmployeesId") .HasColumnType("int"); b.Property("Passed") .HasColumnType("tinyint(1)"); b.Property("Premium") .HasColumnType("float"); b.Property("PriceHour") .HasColumnType("float"); b.HasKey("Id"); b.HasIndex("EmployeesId"); b.ToTable("Salaries"); }); modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.Vacation", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property("EmployeesId") .HasColumnType("int"); b.Property("EndData") .HasColumnType("datetime(6)"); b.Property("Passed") .HasColumnType("tinyint(1)"); b.Property("StartData") .HasColumnType("datetime(6)"); 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") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("PhisicalPerson"); }); modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.Salary", b => { b.HasOne("EmployeeManagmentDataBaseImplement.Models.Employee", "Employee") .WithMany("Salaries") .HasForeignKey("EmployeesId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Employee"); }); modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.Vacation", b => { b.HasOne("EmployeeManagmentDataBaseImplement.Models.Employee", "Employee") .WithMany("Vacations") .HasForeignKey("EmployeesId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); 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 } } }