// 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("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CargoName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Weight") .HasColumnType("int"); b.HasKey("Id"); b.ToTable("Cargos"); }); modelBuilder.Entity("TransportCompanyDatabaseImplement.Models.Driver", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("DriverFio") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("PhoneNumber") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Drivers"); }); modelBuilder.Entity("TransportCompanyDatabaseImplement.Models.Point", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Address") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("PointName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Points"); }); modelBuilder.Entity("TransportCompanyDatabaseImplement.Models.Transport", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("LoadCapacity") .HasColumnType("int"); b.Property("Model") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("StateNumber") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Transports"); }); modelBuilder.Entity("TransportCompanyDatabaseImplement.Models.Transportation", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ArrivalDate") .HasColumnType("datetime2"); b.Property("CargoId") .HasColumnType("int"); b.Property("Count") .HasColumnType("int"); b.Property("DepartureDate") .HasColumnType("datetime2"); b.Property("DriverId") .HasColumnType("int"); b.Property("PointFromId") .HasColumnType("int"); b.Property("PointToId") .HasColumnType("int"); b.Property("Status") .HasColumnType("int"); b.Property("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 } } }