229 lines
7.9 KiB
C#
229 lines
7.9 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using TransportCompanyDatabaseImplement;
|
|
|
|
#nullable disable
|
|
|
|
namespace TransportCompanyDatabaseImplement.Migrations
|
|
{
|
|
[DbContext(typeof(TransportCompanyDatabase))]
|
|
partial class TransportCompanyDatabaseModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "7.0.3")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("TransportCompanyDatabaseImplement.Models.Cargo", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("CargoName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("Weight")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Cargos");
|
|
});
|
|
|
|
modelBuilder.Entity("TransportCompanyDatabaseImplement.Models.Driver", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("DriverFio")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Drivers");
|
|
});
|
|
|
|
modelBuilder.Entity("TransportCompanyDatabaseImplement.Models.Point", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Address")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("PointName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Points");
|
|
});
|
|
|
|
modelBuilder.Entity("TransportCompanyDatabaseImplement.Models.Transport", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("LoadCapacity")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Model")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("StateNumber")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Transports");
|
|
});
|
|
|
|
modelBuilder.Entity("TransportCompanyDatabaseImplement.Models.Transportation", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime?>("ArrivalDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int>("CargoId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("Count")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime>("DepartureDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int>("DriverId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("PointFromId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("PointToId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("TransportId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CargoId");
|
|
|
|
b.HasIndex("DriverId");
|
|
|
|
b.HasIndex("PointFromId");
|
|
|
|
b.HasIndex("PointToId");
|
|
|
|
b.HasIndex("TransportId");
|
|
|
|
b.ToTable("Transportations");
|
|
});
|
|
|
|
modelBuilder.Entity("TransportCompanyDatabaseImplement.Models.Transportation", b =>
|
|
{
|
|
b.HasOne("TransportCompanyDatabaseImplement.Models.Cargo", "Cargo")
|
|
.WithMany("Transportations")
|
|
.HasForeignKey("CargoId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("TransportCompanyDatabaseImplement.Models.Driver", "Driver")
|
|
.WithMany("Transportations")
|
|
.HasForeignKey("DriverId")
|
|
.OnDelete(DeleteBehavior.ClientSetNull)
|
|
.IsRequired();
|
|
|
|
b.HasOne("TransportCompanyDatabaseImplement.Models.Point", "PointFrom")
|
|
.WithMany("TransportationsFrom")
|
|
.HasForeignKey("PointFromId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("TransportCompanyDatabaseImplement.Models.Point", "PointTo")
|
|
.WithMany("TransportationsTo")
|
|
.HasForeignKey("PointToId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("TransportCompanyDatabaseImplement.Models.Transport", "Transport")
|
|
.WithMany("Transportations")
|
|
.HasForeignKey("TransportId")
|
|
.OnDelete(DeleteBehavior.ClientSetNull)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Cargo");
|
|
|
|
b.Navigation("Driver");
|
|
|
|
b.Navigation("PointFrom");
|
|
|
|
b.Navigation("PointTo");
|
|
|
|
b.Navigation("Transport");
|
|
});
|
|
|
|
modelBuilder.Entity("TransportCompanyDatabaseImplement.Models.Cargo", b =>
|
|
{
|
|
b.Navigation("Transportations");
|
|
});
|
|
|
|
modelBuilder.Entity("TransportCompanyDatabaseImplement.Models.Driver", b =>
|
|
{
|
|
b.Navigation("Transportations");
|
|
});
|
|
|
|
modelBuilder.Entity("TransportCompanyDatabaseImplement.Models.Point", b =>
|
|
{
|
|
b.Navigation("TransportationsFrom");
|
|
|
|
b.Navigation("TransportationsTo");
|
|
});
|
|
|
|
modelBuilder.Entity("TransportCompanyDatabaseImplement.Models.Transport", b =>
|
|
{
|
|
b.Navigation("Transportations");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|