198 lines
6.7 KiB
C#
198 lines
6.7 KiB
C#
// <auto-generated />
|
|
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
|
|
{
|
|
/// <inheritdoc />
|
|
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<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
b.Property<float>("Bid")
|
|
.HasColumnType("float");
|
|
|
|
b.Property<DateTime?>("EndJob")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("NameJob")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("PartTimeJob")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<int>("PhisicalPersonsId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("StartJob")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("PhisicalPersonsId");
|
|
|
|
b.ToTable("Employees");
|
|
});
|
|
|
|
modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.PhisicalPerson", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Address")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<DateTime>("Birthday")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("Gender")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("Patronymic")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("Surname")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("Telephone")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("PhysicalPersons");
|
|
});
|
|
|
|
modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.Salary", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("CountHours")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("Data")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<int>("EmployeesId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool>("Passed")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<float?>("Premium")
|
|
.HasColumnType("float");
|
|
|
|
b.Property<float>("PriceHour")
|
|
.HasColumnType("float");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("EmployeesId");
|
|
|
|
b.ToTable("Salaries");
|
|
});
|
|
|
|
modelBuilder.Entity("EmployeeManagmentDataBaseImplement.Models.Vacation", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("EmployeesId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime>("EndData")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<bool>("Passed")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<DateTime>("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
|
|
}
|
|
}
|
|
}
|