301 lines
10 KiB
C#
301 lines
10 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using ConstructionFirmDatabaseImplement;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace ConstructionFirmDatabaseImplement.Migrations
|
|
{
|
|
[DbContext(typeof(ConstructionFirmDatabase))]
|
|
[Migration("20240507132319_EmployeeMigration")]
|
|
partial class EmployeeMigration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "7.0.16")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("ConstructionFirmDatabaseImplement.Models.Client", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ContractPerson")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Organization")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Phone")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Clients");
|
|
});
|
|
|
|
modelBuilder.Entity("ConstructionFirmDatabaseImplement.Models.ConstructionMaterial", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("Cost")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("MaterialName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Quantity")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("ConstructionMaterials");
|
|
});
|
|
|
|
modelBuilder.Entity("ConstructionFirmDatabaseImplement.Models.ConstructionMaterialProject", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("ConstructionMaterialId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("Count")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("ProjectId")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ConstructionMaterialId");
|
|
|
|
b.HasIndex("ProjectId");
|
|
|
|
b.ToTable("ConstructionMaterialProjects");
|
|
});
|
|
|
|
modelBuilder.Entity("ConstructionFirmDatabaseImplement.Models.Employee", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("FullName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("HireDate")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<string>("Phone")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("SpecialtyId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("TeamId")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Employees");
|
|
});
|
|
|
|
modelBuilder.Entity("ConstructionFirmDatabaseImplement.Models.Project", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("Budget")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("CliendId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("ClientName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("DeadLine")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.Property<int>("EmployeeId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<double>("FullPrice")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<string>("LocationP")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ObjectType")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Projects");
|
|
});
|
|
|
|
modelBuilder.Entity("ConstructionFirmDatabaseImplement.Models.ProjectTeam", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("CountTeam")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("ProjectId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("TeamId")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ProjectId");
|
|
|
|
b.HasIndex("TeamId");
|
|
|
|
b.ToTable("ProjectTeams");
|
|
});
|
|
|
|
modelBuilder.Entity("ConstructionFirmDatabaseImplement.Models.Specialty", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("Salary")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("SpecialtyName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Specialtys");
|
|
});
|
|
|
|
modelBuilder.Entity("ConstructionFirmDatabaseImplement.Models.Team", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("Experince")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("LeaderName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("TeamName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("TeamType")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Teams");
|
|
});
|
|
|
|
modelBuilder.Entity("ConstructionFirmDatabaseImplement.Models.ConstructionMaterialProject", b =>
|
|
{
|
|
b.HasOne("ConstructionFirmDatabaseImplement.Models.ConstructionMaterial", "ConstructionMaterial")
|
|
.WithMany()
|
|
.HasForeignKey("ConstructionMaterialId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("ConstructionFirmDatabaseImplement.Models.Project", "Project")
|
|
.WithMany("MaterialProjects")
|
|
.HasForeignKey("ProjectId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("ConstructionMaterial");
|
|
|
|
b.Navigation("Project");
|
|
});
|
|
|
|
modelBuilder.Entity("ConstructionFirmDatabaseImplement.Models.ProjectTeam", b =>
|
|
{
|
|
b.HasOne("ConstructionFirmDatabaseImplement.Models.Project", "Project")
|
|
.WithMany("ProjectTeams")
|
|
.HasForeignKey("ProjectId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("ConstructionFirmDatabaseImplement.Models.Team", "Team")
|
|
.WithMany()
|
|
.HasForeignKey("TeamId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Project");
|
|
|
|
b.Navigation("Team");
|
|
});
|
|
|
|
modelBuilder.Entity("ConstructionFirmDatabaseImplement.Models.Project", b =>
|
|
{
|
|
b.Navigation("MaterialProjects");
|
|
|
|
b.Navigation("ProjectTeams");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|