//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using SewerStammGen.EntityFramework;
#nullable disable
namespace SewerStammGen.EntityFramework.Migrations
{
[DbContext(typeof(SewerStammGenDbContext))]
partial class SewerStammGenDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(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")
.HasColumnType("text");
b.Property("Name")
.HasColumnType("text");
b.Property("Ort")
.HasColumnType("text");
b.Property("Postleitzahl")
.HasColumnType("text");
b.Property("Strasse")
.HasColumnType("text");
b.Property("Telefonnummer")
.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")
.HasColumnType("text");
b.Property("Objektbezeichnung")
.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")
.HasColumnType("text");
b.Property("ExportType")
.HasColumnType("integer");
b.Property("Kodierungssystem")
.HasColumnType("integer");
b.Property("Ort")
.HasColumnType("text");
b.Property("Projektname")
.HasColumnType("text");
b.Property("Strasse")
.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")
.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", "Projekt")
.WithMany("Schaechte")
.HasForeignKey("ProjektId");
b.Navigation("Projekt");
});
modelBuilder.Entity("Shared.Domain.Projekt", b =>
{
b.Navigation("Kanaele");
b.Navigation("Schaechte");
});
#pragma warning restore 612, 618
}
}
}