// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using PersonnelDepartmentDatabaseImplement; #nullable disable namespace PersonnelDepartmentDatabaseImplement.Migrations { [DbContext(typeof(PersonnelDepartmentDatabase))] partial class PersonnelDepartmentDatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.5") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("PersonnelDepartmentDatabaseImplement.Models.Deal", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("DateFrom") .HasColumnType("timestamp with time zone"); b.Property("DateTo") .HasColumnType("timestamp with time zone"); b.Property("DepartmentId") .HasColumnType("integer"); b.Property("EmployeeId") .HasColumnType("integer"); b.Property("PositionId") .HasColumnType("integer"); b.Property("TypeId") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("DepartmentId"); b.HasIndex("EmployeeId"); b.HasIndex("PositionId"); b.HasIndex("TypeId"); b.ToTable("Deals"); }); modelBuilder.Entity("PersonnelDepartmentDatabaseImplement.Models.Department", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("Telephone") .HasColumnType("bigint"); b.HasKey("Id"); b.ToTable("Departments"); }); modelBuilder.Entity("PersonnelDepartmentDatabaseImplement.Models.Employee", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("FirstName") .IsRequired() .HasColumnType("text"); b.Property("LastName") .IsRequired() .HasColumnType("text"); b.Property("Patronymic") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Employees"); }); modelBuilder.Entity("PersonnelDepartmentDatabaseImplement.Models.Position", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Positions"); }); modelBuilder.Entity("PersonnelDepartmentDatabaseImplement.Models.Type", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Types"); }); modelBuilder.Entity("PersonnelDepartmentDatabaseImplement.Models.Deal", b => { b.HasOne("PersonnelDepartmentDatabaseImplement.Models.Department", "Department") .WithMany() .HasForeignKey("DepartmentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("PersonnelDepartmentDatabaseImplement.Models.Employee", "Employee") .WithMany() .HasForeignKey("EmployeeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("PersonnelDepartmentDatabaseImplement.Models.Position", "Position") .WithMany() .HasForeignKey("PositionId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("PersonnelDepartmentDatabaseImplement.Models.Type", "Type") .WithMany() .HasForeignKey("TypeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Department"); b.Navigation("Employee"); b.Navigation("Position"); b.Navigation("Type"); }); #pragma warning restore 612, 618 } } }