// using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using TransportGuideDatabaseImplements; #nullable disable namespace TransportGuideDatabaseImplements.Migrations { [DbContext(typeof(TransportGuideDB))] partial class TransportGuideDBModelSnapshot : 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("TransportGuideDatabaseImplements.Models.Route", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("IP") .IsRequired() .HasColumnType("text"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("TransportTypeId") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("TransportTypeId"); b.ToTable("Routes"); }); modelBuilder.Entity("TransportGuideDatabaseImplements.Models.Stop", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Stops"); }); modelBuilder.Entity("TransportGuideDatabaseImplements.Models.StopRoute", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Nomer") .HasColumnType("integer"); b.Property("RouteId") .HasColumnType("integer"); b.Property("StopId") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("RouteId"); b.HasIndex("StopId"); b.ToTable("StopRoutes"); }); modelBuilder.Entity("TransportGuideDatabaseImplements.Models.TransportType", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("Price") .HasColumnType("double precision"); b.HasKey("Id"); b.ToTable("TransportTypes"); }); modelBuilder.Entity("TransportGuideDatabaseImplements.Models.Route", b => { b.HasOne("TransportGuideDatabaseImplements.Models.TransportType", "TransportType") .WithMany("Routes") .HasForeignKey("TransportTypeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("TransportType"); }); modelBuilder.Entity("TransportGuideDatabaseImplements.Models.StopRoute", b => { b.HasOne("TransportGuideDatabaseImplements.Models.Route", "Route") .WithMany("Stops") .HasForeignKey("RouteId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("TransportGuideDatabaseImplements.Models.Stop", "Stop") .WithMany("StopRoutes") .HasForeignKey("StopId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Route"); b.Navigation("Stop"); }); modelBuilder.Entity("TransportGuideDatabaseImplements.Models.Route", b => { b.Navigation("Stops"); }); modelBuilder.Entity("TransportGuideDatabaseImplements.Models.Stop", b => { b.Navigation("StopRoutes"); }); modelBuilder.Entity("TransportGuideDatabaseImplements.Models.TransportType", b => { b.Navigation("Routes"); }); #pragma warning restore 612, 618 } } }