Eliseev_E.E._PIbd-21_DBMS/TransportCompany/TransportCompanyDatabaseImplements/Migrations/ElegevContextModelSnapshot.cs

237 lines
8.6 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using TransportCompanyDatabaseImplements;
#nullable disable
namespace TransportCompanyDatabaseImplements.Migrations
{
[DbContext(typeof(ElegevContext))]
partial class ElegevContextModelSnapshot : 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.HasSequence("seq_cargo");
modelBuilder.HasSequence("seq_client");
modelBuilder.HasSequence("seq_trucking");
modelBuilder.HasSequence("seq_type_transport");
modelBuilder.HasSequence("seq_type_transportation");
modelBuilder.Entity("TransportCompanyDatabaseImplements.Models.Cargo", b =>
{
b.Property<int>("Id")
.HasColumnType("integer")
.HasColumnName("id");
b.Property<string>("TypeCargo")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)")
.HasColumnName("type_cargo");
b.HasKey("Id")
.HasName("cargo_pkey");
b.ToTable("cargo", (string)null);
});
modelBuilder.Entity("TransportCompanyDatabaseImplements.Models.Client", b =>
{
b.Property<int>("Id")
.HasColumnType("integer")
.HasColumnName("id");
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)")
.HasColumnName("email");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)")
.HasColumnName("name");
b.Property<string>("Patronymic")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)")
.HasColumnName("patronymic");
b.Property<string>("Surname")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)")
.HasColumnName("surname");
b.Property<string>("Telephone")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)")
.HasColumnName("telephone");
b.HasKey("Id")
.HasName("client_pkey");
b.ToTable("client", (string)null);
});
modelBuilder.Entity("TransportCompanyDatabaseImplements.Models.Transport", b =>
{
b.Property<int>("Id")
.HasColumnType("integer")
.HasColumnName("id");
b.Property<string>("TransportType")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)")
.HasColumnName("transport_type");
b.HasKey("Id")
.HasName("transport_pkey");
b.ToTable("transport", (string)null);
});
modelBuilder.Entity("TransportCompanyDatabaseImplements.Models.Trucking", b =>
{
b.Property<int>("Id")
.HasColumnType("integer")
.HasColumnName("id");
b.Property<int>("CargoId")
.HasColumnType("integer")
.HasColumnName("cargo_id");
b.Property<int>("ClientId")
.HasColumnType("integer")
.HasColumnName("client_id");
b.Property<DateTime>("DateEnd")
.HasColumnType("timestamp with time zone")
.HasColumnName("date_end");
b.Property<DateTime>("DateStart")
.HasColumnType("timestamp with time zone")
.HasColumnName("date_start");
b.Property<double>("Price")
.HasColumnType("double precision")
.HasColumnName("price");
b.Property<int>("TransportId")
.HasColumnType("integer")
.HasColumnName("transport_id");
b.Property<int>("TransportationId")
.HasColumnType("integer")
.HasColumnName("transportation_id");
b.HasKey("Id")
.HasName("trucking_pkey");
b.HasIndex("CargoId");
b.HasIndex("ClientId");
b.HasIndex("TransportId");
b.HasIndex("TransportationId");
b.ToTable("trucking", (string)null);
});
modelBuilder.Entity("TransportCompanyDatabaseImplements.Models.TypeTransportation", b =>
{
b.Property<int>("Id")
.HasColumnType("integer")
.HasColumnName("id");
b.Property<string>("TransportationType")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)")
.HasColumnName("transportation_type");
b.HasKey("Id")
.HasName("type_transportation_pkey");
b.ToTable("type_transportation", (string)null);
});
modelBuilder.Entity("TransportCompanyDatabaseImplements.Models.Trucking", b =>
{
b.HasOne("TransportCompanyDatabaseImplements.Models.Cargo", "Cargo")
.WithMany("Truckings")
.HasForeignKey("CargoId")
.IsRequired()
.HasConstraintName("cargo_id");
b.HasOne("TransportCompanyDatabaseImplements.Models.Client", "Client")
.WithMany("Truckings")
.HasForeignKey("ClientId")
.IsRequired()
.HasConstraintName("client_id");
b.HasOne("TransportCompanyDatabaseImplements.Models.Transport", "Transport")
.WithMany("Truckings")
.HasForeignKey("TransportId")
.IsRequired()
.HasConstraintName("transport_id");
b.HasOne("TransportCompanyDatabaseImplements.Models.TypeTransportation", "TypeTransportation")
.WithMany("Truckings")
.HasForeignKey("TransportationId")
.IsRequired()
.HasConstraintName("type_transportation_id");
b.Navigation("Cargo");
b.Navigation("Client");
b.Navigation("Transport");
b.Navigation("TypeTransportation");
});
modelBuilder.Entity("TransportCompanyDatabaseImplements.Models.Cargo", b =>
{
b.Navigation("Truckings");
});
modelBuilder.Entity("TransportCompanyDatabaseImplements.Models.Client", b =>
{
b.Navigation("Truckings");
});
modelBuilder.Entity("TransportCompanyDatabaseImplements.Models.Transport", b =>
{
b.Navigation("Truckings");
});
modelBuilder.Entity("TransportCompanyDatabaseImplements.Models.TypeTransportation", b =>
{
b.Navigation("Truckings");
});
#pragma warning restore 612, 618
}
}
}