// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using SewerStammGen.EntityFramework; #nullable disable namespace SewerStammGen.EntityFramework.Migrations { [DbContext(typeof(SewerStammGenDbContext))] [Migration("20230329145638_AuftraggeberAddedToProject")] partial class AuftraggeberAddedToProject { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.4") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Shared.Domain.Auftraggeber", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Ansprechpartner") .IsRequired() .HasColumnType("text"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("Ort") .IsRequired() .HasColumnType("text"); b.Property("Postleitzahl") .IsRequired() .HasColumnType("text"); b.Property("Strasse") .IsRequired() .HasColumnType("text"); b.Property("Telefonnummer") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Auftraggebers"); }); modelBuilder.Entity("Shared.Domain.Kanal", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("DN") .HasColumnType("integer"); b.Property("EndSchachtId") .HasColumnType("integer"); b.Property("Entwaesserung") .HasColumnType("integer"); b.Property("Haltungslaenge") .HasColumnType("numeric"); b.Property("Material") .IsRequired() .HasColumnType("text"); b.Property("Objektbezeichnung") .IsRequired() .HasColumnType("text"); b.Property("ProjektId") .HasColumnType("integer"); b.Property("StartSchachtId") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("EndSchachtId"); b.HasIndex("ProjektId"); b.HasIndex("StartSchachtId"); b.ToTable("Kanaele"); }); modelBuilder.Entity("Shared.Domain.Projekt", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("AuftraggeberId") .HasColumnType("integer"); b.Property("Erstelldatum") .IsRequired() .HasColumnType("text"); b.Property("ExportType") .HasColumnType("integer"); b.Property("Kodierungssystem") .HasColumnType("integer"); b.Property("Ort") .IsRequired() .HasColumnType("text"); b.Property("Projektname") .IsRequired() .HasColumnType("text"); b.Property("Strasse") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("AuftraggeberId"); b.ToTable("Projekte"); }); modelBuilder.Entity("Shared.Domain.Schacht", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("DeckelHoehe") .HasColumnType("decimal(18,4)"); b.Property("Entwaesserung") .HasColumnType("integer"); b.Property("HochWert") .HasColumnType("decimal(18,4)"); b.Property("Objektbezeichnung") .IsRequired() .HasColumnType("text"); b.Property("ProjektId") .HasColumnType("integer"); b.Property("RechtsWert") .HasColumnType("decimal(18,4)"); b.Property("SohlHoehe") .HasColumnType("decimal(18,4)"); b.HasKey("Id"); b.HasIndex("ProjektId"); b.ToTable("Schaechte"); }); modelBuilder.Entity("Shared.Domain.Kanal", b => { b.HasOne("Shared.Domain.Schacht", "EndSchacht") .WithMany() .HasForeignKey("EndSchachtId"); b.HasOne("Shared.Domain.Projekt", null) .WithMany("Kanaele") .HasForeignKey("ProjektId"); b.HasOne("Shared.Domain.Schacht", "StartSchacht") .WithMany() .HasForeignKey("StartSchachtId"); b.Navigation("EndSchacht"); b.Navigation("StartSchacht"); }); modelBuilder.Entity("Shared.Domain.Projekt", b => { b.HasOne("Shared.Domain.Auftraggeber", "Auftraggeber") .WithMany() .HasForeignKey("AuftraggeberId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Auftraggeber"); }); modelBuilder.Entity("Shared.Domain.Schacht", b => { b.HasOne("Shared.Domain.Projekt", null) .WithMany("Schaechte") .HasForeignKey("ProjektId"); }); modelBuilder.Entity("Shared.Domain.Projekt", b => { b.Navigation("Kanaele"); b.Navigation("Schaechte"); }); #pragma warning restore 612, 618 } } }