PIbd-21_MasenkinMS_SUBD_Rou.../RouteGuide/RouteGuideDatabaseImplement/Migrations/RouteGuideDatabaseModelSnapshot.cs

239 lines
8.1 KiB
C#
Raw Normal View History

2024-04-08 21:05:52 +04:00
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using RouteGuideDatabaseImplement;
#nullable disable
namespace RouteGuideDatabaseImplement.Migrations
{
[DbContext(typeof(RouteGuideDatabase))]
partial class RouteGuideDatabaseModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.13")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("RouteGuideDatabaseImplement.Models.Driver", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int?>("Experience")
.HasColumnType("integer");
b.Property<string>("FullName")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Phone")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Drivers");
});
modelBuilder.Entity("RouteGuideDatabaseImplement.Models.Route", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<int>("TransportId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("TransportId");
b.ToTable("Routes");
});
modelBuilder.Entity("RouteGuideDatabaseImplement.Models.RouteStop", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("Number")
.HasColumnType("integer");
b.Property<int>("RouteId")
.HasColumnType("integer");
b.Property<int>("StopId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("RouteId");
b.HasIndex("StopId");
b.ToTable("RouteStops");
});
modelBuilder.Entity("RouteGuideDatabaseImplement.Models.Schedule", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("ArrivalTime")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("Date")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("DepartureTime")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("Frequency")
.HasColumnType("timestamp with time zone");
b.Property<int>("RouteId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("RouteId");
b.ToTable("Schedules");
});
modelBuilder.Entity("RouteGuideDatabaseImplement.Models.Stop", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<int>("Number")
.HasColumnType("integer");
b.Property<string>("Street")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Stops");
});
modelBuilder.Entity("RouteGuideDatabaseImplement.Models.Transport", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("Capacity")
.HasColumnType("integer");
b.Property<int>("DriverId")
.HasColumnType("integer");
b.Property<string>("License")
.IsRequired()
.HasColumnType("text");
b.Property<int>("Type")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("DriverId");
b.ToTable("Transport");
});
modelBuilder.Entity("RouteGuideDatabaseImplement.Models.Route", b =>
{
b.HasOne("RouteGuideDatabaseImplement.Models.Transport", "Transport")
.WithMany()
.HasForeignKey("TransportId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Transport");
});
modelBuilder.Entity("RouteGuideDatabaseImplement.Models.RouteStop", b =>
{
b.HasOne("RouteGuideDatabaseImplement.Models.Route", "Route")
.WithMany("Stops")
.HasForeignKey("RouteId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("RouteGuideDatabaseImplement.Models.Stop", "Stop")
.WithMany()
.HasForeignKey("StopId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Route");
b.Navigation("Stop");
});
modelBuilder.Entity("RouteGuideDatabaseImplement.Models.Schedule", b =>
{
b.HasOne("RouteGuideDatabaseImplement.Models.Route", "Route")
.WithMany()
.HasForeignKey("RouteId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Route");
});
modelBuilder.Entity("RouteGuideDatabaseImplement.Models.Transport", b =>
{
b.HasOne("RouteGuideDatabaseImplement.Models.Driver", "Driver")
.WithMany()
.HasForeignKey("DriverId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Driver");
});
modelBuilder.Entity("RouteGuideDatabaseImplement.Models.Route", b =>
{
b.Navigation("Stops");
});
#pragma warning restore 612, 618
}
}
}