138 lines
4.7 KiB
C#
138 lines
4.7 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using KanSan;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
namespace KanSan.Migrations
|
|
{
|
|
[DbContext(typeof(KanSanContext))]
|
|
[Migration("20200213193512_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.1")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
modelBuilder.Entity("KanSan.Baustelle", b =>
|
|
{
|
|
b.Property<Guid>("BaustelleID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid?>("KundenID")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Ort")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Strasse")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("BaustelleID");
|
|
|
|
b.HasIndex("KundenID");
|
|
|
|
b.ToTable("Baustellen");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Kunden", b =>
|
|
{
|
|
b.Property<Guid>("KundenID")
|
|
.ValueGeneratedOnAdd()
|
|
.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("KundenID");
|
|
|
|
b.ToTable("Kunden");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.LeistungsverzeichnisBaustelle", b =>
|
|
{
|
|
b.Property<int>("LeistungsverzeichnisBaustelleID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer")
|
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
|
|
|
b.Property<Guid?>("BaustelleID")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid?>("LeistungsverzeichnissID")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("LeistungsverzeichnisBaustelleID");
|
|
|
|
b.HasIndex("BaustelleID");
|
|
|
|
b.HasIndex("LeistungsverzeichnissID");
|
|
|
|
b.ToTable("LeistungsverzeichnisBaustelle");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Leistungsverzeichniss", b =>
|
|
{
|
|
b.Property<Guid>("LeistungsverzeichnissID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Position")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PositionBeschreibung")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PositionEinheit")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<decimal>("PositionEinheitspreis")
|
|
.HasColumnType("numeric");
|
|
|
|
b.HasKey("LeistungsverzeichnissID");
|
|
|
|
b.ToTable("Leistungsverzeichnisses");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.Baustelle", b =>
|
|
{
|
|
b.HasOne("KanSan.Kunden", null)
|
|
.WithMany("Baustellen")
|
|
.HasForeignKey("KundenID");
|
|
});
|
|
|
|
modelBuilder.Entity("KanSan.LeistungsverzeichnisBaustelle", b =>
|
|
{
|
|
b.HasOne("KanSan.Baustelle", "Baustelle")
|
|
.WithMany()
|
|
.HasForeignKey("BaustelleID");
|
|
|
|
b.HasOne("KanSan.Leistungsverzeichniss", "Leistungsverzeichniss")
|
|
.WithMany()
|
|
.HasForeignKey("LeistungsverzeichnissID");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|