363 lines
13 KiB
C#
363 lines
13 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using KanSan.Base;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
namespace KanSan.Base.Migrations
|
|
{
|
|
[DbContext(typeof(KanSanContext))]
|
|
[Migration("20200225192255_InitialCommit")]
|
|
partial class InitialCommit
|
|
{
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
|
|
.HasAnnotation("ProductVersion", "3.1.2")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
modelBuilder.Entity("KanSan.Base.Models.Baustelle", b =>
|
|
{
|
|
b.Property<int>("ID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
|
|
|
b.Property<string>("BaustelleNummer")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("GuidNr")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("OrtTeil")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int?>("ProjektID")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("ID");
|
|
|
|
b.HasIndex("ProjektID");
|
|
|
|
b.ToTable("Baustelle");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Base.Models.Fahrzeug", b =>
|
|
{
|
|
b.Property<int>("ID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
|
|
|
b.Property<Guid>("GuidNr")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Kennzeichen")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("ID");
|
|
|
|
b.ToTable("Fahrzeuge");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Base.Models.Kunde", b =>
|
|
{
|
|
b.Property<int>("ID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
|
|
|
b.Property<Guid>("GuidNr")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Nachname")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Ort")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PLZ")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Strasse")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Vorname")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("ID");
|
|
|
|
b.ToTable("Kunden");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Base.Models.LeitungsverzeichnisPosition", b =>
|
|
{
|
|
b.Property<int>("ID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
|
|
|
b.Property<string>("Beschreibung")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Einheit")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("GuidNr")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Positionsnummer")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("ID");
|
|
|
|
b.ToTable("LeitungsverzeichnisPositionen");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Base.Models.Projekt", b =>
|
|
{
|
|
b.Property<int>("ID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
|
|
|
b.Property<Guid>("GuidNr")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int?>("KundeID")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Ort")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Projektnummer")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("ID");
|
|
|
|
b.HasIndex("KundeID");
|
|
|
|
b.ToTable("Projekte");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Base.Models.Sanierungskonzept", b =>
|
|
{
|
|
b.Property<int>("ID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
|
|
|
b.Property<Guid>("GuidNr")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("SanierungsTyp")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("ID");
|
|
|
|
b.ToTable("Sanierungskonzept");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Base.Models.Schaeden", b =>
|
|
{
|
|
b.Property<int>("ID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
|
|
|
b.Property<Guid>("GuidNr")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("SanierungsTyp")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int?>("SanierungskonzeptID")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int?>("SewerID")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("ID");
|
|
|
|
b.HasIndex("SanierungskonzeptID");
|
|
|
|
b.HasIndex("SewerID");
|
|
|
|
b.ToTable("Schaeden");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Base.Models.Sewer", b =>
|
|
{
|
|
b.Property<int>("ID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
|
|
|
b.Property<int?>("BaustelleID")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("DN")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<Guid>("GuidNr")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("Material")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("ObjektNummer")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int?>("PunktObenID")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("PunktTypeOben")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("PunktTypeUnten")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int?>("PunktUntenID")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("SewerType")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("StrasseName")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("ID");
|
|
|
|
b.HasIndex("BaustelleID");
|
|
|
|
b.HasIndex("PunktObenID");
|
|
|
|
b.HasIndex("PunktUntenID");
|
|
|
|
b.ToTable("Kanaele");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Base.Models.SewerPoint", b =>
|
|
{
|
|
b.Property<int>("ID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
|
|
|
b.Property<Guid>("GuidNr")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Objektnummer")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("ID");
|
|
|
|
b.ToTable("SewerPoints");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Base.Models.Taetigkeiten", b =>
|
|
{
|
|
b.Property<int>("ID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
|
|
|
b.Property<decimal>("Anzahl")
|
|
.HasColumnType("numeric");
|
|
|
|
b.Property<int?>("FahrzeugID")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<Guid>("GuidNr")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int?>("LeitungsverzeichnisPositionID")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Mitarbeiter")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<decimal>("Position")
|
|
.HasColumnType("numeric");
|
|
|
|
b.Property<int?>("SanierungskonzeptID")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("ZeitStempel")
|
|
.HasColumnType("timestamp without time zone");
|
|
|
|
b.HasKey("ID");
|
|
|
|
b.HasIndex("FahrzeugID");
|
|
|
|
b.HasIndex("LeitungsverzeichnisPositionID");
|
|
|
|
b.HasIndex("SanierungskonzeptID");
|
|
|
|
b.ToTable("Taetigkeiten");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Base.Models.Baustelle", b =>
|
|
{
|
|
b.HasOne("KanSan.Base.Models.Projekt", "Projekt")
|
|
.WithMany()
|
|
.HasForeignKey("ProjektID");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Base.Models.Projekt", b =>
|
|
{
|
|
b.HasOne("KanSan.Base.Models.Kunde", "Kunde")
|
|
.WithMany("Baustellen")
|
|
.HasForeignKey("KundeID");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Base.Models.Schaeden", b =>
|
|
{
|
|
b.HasOne("KanSan.Base.Models.Sanierungskonzept", "Sanierungskonzept")
|
|
.WithMany()
|
|
.HasForeignKey("SanierungskonzeptID");
|
|
|
|
b.HasOne("KanSan.Base.Models.Sewer", "Sewer")
|
|
.WithMany("Schaeden")
|
|
.HasForeignKey("SewerID");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Base.Models.Sewer", b =>
|
|
{
|
|
b.HasOne("KanSan.Base.Models.Baustelle", "Baustelle")
|
|
.WithMany("Kanaele")
|
|
.HasForeignKey("BaustelleID");
|
|
|
|
b.HasOne("KanSan.Base.Models.SewerPoint", "PunktOben")
|
|
.WithMany()
|
|
.HasForeignKey("PunktObenID");
|
|
|
|
b.HasOne("KanSan.Base.Models.SewerPoint", "PunktUnten")
|
|
.WithMany()
|
|
.HasForeignKey("PunktUntenID");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Base.Models.Taetigkeiten", b =>
|
|
{
|
|
b.HasOne("KanSan.Base.Models.Fahrzeug", "Fahrzeug")
|
|
.WithMany()
|
|
.HasForeignKey("FahrzeugID");
|
|
|
|
b.HasOne("KanSan.Base.Models.LeitungsverzeichnisPosition", "LeitungsverzeichnisPosition")
|
|
.WithMany()
|
|
.HasForeignKey("LeitungsverzeichnisPositionID");
|
|
|
|
b.HasOne("KanSan.Base.Models.Sanierungskonzept", "Sanierungskonzept")
|
|
.WithMany("Taetigkeiten")
|
|
.HasForeignKey("SanierungskonzeptID");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|