201 lines
6.7 KiB
C#
201 lines
6.7 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using EmployeeManager.Model.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace EmployeeManager.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationConext))]
|
|
partial class ApplicationConextModelSnapshot : 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("EmployeeManager.Model.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?>("PhysicalPersonsId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("StartJob")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("PhysicalPersonsId");
|
|
|
|
b.ToTable("Employees");
|
|
});
|
|
|
|
modelBuilder.Entity("EmployeeManager.Model.PhysicalPerson", 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>("NamePhysicalPersons")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PatronomicPhysicalPersons")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("SurnamePhysicalPersons")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Telephone")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("PhysicalPersons");
|
|
});
|
|
|
|
modelBuilder.Entity("EmployeeManager.Model.Salary", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("CountHours")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime?>("Date")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<int?>("EmployeeId")
|
|
.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("EmployeeId");
|
|
|
|
b.ToTable("Salaries");
|
|
});
|
|
|
|
modelBuilder.Entity("EmployeeManager.Model.Vacation", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int?>("EmployeeId")
|
|
.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("EmployeeId");
|
|
|
|
b.ToTable("Vacations");
|
|
});
|
|
|
|
modelBuilder.Entity("EmployeeManager.Model.Employee", b =>
|
|
{
|
|
b.HasOne("EmployeeManager.Model.PhysicalPerson", "PhysicalPersons")
|
|
.WithMany("Employees")
|
|
.HasForeignKey("PhysicalPersonsId");
|
|
|
|
b.Navigation("PhysicalPersons");
|
|
});
|
|
|
|
modelBuilder.Entity("EmployeeManager.Model.Salary", b =>
|
|
{
|
|
b.HasOne("EmployeeManager.Model.Employee", "Employees")
|
|
.WithMany("Salarys")
|
|
.HasForeignKey("EmployeeId");
|
|
|
|
b.Navigation("Employees");
|
|
});
|
|
|
|
modelBuilder.Entity("EmployeeManager.Model.Vacation", b =>
|
|
{
|
|
b.HasOne("EmployeeManager.Model.Employee", "Employees")
|
|
.WithMany("Vacations")
|
|
.HasForeignKey("EmployeeId");
|
|
|
|
b.Navigation("Employees");
|
|
});
|
|
|
|
modelBuilder.Entity("EmployeeManager.Model.Employee", b =>
|
|
{
|
|
b.Navigation("Salarys");
|
|
|
|
b.Navigation("Vacations");
|
|
});
|
|
|
|
modelBuilder.Entity("EmployeeManager.Model.PhysicalPerson", b =>
|
|
{
|
|
b.Navigation("Employees");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|