Compare commits
6 Commits
sewerdamag
...
v0.02
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba51c3bde6 | ||
|
|
895a5b7f0d | ||
|
|
adbbc0e528 | ||
|
|
4ed6826f62 | ||
|
|
b48007095e | ||
|
|
790792174d |
@@ -12,7 +12,7 @@ namespace DaSaSo.Domain.Model
|
||||
public string Number { get; set; }
|
||||
public decimal Linerlength { get; set; }
|
||||
public bool IsAvaible { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public DateOnly Date { get; set; }
|
||||
public string LinerNumber { get; set; }
|
||||
public decimal WallThickness { get; set; }
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace DaSaSo.Domain.Model
|
||||
public abstract class SewerRehabilation : DomainObject
|
||||
{
|
||||
public string Operator { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public DateOnly Date { get; set; }
|
||||
public decimal TemperatureOutdoors { get; set; }
|
||||
public decimal TemperatureSewer { get; set; }
|
||||
public string Weather { get; set; }
|
||||
|
||||
@@ -19,4 +19,8 @@
|
||||
<ProjectReference Include="..\DaSaSo.Domain\DaSaSo.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Migrations\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,187 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DaSaSo.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(DaSaSoDbContext))]
|
||||
[Migration("20210912175956_InitialCommit")]
|
||||
partial class InitialCommit
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63)
|
||||
.HasAnnotation("ProductVersion", "6.0.0-preview.7.21378.4")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("BuildingSiteNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ContactPerson")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ProjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("Buildingsites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Country")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Firstname")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Postcode")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObjects", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("BuildingSiteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ObjektName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PointFrom")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PointTo")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<decimal>("SewerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("StreetName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BuildingSiteId");
|
||||
|
||||
b.ToTable("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Project", null)
|
||||
.WithMany("BuildingSites")
|
||||
.HasForeignKey("ProjectId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||
.WithMany("Projects")
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Client");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObjects", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
|
||||
.WithMany("SewerObjects")
|
||||
.HasForeignKey("BuildingSiteId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("BuildingSite");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Navigation("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Navigation("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Navigation("BuildingSites");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,124 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
public partial class InitialCommit : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Clients",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Firstname = table.Column<string>(type: "text", nullable: false),
|
||||
LastName = table.Column<string>(type: "text", nullable: false),
|
||||
Country = table.Column<string>(type: "text", nullable: false),
|
||||
Postcode = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Clients", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Projects",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Name = table.Column<string>(type: "text", nullable: false),
|
||||
ClientId = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Projects", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Projects_Clients_ClientId",
|
||||
column: x => x.ClientId,
|
||||
principalTable: "Clients",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Buildingsites",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
BuildingSiteNumber = table.Column<string>(type: "text", nullable: false),
|
||||
Country = table.Column<string>(type: "text", nullable: false),
|
||||
ContactPerson = table.Column<string>(type: "text", nullable: false),
|
||||
ProjectId = table.Column<int>(type: "integer", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Buildingsites", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Buildingsites_Projects_ProjectId",
|
||||
column: x => x.ProjectId,
|
||||
principalTable: "Projects",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SewerObjects",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
BuildingSiteId = table.Column<int>(type: "integer", nullable: false),
|
||||
StreetName = table.Column<string>(type: "text", nullable: false),
|
||||
ObjektName = table.Column<string>(type: "text", nullable: false),
|
||||
PointFrom = table.Column<string>(type: "text", nullable: false),
|
||||
PointTo = table.Column<string>(type: "text", nullable: false),
|
||||
DN = table.Column<int>(type: "integer", nullable: false),
|
||||
SewerLength = table.Column<decimal>(type: "numeric", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SewerObjects", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_SewerObjects_Buildingsites_BuildingSiteId",
|
||||
column: x => x.BuildingSiteId,
|
||||
principalTable: "Buildingsites",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Buildingsites_ProjectId",
|
||||
table: "Buildingsites",
|
||||
column: "ProjectId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Projects_ClientId",
|
||||
table: "Projects",
|
||||
column: "ClientId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SewerObjects_BuildingSiteId",
|
||||
table: "SewerObjects",
|
||||
column: "BuildingSiteId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Buildingsites");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Projects");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Clients");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,191 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DaSaSo.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(DaSaSoDbContext))]
|
||||
[Migration("20210913113208_StreetAdded")]
|
||||
partial class StreetAdded
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63)
|
||||
.HasAnnotation("ProductVersion", "6.0.0-preview.7.21378.4")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("BuildingSiteNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ContactPerson")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ProjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("Buildingsites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Country")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Firstname")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Postcode")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObjects", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("BuildingSiteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ObjektName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PointFrom")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PointTo")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<decimal>("SewerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("StreetName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BuildingSiteId");
|
||||
|
||||
b.ToTable("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Project", null)
|
||||
.WithMany("BuildingSites")
|
||||
.HasForeignKey("ProjectId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||
.WithMany("Projects")
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Client");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObjects", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
|
||||
.WithMany("SewerObjects")
|
||||
.HasForeignKey("BuildingSiteId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("BuildingSite");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Navigation("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Navigation("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Navigation("BuildingSites");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
public partial class StreetAdded : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Street",
|
||||
table: "Clients",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Street",
|
||||
table: "Clients");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,176 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DaSaSo.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(DaSaSoDbContext))]
|
||||
[Migration("20210915174236_ProjectReferenzAdded")]
|
||||
partial class ProjectReferenzAdded
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63)
|
||||
.HasAnnotation("ProductVersion", "6.0.0-preview.7.21378.4")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("BuildingSiteNumber")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ContactPerson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ProjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("Buildingsites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Firstname")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Postcode")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int?>("ClientId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObjects", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int?>("BuildingSiteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ObjektName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PointFrom")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PointTo")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<decimal>("SewerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("StreetName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BuildingSiteId");
|
||||
|
||||
b.ToTable("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
||||
.WithMany("BuildingSites")
|
||||
.HasForeignKey("ProjectId");
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||
.WithMany("Projects")
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.Navigation("Client");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObjects", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
|
||||
.WithMany("SewerObjects")
|
||||
.HasForeignKey("BuildingSiteId");
|
||||
|
||||
b.Navigation("BuildingSite");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Navigation("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Navigation("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Navigation("BuildingSites");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,331 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
public partial class ProjectReferenzAdded : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Projects_Clients_ClientId",
|
||||
table: "Projects");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_SewerObjects_Buildingsites_BuildingSiteId",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "StreetName",
|
||||
table: "SewerObjects",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "PointTo",
|
||||
table: "SewerObjects",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "PointFrom",
|
||||
table: "SewerObjects",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ObjektName",
|
||||
table: "SewerObjects",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "BuildingSiteId",
|
||||
table: "SewerObjects",
|
||||
type: "integer",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "Projects",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ClientId",
|
||||
table: "Projects",
|
||||
type: "integer",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Street",
|
||||
table: "Clients",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Postcode",
|
||||
table: "Clients",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "LastName",
|
||||
table: "Clients",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Firstname",
|
||||
table: "Clients",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Country",
|
||||
table: "Clients",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Country",
|
||||
table: "Buildingsites",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ContactPerson",
|
||||
table: "Buildingsites",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "BuildingSiteNumber",
|
||||
table: "Buildingsites",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Projects_Clients_ClientId",
|
||||
table: "Projects",
|
||||
column: "ClientId",
|
||||
principalTable: "Clients",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_SewerObjects_Buildingsites_BuildingSiteId",
|
||||
table: "SewerObjects",
|
||||
column: "BuildingSiteId",
|
||||
principalTable: "Buildingsites",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Projects_Clients_ClientId",
|
||||
table: "Projects");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_SewerObjects_Buildingsites_BuildingSiteId",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "StreetName",
|
||||
table: "SewerObjects",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "PointTo",
|
||||
table: "SewerObjects",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "PointFrom",
|
||||
table: "SewerObjects",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ObjektName",
|
||||
table: "SewerObjects",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "BuildingSiteId",
|
||||
table: "SewerObjects",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "Projects",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ClientId",
|
||||
table: "Projects",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Street",
|
||||
table: "Clients",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Postcode",
|
||||
table: "Clients",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "LastName",
|
||||
table: "Clients",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Firstname",
|
||||
table: "Clients",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Country",
|
||||
table: "Clients",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Country",
|
||||
table: "Buildingsites",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ContactPerson",
|
||||
table: "Buildingsites",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "BuildingSiteNumber",
|
||||
table: "Buildingsites",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Projects_Clients_ClientId",
|
||||
table: "Projects",
|
||||
column: "ClientId",
|
||||
principalTable: "Clients",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_SewerObjects_Buildingsites_BuildingSiteId",
|
||||
table: "SewerObjects",
|
||||
column: "BuildingSiteId",
|
||||
principalTable: "Buildingsites",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,234 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DaSaSo.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(DaSaSoDbContext))]
|
||||
[Migration("20210916075225_SewerDamageAdded")]
|
||||
partial class SewerDamageAdded
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63)
|
||||
.HasAnnotation("ProductVersion", "6.0.0-preview.7.21378.4")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("BuildingSiteNumber")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ContactPerson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ProjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("Buildingsites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Firstname")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Postcode")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int?>("ClientId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("DamageType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<decimal>("Distance")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<int>("PreparationType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SewerObjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SewerObjectId");
|
||||
|
||||
b.ToTable("SewerDamages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObjects", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int?>("BuildingSiteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("BuildingsiteBarier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Material")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ObjektName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PermitNeeded")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("PointFrom")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PointTo")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("SewerActivated")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("SewerCleaned")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<decimal>("SewerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("StreetName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("WaterBarrier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BuildingSiteId");
|
||||
|
||||
b.ToTable("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
||||
.WithMany("BuildingSites")
|
||||
.HasForeignKey("ProjectId");
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||
.WithMany("Projects")
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.Navigation("Client");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerObjects", "SewerObject")
|
||||
.WithMany("SewerDamages")
|
||||
.HasForeignKey("SewerObjectId");
|
||||
|
||||
b.Navigation("SewerObject");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObjects", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
|
||||
.WithMany("SewerObjects")
|
||||
.HasForeignKey("BuildingSiteId");
|
||||
|
||||
b.Navigation("BuildingSite");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Navigation("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Navigation("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Navigation("BuildingSites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObjects", b =>
|
||||
{
|
||||
b.Navigation("SewerDamages");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
public partial class SewerDamageAdded : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "BuildingsiteBarier",
|
||||
table: "SewerObjects",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Material",
|
||||
table: "SewerObjects",
|
||||
type: "text",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "PermitNeeded",
|
||||
table: "SewerObjects",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "SewerActivated",
|
||||
table: "SewerObjects",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "SewerCleaned",
|
||||
table: "SewerObjects",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "WaterBarrier",
|
||||
table: "SewerObjects",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SewerDamages",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
SewerObjectId = table.Column<int>(type: "integer", nullable: true),
|
||||
Distance = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
DamageType = table.Column<int>(type: "integer", nullable: false),
|
||||
PreparationType = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SewerDamages", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_SewerDamages_SewerObjects_SewerObjectId",
|
||||
column: x => x.SewerObjectId,
|
||||
principalTable: "SewerObjects",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SewerDamages_SewerObjectId",
|
||||
table: "SewerDamages",
|
||||
column: "SewerObjectId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "SewerDamages");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BuildingsiteBarier",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Material",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PermitNeeded",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SewerActivated",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SewerCleaned",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "WaterBarrier",
|
||||
table: "SewerObjects");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,234 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DaSaSo.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(DaSaSoDbContext))]
|
||||
[Migration("20210916135239_SewerObjectsAdded")]
|
||||
partial class SewerObjectsAdded
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63)
|
||||
.HasAnnotation("ProductVersion", "6.0.0-preview.7.21378.4")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("BuildingSiteNumber")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ContactPerson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ProjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("Buildingsites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Firstname")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Postcode")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int?>("ClientId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("DamageType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<decimal>("Distance")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<int>("PreparationType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SewerObjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SewerObjectId");
|
||||
|
||||
b.ToTable("SewerDamages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int?>("BuildingSiteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("BuildingsiteBarier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Material")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ObjektName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PermitNeeded")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("PointFrom")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PointTo")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("SewerActivated")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("SewerCleaned")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<decimal>("SewerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("StreetName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("WaterBarrier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BuildingSiteId");
|
||||
|
||||
b.ToTable("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
||||
.WithMany("BuildingSites")
|
||||
.HasForeignKey("ProjectId");
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||
.WithMany("Projects")
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.Navigation("Client");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerObject", "SewerObject")
|
||||
.WithMany("SewerDamages")
|
||||
.HasForeignKey("SewerObjectId");
|
||||
|
||||
b.Navigation("SewerObject");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
|
||||
.WithMany("SewerObjects")
|
||||
.HasForeignKey("BuildingSiteId");
|
||||
|
||||
b.Navigation("BuildingSite");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Navigation("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Navigation("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Navigation("BuildingSites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.Navigation("SewerDamages");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
public partial class SewerObjectsAdded : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,271 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DaSaSo.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(DaSaSoDbContext))]
|
||||
[Migration("20210920062903_transfertoenum")]
|
||||
partial class transfertoenum
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63)
|
||||
.HasAnnotation("ProductVersion", "6.0.0-preview.7.21378.4")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("BuildingSiteNumber")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ContactPerson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ProjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("Buildingsites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Firstname")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Postcode")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int?>("ClientId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("DamageType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<decimal>("Distance")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<int>("PreparationType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SewerObjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SewerObjectId");
|
||||
|
||||
b.ToTable("SewerDamages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int?>("BuildingSiteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("BuildingsiteBarier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Material")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ObjektName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PermitNeeded")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("PunktObenId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PunktObenType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("PunktUntenId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PunktUntenType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("SewerActivated")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("SewerCleaned")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<decimal>("SewerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("StreetName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("WaterBarrier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BuildingSiteId");
|
||||
|
||||
b.HasIndex("PunktObenId");
|
||||
|
||||
b.HasIndex("PunktUntenId");
|
||||
|
||||
b.ToTable("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerPoint", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Objektnummer")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SewerPoint");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
||||
.WithMany("BuildingSites")
|
||||
.HasForeignKey("ProjectId");
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||
.WithMany("Projects")
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.Navigation("Client");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerObject", "SewerObject")
|
||||
.WithMany("SewerDamages")
|
||||
.HasForeignKey("SewerObjectId");
|
||||
|
||||
b.Navigation("SewerObject");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
|
||||
.WithMany("SewerObjects")
|
||||
.HasForeignKey("BuildingSiteId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktOben")
|
||||
.WithMany()
|
||||
.HasForeignKey("PunktObenId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktUnten")
|
||||
.WithMany()
|
||||
.HasForeignKey("PunktUntenId");
|
||||
|
||||
b.Navigation("BuildingSite");
|
||||
|
||||
b.Navigation("PunktOben");
|
||||
|
||||
b.Navigation("PunktUnten");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Navigation("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Navigation("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Navigation("BuildingSites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.Navigation("SewerDamages");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
public partial class transfertoenum : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PointFrom",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PointTo",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PunktObenId",
|
||||
table: "SewerObjects",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PunktObenType",
|
||||
table: "SewerObjects",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PunktUntenId",
|
||||
table: "SewerObjects",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PunktUntenType",
|
||||
table: "SewerObjects",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SewerPoint",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Objektnummer = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SewerPoint", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SewerObjects_PunktObenId",
|
||||
table: "SewerObjects",
|
||||
column: "PunktObenId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SewerObjects_PunktUntenId",
|
||||
table: "SewerObjects",
|
||||
column: "PunktUntenId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_SewerObjects_SewerPoint_PunktObenId",
|
||||
table: "SewerObjects",
|
||||
column: "PunktObenId",
|
||||
principalTable: "SewerPoint",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_SewerObjects_SewerPoint_PunktUntenId",
|
||||
table: "SewerObjects",
|
||||
column: "PunktUntenId",
|
||||
principalTable: "SewerPoint",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_SewerObjects_SewerPoint_PunktObenId",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_SewerObjects_SewerPoint_PunktUntenId",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SewerPoint");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_SewerObjects_PunktObenId",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_SewerObjects_PunktUntenId",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PunktObenId",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PunktObenType",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PunktUntenId",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PunktUntenType",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PointFrom",
|
||||
table: "SewerObjects",
|
||||
type: "text",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PointTo",
|
||||
table: "SewerObjects",
|
||||
type: "text",
|
||||
nullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,381 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DaSaSo.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(DaSaSoDbContext))]
|
||||
[Migration("20210921145350_Lineradded")]
|
||||
partial class Lineradded
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63)
|
||||
.HasAnnotation("ProductVersion", "6.0.0-preview.7.21378.4")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("BuildingSiteNumber")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ContactPerson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ProjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("Buildingsites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Firstname")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Postcode")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Impregnation", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<bool>("IsAvaible")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("LinerNumber")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<decimal>("Linerlength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("Number")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<decimal>("WallThickness")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Impregnations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<bool>("CleanedHD")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("CleanedMechanisch")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("CleanedRoborter")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("ClosedEnd")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<int?>("ImpregnationId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<decimal>("InversionPressure")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("LinerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("Operator")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PermitNeeded")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("Preliner")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("STVO")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<decimal>("TemperaturAssembly")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("TemperaturStorage")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("TemperatureOutdoors")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("TemperatureSewer")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<bool>("WaterBaried")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Weather")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ImpregnationId");
|
||||
|
||||
b.ToTable("PipeLiners");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int?>("ClientId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("DamageType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<decimal>("Distance")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<int>("PreparationType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SewerObjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SewerObjectId");
|
||||
|
||||
b.ToTable("SewerDamages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int?>("BuildingSiteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("BuildingsiteBarier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Material")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ObjektName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PermitNeeded")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("PunktObenId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PunktObenType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("PunktUntenId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PunktUntenType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("SewerActivated")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("SewerCleaned")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<decimal>("SewerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("StreetName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("WaterBarrier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BuildingSiteId");
|
||||
|
||||
b.HasIndex("PunktObenId");
|
||||
|
||||
b.HasIndex("PunktUntenId");
|
||||
|
||||
b.ToTable("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerPoint", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Objektnummer")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SewerPoint");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
||||
.WithMany("BuildingSites")
|
||||
.HasForeignKey("ProjectId");
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Impregnation", "Impregnation")
|
||||
.WithMany()
|
||||
.HasForeignKey("ImpregnationId");
|
||||
|
||||
b.Navigation("Impregnation");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||
.WithMany("Projects")
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.Navigation("Client");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerObject", "SewerObject")
|
||||
.WithMany("SewerDamages")
|
||||
.HasForeignKey("SewerObjectId");
|
||||
|
||||
b.Navigation("SewerObject");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
|
||||
.WithMany("SewerObjects")
|
||||
.HasForeignKey("BuildingSiteId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktOben")
|
||||
.WithMany()
|
||||
.HasForeignKey("PunktObenId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktUnten")
|
||||
.WithMany()
|
||||
.HasForeignKey("PunktUntenId");
|
||||
|
||||
b.Navigation("BuildingSite");
|
||||
|
||||
b.Navigation("PunktOben");
|
||||
|
||||
b.Navigation("PunktUnten");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Navigation("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Navigation("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Navigation("BuildingSites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.Navigation("SewerDamages");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
public partial class Lineradded : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Impregnations",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
DN = table.Column<int>(type: "integer", nullable: false),
|
||||
Number = table.Column<string>(type: "text", nullable: true),
|
||||
Linerlength = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
IsAvaible = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Date = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
||||
LinerNumber = table.Column<string>(type: "text", nullable: true),
|
||||
WallThickness = table.Column<decimal>(type: "numeric", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Impregnations", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PipeLiners",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
InversionPressure = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
ImpregnationId = table.Column<int>(type: "integer", nullable: true),
|
||||
ClosedEnd = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Preliner = table.Column<bool>(type: "boolean", nullable: false),
|
||||
TemperaturAssembly = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
TemperaturStorage = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
LinerLength = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
Operator = table.Column<string>(type: "text", nullable: true),
|
||||
Date = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
||||
TemperatureOutdoors = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
TemperatureSewer = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
Weather = table.Column<string>(type: "text", nullable: true),
|
||||
CleanedHD = table.Column<bool>(type: "boolean", nullable: false),
|
||||
CleanedMechanisch = table.Column<bool>(type: "boolean", nullable: false),
|
||||
CleanedRoborter = table.Column<bool>(type: "boolean", nullable: false),
|
||||
WaterBaried = table.Column<bool>(type: "boolean", nullable: false),
|
||||
PermitNeeded = table.Column<bool>(type: "boolean", nullable: false),
|
||||
STVO = table.Column<bool>(type: "boolean", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PipeLiners", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PipeLiners_Impregnations_ImpregnationId",
|
||||
column: x => x.ImpregnationId,
|
||||
principalTable: "Impregnations",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PipeLiners_ImpregnationId",
|
||||
table: "PipeLiners",
|
||||
column: "ImpregnationId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "PipeLiners");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Impregnations");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,392 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DaSaSo.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(DaSaSoDbContext))]
|
||||
[Migration("20210921145447_LineraddedToSewer")]
|
||||
partial class LineraddedToSewer
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63)
|
||||
.HasAnnotation("ProductVersion", "6.0.0-preview.7.21378.4")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("BuildingSiteNumber")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ContactPerson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ProjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("Buildingsites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Firstname")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Postcode")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Impregnation", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<bool>("IsAvaible")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("LinerNumber")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<decimal>("Linerlength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("Number")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<decimal>("WallThickness")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Impregnations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<bool>("CleanedHD")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("CleanedMechanisch")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("CleanedRoborter")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("ClosedEnd")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<int?>("ImpregnationId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<decimal>("InversionPressure")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("LinerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("Operator")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PermitNeeded")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("Preliner")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("STVO")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<decimal>("TemperaturAssembly")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("TemperaturStorage")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("TemperatureOutdoors")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("TemperatureSewer")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<bool>("WaterBaried")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Weather")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ImpregnationId");
|
||||
|
||||
b.ToTable("PipeLiners");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int?>("ClientId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("DamageType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<decimal>("Distance")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<int>("PreparationType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SewerObjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SewerObjectId");
|
||||
|
||||
b.ToTable("SewerDamages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int?>("BuildingSiteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("BuildingsiteBarier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Material")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ObjektName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PermitNeeded")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("PipeLinerId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("PunktObenId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PunktObenType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("PunktUntenId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PunktUntenType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("SewerActivated")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("SewerCleaned")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<decimal>("SewerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("StreetName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("WaterBarrier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BuildingSiteId");
|
||||
|
||||
b.HasIndex("PipeLinerId");
|
||||
|
||||
b.HasIndex("PunktObenId");
|
||||
|
||||
b.HasIndex("PunktUntenId");
|
||||
|
||||
b.ToTable("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerPoint", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("Objektnummer")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SewerPoint");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
||||
.WithMany("BuildingSites")
|
||||
.HasForeignKey("ProjectId");
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Impregnation", "Impregnation")
|
||||
.WithMany()
|
||||
.HasForeignKey("ImpregnationId");
|
||||
|
||||
b.Navigation("Impregnation");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||
.WithMany("Projects")
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.Navigation("Client");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerObject", "SewerObject")
|
||||
.WithMany("SewerDamages")
|
||||
.HasForeignKey("SewerObjectId");
|
||||
|
||||
b.Navigation("SewerObject");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
|
||||
.WithMany("SewerObjects")
|
||||
.HasForeignKey("BuildingSiteId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.PipeLiner", "PipeLiner")
|
||||
.WithMany()
|
||||
.HasForeignKey("PipeLinerId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktOben")
|
||||
.WithMany()
|
||||
.HasForeignKey("PunktObenId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktUnten")
|
||||
.WithMany()
|
||||
.HasForeignKey("PunktUntenId");
|
||||
|
||||
b.Navigation("BuildingSite");
|
||||
|
||||
b.Navigation("PipeLiner");
|
||||
|
||||
b.Navigation("PunktOben");
|
||||
|
||||
b.Navigation("PunktUnten");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Navigation("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Navigation("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Navigation("BuildingSites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.Navigation("SewerDamages");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
public partial class LineraddedToSewer : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PipeLinerId",
|
||||
table: "SewerObjects",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SewerObjects_PipeLinerId",
|
||||
table: "SewerObjects",
|
||||
column: "PipeLinerId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_SewerObjects_PipeLiners_PipeLinerId",
|
||||
table: "SewerObjects",
|
||||
column: "PipeLinerId",
|
||||
principalTable: "PipeLiners",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_SewerObjects_PipeLiners_PipeLinerId",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_SewerObjects_PipeLinerId",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PipeLinerId",
|
||||
table: "SewerObjects");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,403 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DaSaSo.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(DaSaSoDbContext))]
|
||||
[Migration("20210928140403_SewerPointsAdded")]
|
||||
partial class SewerPointsAdded
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("BuildingSiteNumber")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ContactPerson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ProjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("Buildingsites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Firstname")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Postcode")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Impregnation", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<bool>("IsAvaible")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("LinerNumber")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<decimal>("Linerlength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("Number")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<decimal>("WallThickness")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Impregnations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<bool>("CleanedHD")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("CleanedMechanisch")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("CleanedRoborter")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("ClosedEnd")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int?>("ImpregnationId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<decimal>("InversionPressure")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("LinerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("Operator")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PermitNeeded")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("Preliner")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("STVO")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<decimal>("TemperaturAssembly")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("TemperaturStorage")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("TemperatureOutdoors")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("TemperatureSewer")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<bool>("WaterBaried")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Weather")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ImpregnationId");
|
||||
|
||||
b.ToTable("PipeLiners");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("ClientId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("DamageType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<decimal>("Distance")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<int>("PreparationType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SewerObjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SewerObjectId");
|
||||
|
||||
b.ToTable("SewerDamages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("BuildingSiteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("BuildingsiteBarier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Material")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ObjektName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PermitNeeded")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("PipeLinerId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("PunktObenId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PunktObenType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("PunktUntenId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PunktUntenType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("SewerActivated")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("SewerCleaned")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<decimal>("SewerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("StreetName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("WaterBarrier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BuildingSiteId");
|
||||
|
||||
b.HasIndex("PipeLinerId");
|
||||
|
||||
b.HasIndex("PunktObenId");
|
||||
|
||||
b.HasIndex("PunktUntenId");
|
||||
|
||||
b.ToTable("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerPoint", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Objektnummer")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SewerPoints");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
||||
.WithMany("BuildingSites")
|
||||
.HasForeignKey("ProjectId");
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Impregnation", "Impregnation")
|
||||
.WithMany()
|
||||
.HasForeignKey("ImpregnationId");
|
||||
|
||||
b.Navigation("Impregnation");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||
.WithMany("Projects")
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.Navigation("Client");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerObject", "SewerObject")
|
||||
.WithMany("SewerDamages")
|
||||
.HasForeignKey("SewerObjectId");
|
||||
|
||||
b.Navigation("SewerObject");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
|
||||
.WithMany("SewerObjects")
|
||||
.HasForeignKey("BuildingSiteId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.PipeLiner", "PipeLiner")
|
||||
.WithMany()
|
||||
.HasForeignKey("PipeLinerId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktOben")
|
||||
.WithMany()
|
||||
.HasForeignKey("PunktObenId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktUnten")
|
||||
.WithMany()
|
||||
.HasForeignKey("PunktUntenId");
|
||||
|
||||
b.Navigation("BuildingSite");
|
||||
|
||||
b.Navigation("PipeLiner");
|
||||
|
||||
b.Navigation("PunktOben");
|
||||
|
||||
b.Navigation("PunktUnten");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Navigation("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Navigation("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Navigation("BuildingSites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.Navigation("SewerDamages");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
public partial class SewerPointsAdded : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_SewerObjects_SewerPoint_PunktObenId",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_SewerObjects_SewerPoint_PunktUntenId",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_SewerPoint",
|
||||
table: "SewerPoint");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "SewerPoint",
|
||||
newName: "SewerPoints");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "Date",
|
||||
table: "PipeLiners",
|
||||
type: "timestamp with time zone",
|
||||
nullable: false,
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp without time zone");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "Date",
|
||||
table: "Impregnations",
|
||||
type: "timestamp with time zone",
|
||||
nullable: false,
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp without time zone");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_SewerPoints",
|
||||
table: "SewerPoints",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_SewerObjects_SewerPoints_PunktObenId",
|
||||
table: "SewerObjects",
|
||||
column: "PunktObenId",
|
||||
principalTable: "SewerPoints",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_SewerObjects_SewerPoints_PunktUntenId",
|
||||
table: "SewerObjects",
|
||||
column: "PunktUntenId",
|
||||
principalTable: "SewerPoints",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_SewerObjects_SewerPoints_PunktObenId",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_SewerObjects_SewerPoints_PunktUntenId",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_SewerPoints",
|
||||
table: "SewerPoints");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "SewerPoints",
|
||||
newName: "SewerPoint");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "Date",
|
||||
table: "PipeLiners",
|
||||
type: "timestamp without time zone",
|
||||
nullable: false,
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp with time zone");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "Date",
|
||||
table: "Impregnations",
|
||||
type: "timestamp without time zone",
|
||||
nullable: false,
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp with time zone");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_SewerPoint",
|
||||
table: "SewerPoint",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_SewerObjects_SewerPoint_PunktObenId",
|
||||
table: "SewerObjects",
|
||||
column: "PunktObenId",
|
||||
principalTable: "SewerPoint",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_SewerObjects_SewerPoint_PunktUntenId",
|
||||
table: "SewerObjects",
|
||||
column: "PunktUntenId",
|
||||
principalTable: "SewerPoint",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,406 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DaSaSo.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(DaSaSoDbContext))]
|
||||
[Migration("20210928153745_ProjectNumberAdded")]
|
||||
partial class ProjectNumberAdded
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("BuildingSiteNumber")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ContactPerson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ProjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("Buildingsites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Firstname")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Postcode")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Impregnation", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<bool>("IsAvaible")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("LinerNumber")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<decimal>("Linerlength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("Number")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<decimal>("WallThickness")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Impregnations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<bool>("CleanedHD")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("CleanedMechanisch")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("CleanedRoborter")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("ClosedEnd")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int?>("ImpregnationId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<decimal>("InversionPressure")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("LinerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("Operator")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PermitNeeded")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("Preliner")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("STVO")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<decimal>("TemperaturAssembly")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("TemperaturStorage")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("TemperatureOutdoors")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("TemperatureSewer")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<bool>("WaterBaried")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Weather")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ImpregnationId");
|
||||
|
||||
b.ToTable("PipeLiners");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("ClientId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Projektnummer")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("DamageType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<decimal>("Distance")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<int>("PreparationType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SewerObjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SewerObjectId");
|
||||
|
||||
b.ToTable("SewerDamages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("BuildingSiteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("BuildingsiteBarier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Material")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ObjektName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PermitNeeded")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("PipeLinerId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("PunktObenId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PunktObenType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("PunktUntenId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PunktUntenType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("SewerActivated")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("SewerCleaned")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<decimal>("SewerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("StreetName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("WaterBarrier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BuildingSiteId");
|
||||
|
||||
b.HasIndex("PipeLinerId");
|
||||
|
||||
b.HasIndex("PunktObenId");
|
||||
|
||||
b.HasIndex("PunktUntenId");
|
||||
|
||||
b.ToTable("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerPoint", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Objektnummer")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SewerPoints");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
||||
.WithMany("BuildingSites")
|
||||
.HasForeignKey("ProjectId");
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Impregnation", "Impregnation")
|
||||
.WithMany()
|
||||
.HasForeignKey("ImpregnationId");
|
||||
|
||||
b.Navigation("Impregnation");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||
.WithMany("Projects")
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.Navigation("Client");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerObject", "SewerObject")
|
||||
.WithMany("SewerDamages")
|
||||
.HasForeignKey("SewerObjectId");
|
||||
|
||||
b.Navigation("SewerObject");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
|
||||
.WithMany("SewerObjects")
|
||||
.HasForeignKey("BuildingSiteId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.PipeLiner", "PipeLiner")
|
||||
.WithMany()
|
||||
.HasForeignKey("PipeLinerId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktOben")
|
||||
.WithMany()
|
||||
.HasForeignKey("PunktObenId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktUnten")
|
||||
.WithMany()
|
||||
.HasForeignKey("PunktUntenId");
|
||||
|
||||
b.Navigation("BuildingSite");
|
||||
|
||||
b.Navigation("PipeLiner");
|
||||
|
||||
b.Navigation("PunktOben");
|
||||
|
||||
b.Navigation("PunktUnten");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Navigation("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Navigation("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Navigation("BuildingSites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.Navigation("SewerDamages");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
public partial class ProjectNumberAdded : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Projektnummer",
|
||||
table: "Projects",
|
||||
type: "text",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Projektnummer",
|
||||
table: "Projects");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,397 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DaSaSo.EntityFramework;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(DaSaSoDbContext))]
|
||||
[Migration("20211005060234_DeletedPrepartionFromDamage")]
|
||||
partial class DeletedPrepartionFromDamage
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("BuildingSiteNumber")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ContactPerson")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ProjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.ToTable("Buildingsites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Firstname")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Postcode")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Impregnation", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<bool>("IsAvaible")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("LinerNumber")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<decimal>("Linerlength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("Number")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<decimal>("WallThickness")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Impregnations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<bool>("ClosedEnd")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int?>("ImpregnationId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<decimal>("InversionPressure")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("LinerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("Operator")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PermitNeeded")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("Preliner")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("PreparationType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("STVO")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<decimal>("TemperaturAssembly")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("TemperaturStorage")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("TemperatureOutdoors")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<decimal>("TemperatureSewer")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<bool>("WaterBaried")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Weather")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ImpregnationId");
|
||||
|
||||
b.ToTable("PipeLiners");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("ClientId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Projektnummer")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("DamageType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<decimal>("Distance")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<int?>("SewerObjectId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SewerObjectId");
|
||||
|
||||
b.ToTable("SewerDamages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("BuildingSiteId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("BuildingsiteBarier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("DN")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Material")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ObjektName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PermitNeeded")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("PipeLinerId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("PunktObenId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PunktObenType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("PunktUntenId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PunktUntenType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("SewerActivated")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("SewerCleaned")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<decimal>("SewerLength")
|
||||
.HasColumnType("numeric");
|
||||
|
||||
b.Property<string>("StreetName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("WaterBarrier")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BuildingSiteId");
|
||||
|
||||
b.HasIndex("PipeLinerId");
|
||||
|
||||
b.HasIndex("PunktObenId");
|
||||
|
||||
b.HasIndex("PunktUntenId");
|
||||
|
||||
b.ToTable("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerPoint", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Objektnummer")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("SewerPoints");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
||||
.WithMany("BuildingSites")
|
||||
.HasForeignKey("ProjectId");
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Impregnation", "Impregnation")
|
||||
.WithMany()
|
||||
.HasForeignKey("ImpregnationId");
|
||||
|
||||
b.Navigation("Impregnation");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||
.WithMany("Projects")
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.Navigation("Client");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerObject", "SewerObject")
|
||||
.WithMany("SewerDamages")
|
||||
.HasForeignKey("SewerObjectId");
|
||||
|
||||
b.Navigation("SewerObject");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
|
||||
.WithMany("SewerObjects")
|
||||
.HasForeignKey("BuildingSiteId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.PipeLiner", "PipeLiner")
|
||||
.WithMany()
|
||||
.HasForeignKey("PipeLinerId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktOben")
|
||||
.WithMany()
|
||||
.HasForeignKey("PunktObenId");
|
||||
|
||||
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktUnten")
|
||||
.WithMany()
|
||||
.HasForeignKey("PunktUntenId");
|
||||
|
||||
b.Navigation("BuildingSite");
|
||||
|
||||
b.Navigation("PipeLiner");
|
||||
|
||||
b.Navigation("PunktOben");
|
||||
|
||||
b.Navigation("PunktUnten");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||
{
|
||||
b.Navigation("SewerObjects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||
{
|
||||
b.Navigation("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||
{
|
||||
b.Navigation("BuildingSites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||
{
|
||||
b.Navigation("SewerDamages");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
public partial class DeletedPrepartionFromDamage : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PreparationType",
|
||||
table: "SewerDamages");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CleanedHD",
|
||||
table: "PipeLiners");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CleanedMechanisch",
|
||||
table: "PipeLiners");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CleanedRoborter",
|
||||
table: "PipeLiners");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PreparationType",
|
||||
table: "PipeLiners",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PreparationType",
|
||||
table: "PipeLiners");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PreparationType",
|
||||
table: "SewerDamages",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "CleanedHD",
|
||||
table: "PipeLiners",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "CleanedMechanisch",
|
||||
table: "PipeLiners",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "CleanedRoborter",
|
||||
table: "PipeLiners",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
public partial class AddHousenumbers : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PermitNeeded",
|
||||
table: "PipeLiners");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "STVO",
|
||||
table: "PipeLiners");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "WaterBaried",
|
||||
table: "PipeLiners");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Hausnummer",
|
||||
table: "SewerObjects",
|
||||
type: "text",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "SanNummer",
|
||||
table: "SewerObjects",
|
||||
type: "text",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Hausnummer",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SanNummer",
|
||||
table: "SewerObjects");
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "PermitNeeded",
|
||||
table: "PipeLiners",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "STVO",
|
||||
table: "PipeLiners",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "WaterBaried",
|
||||
table: "PipeLiners",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,8 +12,8 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
[DbContext(typeof(DaSaSoDbContext))]
|
||||
[Migration("20211005082652_AddHousenumbers")]
|
||||
partial class AddHousenumbers
|
||||
[Migration("20211009183922_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
271
DaSaSo.EntityFramework/Migrations/20211009183922_Initial.cs
Normal file
271
DaSaSo.EntityFramework/Migrations/20211009183922_Initial.cs
Normal file
@@ -0,0 +1,271 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DaSaSo.EntityFramework.Migrations
|
||||
{
|
||||
public partial class Initial : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Clients",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Firstname = table.Column<string>(type: "text", nullable: true),
|
||||
LastName = table.Column<string>(type: "text", nullable: true),
|
||||
Country = table.Column<string>(type: "text", nullable: true),
|
||||
Street = table.Column<string>(type: "text", nullable: true),
|
||||
Postcode = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Clients", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Impregnations",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
DN = table.Column<int>(type: "integer", nullable: false),
|
||||
Number = table.Column<string>(type: "text", nullable: true),
|
||||
Linerlength = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
IsAvaible = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Date = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
LinerNumber = table.Column<string>(type: "text", nullable: true),
|
||||
WallThickness = table.Column<decimal>(type: "numeric", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Impregnations", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SewerPoints",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Objektnummer = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SewerPoints", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Projects",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Name = table.Column<string>(type: "text", nullable: true),
|
||||
Projektnummer = table.Column<string>(type: "text", nullable: true),
|
||||
ClientId = table.Column<int>(type: "integer", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Projects", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Projects_Clients_ClientId",
|
||||
column: x => x.ClientId,
|
||||
principalTable: "Clients",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PipeLiners",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
InversionPressure = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
ImpregnationId = table.Column<int>(type: "integer", nullable: true),
|
||||
ClosedEnd = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Preliner = table.Column<bool>(type: "boolean", nullable: false),
|
||||
TemperaturAssembly = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
TemperaturStorage = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
LinerLength = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
Operator = table.Column<string>(type: "text", nullable: true),
|
||||
Date = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
TemperatureOutdoors = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
TemperatureSewer = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
Weather = table.Column<string>(type: "text", nullable: true),
|
||||
PreparationType = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PipeLiners", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PipeLiners_Impregnations_ImpregnationId",
|
||||
column: x => x.ImpregnationId,
|
||||
principalTable: "Impregnations",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Buildingsites",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
ProjectId = table.Column<int>(type: "integer", nullable: true),
|
||||
BuildingSiteNumber = table.Column<string>(type: "text", nullable: true),
|
||||
Country = table.Column<string>(type: "text", nullable: true),
|
||||
ContactPerson = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Buildingsites", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Buildingsites_Projects_ProjectId",
|
||||
column: x => x.ProjectId,
|
||||
principalTable: "Projects",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SewerObjects",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
BuildingSiteId = table.Column<int>(type: "integer", nullable: true),
|
||||
SanNummer = table.Column<string>(type: "text", nullable: true),
|
||||
StreetName = table.Column<string>(type: "text", nullable: true),
|
||||
Hausnummer = table.Column<string>(type: "text", nullable: true),
|
||||
ObjektName = table.Column<string>(type: "text", nullable: true),
|
||||
PunktObenId = table.Column<int>(type: "integer", nullable: true),
|
||||
PunktObenType = table.Column<int>(type: "integer", nullable: false),
|
||||
PunktUntenId = table.Column<int>(type: "integer", nullable: true),
|
||||
PunktUntenType = table.Column<int>(type: "integer", nullable: false),
|
||||
Material = table.Column<string>(type: "text", nullable: true),
|
||||
DN = table.Column<int>(type: "integer", nullable: false),
|
||||
SewerLength = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
SewerActivated = table.Column<bool>(type: "boolean", nullable: false),
|
||||
SewerCleaned = table.Column<bool>(type: "boolean", nullable: false),
|
||||
WaterBarrier = table.Column<bool>(type: "boolean", nullable: false),
|
||||
PermitNeeded = table.Column<bool>(type: "boolean", nullable: false),
|
||||
BuildingsiteBarier = table.Column<bool>(type: "boolean", nullable: false),
|
||||
PipeLinerId = table.Column<int>(type: "integer", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SewerObjects", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_SewerObjects_Buildingsites_BuildingSiteId",
|
||||
column: x => x.BuildingSiteId,
|
||||
principalTable: "Buildingsites",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_SewerObjects_PipeLiners_PipeLinerId",
|
||||
column: x => x.PipeLinerId,
|
||||
principalTable: "PipeLiners",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_SewerObjects_SewerPoints_PunktObenId",
|
||||
column: x => x.PunktObenId,
|
||||
principalTable: "SewerPoints",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_SewerObjects_SewerPoints_PunktUntenId",
|
||||
column: x => x.PunktUntenId,
|
||||
principalTable: "SewerPoints",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SewerDamages",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
SewerObjectId = table.Column<int>(type: "integer", nullable: true),
|
||||
Distance = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
DamageType = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SewerDamages", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_SewerDamages_SewerObjects_SewerObjectId",
|
||||
column: x => x.SewerObjectId,
|
||||
principalTable: "SewerObjects",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Buildingsites_ProjectId",
|
||||
table: "Buildingsites",
|
||||
column: "ProjectId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PipeLiners_ImpregnationId",
|
||||
table: "PipeLiners",
|
||||
column: "ImpregnationId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Projects_ClientId",
|
||||
table: "Projects",
|
||||
column: "ClientId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SewerDamages_SewerObjectId",
|
||||
table: "SewerDamages",
|
||||
column: "SewerObjectId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SewerObjects_BuildingSiteId",
|
||||
table: "SewerObjects",
|
||||
column: "BuildingSiteId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SewerObjects_PipeLinerId",
|
||||
table: "SewerObjects",
|
||||
column: "PipeLinerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SewerObjects_PunktObenId",
|
||||
table: "SewerObjects",
|
||||
column: "PunktObenId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SewerObjects_PunktUntenId",
|
||||
table: "SewerObjects",
|
||||
column: "PunktUntenId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "SewerDamages");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SewerObjects");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Buildingsites");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PipeLiners");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SewerPoints");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Projects");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Impregnations");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Clients");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,8 +122,8 @@ namespace DaSaSo.EntityFramework.Migrations
|
||||
b.Property<bool>("ClosedEnd")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
b.Property<DateOnly>("Date")
|
||||
.HasColumnType("date");
|
||||
|
||||
b.Property<int?>("ImpregnationId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace DaSaSo.EntityFramework.Services
|
||||
.Include("PunktOben")
|
||||
.Include("PunktUnten")
|
||||
.Include("SewerDamages")
|
||||
.Include("PipeLiner")
|
||||
.Include("PipeLiner.Impregnation")
|
||||
.FirstOrDefaultAsync((e) => e.Id == id);
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -14,10 +14,12 @@ namespace DaSaSo.ViewModel.Commands
|
||||
private readonly IActualProject actualProject;
|
||||
private readonly IRenavigator addedNavigator;
|
||||
|
||||
|
||||
public AddDamageCommand(IActualProject actualProject, IRenavigator addedNavigator)
|
||||
{
|
||||
this.actualProject = actualProject;
|
||||
this.addedNavigator = addedNavigator;
|
||||
|
||||
}
|
||||
|
||||
public override async Task ExecuteAsync(object? parameter)
|
||||
@@ -26,7 +28,9 @@ namespace DaSaSo.ViewModel.Commands
|
||||
//newSewerDamage.SewerObject = actualProject.AktuellSewerObject; // Führt zur Exception, dass EF versucht doppelte einträge vorzunehmen
|
||||
|
||||
actualProject.AktuellSewerObject.SewerDamages.Add(newSewerDamage);
|
||||
actualProject.SetSewerDamage(actualProject.AktuellSewerObject.SewerDamages.Last());
|
||||
SewerDamage? lastInsertedDamage = actualProject.AktuellSewerObject.SewerDamages.Last();
|
||||
lastInsertedDamage.SewerObject = actualProject.AktuellSewerObject;
|
||||
actualProject.SetSewerDamage(lastInsertedDamage);
|
||||
|
||||
|
||||
//addedNavigator.Renavigate(); // Bug führt zur generellen umnavigation...
|
||||
|
||||
@@ -13,6 +13,9 @@ namespace DaSaSo.ViewModel.Controls
|
||||
public bool Mechanisch { get; set; }
|
||||
public bool Roboter { get; set; }
|
||||
public bool Faekalienfrei { get; set; }
|
||||
public bool Genehmigung { get; set; }
|
||||
public bool WaterBaried { get; set; }
|
||||
public bool STVO { get; set; }
|
||||
|
||||
public SewerPreperationControllViewModel(EPreparationType preparationType)
|
||||
{
|
||||
@@ -20,6 +23,9 @@ namespace DaSaSo.ViewModel.Controls
|
||||
Mechanisch = preparationType.HasFlag(EPreparationType.CleanedMechanisch);
|
||||
Roboter = preparationType.HasFlag(EPreparationType.CleanedRoboter);
|
||||
Faekalienfrei = preparationType.HasFlag(EPreparationType.FaekalienFrei);
|
||||
Genehmigung = preparationType.HasFlag(EPreparationType.PermitNeeded);
|
||||
WaterBaried = preparationType.HasFlag(EPreparationType.WaterBaried);
|
||||
STVO = preparationType.HasFlag(EPreparationType.STVO);
|
||||
}
|
||||
|
||||
public EPreparationType CalculatePreparationFlags()
|
||||
@@ -29,6 +35,9 @@ namespace DaSaSo.ViewModel.Controls
|
||||
if (Mechanisch) result |= EPreparationType.CleanedMechanisch;
|
||||
if (Roboter) result |= EPreparationType.CleanedRoboter;
|
||||
if (Faekalienfrei) result |= EPreparationType.FaekalienFrei;
|
||||
if (Genehmigung) result |= EPreparationType.PermitNeeded;
|
||||
if (WaterBaried) result |= EPreparationType.WaterBaried;
|
||||
if (STVO) result |= EPreparationType.STVO;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
using DaSaSo.Domain.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DaSaSo.ViewModel.Controls
|
||||
{
|
||||
public class SewerRhebalationControllViewModel : BaseViewModel
|
||||
{
|
||||
public string Bediener
|
||||
{
|
||||
get => model.Operator;
|
||||
set
|
||||
{
|
||||
if(model.Operator != value)
|
||||
{
|
||||
model.Operator = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal TemperaturAussen
|
||||
{
|
||||
get => model.TemperatureOutdoors;
|
||||
set
|
||||
{
|
||||
if(model.TemperatureOutdoors != value)
|
||||
{
|
||||
model.TemperatureOutdoors = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal TemperaturSewer
|
||||
{
|
||||
get => model.TemperatureSewer;
|
||||
set
|
||||
{
|
||||
if(model.TemperatureSewer != value)
|
||||
{
|
||||
model.TemperatureSewer = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public string Weather
|
||||
{
|
||||
get => model.Weather;
|
||||
set
|
||||
{
|
||||
if(model.Weather != value)
|
||||
{
|
||||
model.Weather = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
private DateTime _date;
|
||||
public DateTime Datum
|
||||
{
|
||||
get => _date;
|
||||
set
|
||||
{
|
||||
if(_date != value)
|
||||
{
|
||||
_date = value;
|
||||
model.Date = DateOnly.FromDateTime(_date);
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SewerPreperationControllViewModel SewerPreperationControllViewModel { get; set; }
|
||||
|
||||
private PipeLiner model;
|
||||
|
||||
public SewerRhebalationControllViewModel(PipeLiner model)
|
||||
{
|
||||
this.model = model;
|
||||
SewerPreperationControllViewModel = new SewerPreperationControllViewModel(model.PreparationType);
|
||||
_date = model.Date.ToDateTime(new TimeOnly(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
using System;
|
||||
using DaSaSo.Domain.Model;
|
||||
using DaSaSo.ViewModel.Controls;
|
||||
using DaSaSo.ViewModel.Interface;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -8,5 +12,112 @@ namespace DaSaSo.ViewModel
|
||||
{
|
||||
public class SewerPipeLinerViewModel : BaseViewModel
|
||||
{
|
||||
private SewerRhebalationControllViewModel _sewerRhebalationControllViewModel;
|
||||
private PipeLiner _model;
|
||||
|
||||
public PipeLiner Model
|
||||
{
|
||||
get => _model;
|
||||
set => _model = value;
|
||||
}
|
||||
|
||||
public string Operator
|
||||
{
|
||||
get => Model.Operator;
|
||||
set
|
||||
{
|
||||
if(Model.Operator != value)
|
||||
{
|
||||
Model.Operator = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool ClosedEnd
|
||||
{
|
||||
get => Model.ClosedEnd;
|
||||
set
|
||||
{
|
||||
if(Model.ClosedEnd != value)
|
||||
{
|
||||
Model.ClosedEnd = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool Preliner
|
||||
{
|
||||
get => Model.Preliner;
|
||||
set
|
||||
{
|
||||
if(Model.Preliner != value)
|
||||
{
|
||||
Model.Preliner = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal EinbauTemperatur
|
||||
{
|
||||
get => Model.TemperaturAssembly;
|
||||
set
|
||||
{
|
||||
if(Model.TemperaturAssembly != value)
|
||||
{
|
||||
Model.TemperaturAssembly = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal LagerungTemperatur
|
||||
{
|
||||
get => Model.TemperaturStorage;
|
||||
set
|
||||
{
|
||||
if (Model.TemperaturStorage != value)
|
||||
{
|
||||
Model.TemperaturStorage = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal EinbauDruck
|
||||
{
|
||||
get => Model.InversionPressure;
|
||||
set
|
||||
{
|
||||
if(Model.InversionPressure != value)
|
||||
{
|
||||
Model.InversionPressure = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public SewerRhebalationControllViewModel SewerRhebalationControllViewModel
|
||||
{
|
||||
get => _sewerRhebalationControllViewModel;
|
||||
set => _sewerRhebalationControllViewModel = value;
|
||||
}
|
||||
|
||||
public SewerPipeLinerViewModel(IActualProject actualProject)
|
||||
{
|
||||
|
||||
if(actualProject.AktuellSewerObject.PipeLiner == null)
|
||||
{
|
||||
actualProject.AktuellSewerObject.PipeLiner = new PipeLiner();
|
||||
}
|
||||
Model = actualProject.AktuellSewerObject.PipeLiner;
|
||||
SewerRhebalationControllViewModel = new SewerRhebalationControllViewModel(Model);
|
||||
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
// Todo Calculate SewerPreperation
|
||||
//EPreparationType preparationFlags = SewerPreperationControllViewModel.CalculatePreparationFlags();
|
||||
//Model.PreparationType = preparationFlags;
|
||||
//SewerPreperationControllViewModel.Dispose();
|
||||
//Debugger.Break();
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,8 +37,9 @@ namespace DaSaSo.ViewModel
|
||||
|
||||
private string _clientname = "";
|
||||
private string _projektname = "";
|
||||
private string _projektnummer = "";
|
||||
private string _buildingsitename = "";
|
||||
private readonly RegistryKey? registry;
|
||||
private RegistryKey? registry;
|
||||
const string REGISTRYKEY = "HKEY_CURRENT_USER\\Software\\Cosysda\\DaSaSo";
|
||||
public bool CanSelectProject { get => _actualProject.AktuellClient != null; }
|
||||
public bool CanSelectBuildingSite { get => _actualProject.AktuellProjekt != null; }
|
||||
@@ -73,6 +74,18 @@ namespace DaSaSo.ViewModel
|
||||
}
|
||||
}
|
||||
}
|
||||
public string Projektnummer
|
||||
{
|
||||
get => _projektnummer;
|
||||
set
|
||||
{
|
||||
if (_projektnummer != value)
|
||||
{
|
||||
_projektnummer = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public string Buildingsitename
|
||||
{
|
||||
get => _buildingsitename;
|
||||
@@ -177,7 +190,7 @@ namespace DaSaSo.ViewModel
|
||||
|
||||
private void InitRegistry()
|
||||
{
|
||||
Registry.CurrentUser.CreateSubKey("Software\\Cosysda\\DaSaSo");
|
||||
registry = Registry.CurrentUser.CreateSubKey("Software\\Cosysda\\DaSaSo");
|
||||
LadeRegistry();
|
||||
}
|
||||
|
||||
@@ -203,6 +216,7 @@ namespace DaSaSo.ViewModel
|
||||
{
|
||||
SaveInRegistry("lastproject", _actualProject.AktuellProjekt.Id.ToString());
|
||||
Projektname = _actualProject.AktuellProjekt.Name;
|
||||
Projektnummer = _actualProject.AktuellProjekt.Projektnummer;
|
||||
OnPropertyChanged(nameof(CanSelectBuildingSite));
|
||||
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.Buildingsites);
|
||||
}
|
||||
|
||||
@@ -165,6 +165,7 @@ namespace DaSaSo.Wpf
|
||||
using (DaSaSoDbContext context = contextFactory.CreateDbContext())
|
||||
{
|
||||
context.Database.Migrate();
|
||||
|
||||
}
|
||||
MainWindow? window = new MainWindow() { DataContext = _host.Services.GetRequiredService<MainWindowViewModel>() };
|
||||
window.Show();
|
||||
|
||||
@@ -5,6 +5,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -20,6 +21,7 @@ namespace DaSaSo.Wpf.HostBuilders
|
||||
string connectionString = "";
|
||||
Action<DbContextOptionsBuilder> configureDbContext = null;
|
||||
string databaseToUse = context.Configuration.GetConnectionString("databaseToUse");
|
||||
Trace.WriteLine(databaseToUse);
|
||||
if(databaseToUse.Equals("default"))
|
||||
{
|
||||
connectionString = context.Configuration.GetConnectionString("default");
|
||||
|
||||
@@ -90,7 +90,9 @@ namespace DaSaSo.Wpf.HostBuilders
|
||||
});
|
||||
services.AddTransient<CreateViewModel<SewerPipeLinerViewModel>>(services =>
|
||||
{
|
||||
return () => new SewerPipeLinerViewModel();
|
||||
return () => new SewerPipeLinerViewModel(
|
||||
services.GetRequiredService<IActualProject>()
|
||||
);
|
||||
});
|
||||
|
||||
services.AddTransient<CreateViewModel<ClientListViewModel>>(services =>
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
<StackPanel>
|
||||
<CheckBox Margin="5" Content="HD Gereinigt" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding HD}" />
|
||||
<CheckBox Margin="5" Content="Mechanisch Gereinigt" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Mechanisch}" />
|
||||
<CheckBox Margin="5" Content="Mit Roborter Gereinigt" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Roboter}" />
|
||||
<CheckBox Margin="5" Content="Mit Roboter Gereinigt" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Roboter}" />
|
||||
<CheckBox Margin="5" Content="Schadstelle Fäkalienfrei" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Faekalienfrei}" />
|
||||
<CheckBox Margin="5" Content="Genehmigung wurde eingeholt" Style="{StaticResource checkBoxCircleSmall}" />
|
||||
<CheckBox Margin="5" Content="Wasserhaltung wurde eingerichtet" Style="{StaticResource checkBoxCircleSmall}" />
|
||||
<CheckBox Margin="5" Content="Es wurde nach StVO abgesichert" Style="{StaticResource checkBoxCircleSmall}" />
|
||||
<CheckBox Margin="5" Content="Genehmigung wurde eingeholt" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Genehmigung}" />
|
||||
<CheckBox Margin="5" Content="Wasserhaltung wurde eingerichtet" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding WaterBaried}" />
|
||||
<CheckBox Margin="5" Content="Es wurde nach StVO abgesichert" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding STVO}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls"
|
||||
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" xmlns:controls="clr-namespace:DaSaSo.ViewModel.Controls;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=controls:SewerRhebalationControllViewModel}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
@@ -12,7 +12,7 @@
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border>
|
||||
<local:SewerDamagePreparation />
|
||||
<local:SewerDamagePreparation DataContext="{Binding SewerPreperationControllViewModel}" />
|
||||
</Border>
|
||||
<Border Grid.Column="1" BorderBrush="Black" BorderThickness="2">
|
||||
<Grid Grid.Column="1" Background="LightBlue">
|
||||
@@ -21,21 +21,23 @@
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="0" Content="Operator" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="1" Content="Datum" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="2" Content="Temperatur Aussen" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="3" Content="Temperatur Kanal" />
|
||||
<Label Margin="5" Grid.Column="0" Grid.Row="0" Content="Operator" />
|
||||
<Label Margin="5" Grid.Column="0" Grid.Row="1" Content="Datum" />
|
||||
<Label Margin="5" Grid.Column="0" Grid.Row="2" Content="Temperatur Aussen" />
|
||||
<Label Margin="5" Grid.Column="0" Grid.Row="3" Content="Temperatur Kanal" />
|
||||
<Label Margin="5" Grid.Column="0" Grid.Row="4" Content="Wetter" />
|
||||
|
||||
<TextBox Grid.Column="1" Grid.Row="0" Margin="20" />
|
||||
<!--<TextBox Grid.Column="1" Grid.Row="1" Margin="20" />-->
|
||||
<DatePicker Grid.Column="1" Grid.Row="1" Margin="20" />
|
||||
<TextBox Grid.Column="1" Grid.Row="2" Margin="20" />
|
||||
<TextBox Grid.Column="1" Grid.Row="3" Margin="20" />
|
||||
<TextBox Grid.Column="1" Grid.Row="0" Margin="5" Text="{Binding Bediener}" />
|
||||
<DatePicker Grid.Column="1" Grid.Row="1" Margin="5" SelectedDate="{Binding Datum}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="2" Margin="5" Text="{Binding TemperaturAussen}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="3" Margin="5" Text="{Binding TemperaturSewer}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="4" Margin="5" Text="{Binding Weather}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
@@ -4,45 +4,44 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject"
|
||||
xmlns:controls="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
xmlns:controls="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerPipeLinerViewModel}"
|
||||
mc:Ignorable="d" d:DesignWidth="800" Height="722">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0">
|
||||
<controls:SewerRehabilation />
|
||||
<controls:SewerRehabilation DataContext="{Binding SewerRhebalationControllViewModel}" />
|
||||
</Border>
|
||||
<Border BorderBrush="Black" BorderThickness="2" Grid.Row="1">
|
||||
<Grid Background="LightBlue">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Background="LightBlue">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="0" Content="Geschlossene Ende" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="1" Content="Preliner verwendet?" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="2" Content="Liner-Charge" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="3" Content="Lagerung Temperatur" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="4" Content="Temperatur beim Einbau" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="5" Content="Einbaudruck" />
|
||||
<Label Margin="10" Grid.Column="0" Grid.Row="0" Content="Geschlossene Ende" />
|
||||
<Label Margin="10" Grid.Column="0" Grid.Row="1" Content="Preliner verwendet?" />
|
||||
<Label Margin="10" Grid.Column="0" Grid.Row="2" Content="Liner-Charge" />
|
||||
<Label Margin="10" Grid.Column="0" Grid.Row="3" Content="Lagerung Temperatur" />
|
||||
<Label Margin="10" Grid.Column="0" Grid.Row="4" Content="Temperatur beim Einbau" />
|
||||
<Label Margin="10" Grid.Column="0" Grid.Row="5" Content="Einbaudruck" />
|
||||
|
||||
<CheckBox Style="{StaticResource checkBoxCircleSmall}" Grid.Column="1" Grid.Row="0" Margin="20" Content="Ja" />
|
||||
<CheckBox Style="{StaticResource checkBoxCircleSmall}" Grid.Column="1" Grid.Row="1" Margin="20" Content="Ja" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="2" Margin="20" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="3" Margin="20" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="4" Margin="20" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="5" Margin="20" />
|
||||
<CheckBox Style="{StaticResource checkBoxCircleSmall}" Grid.Column="1" Grid.Row="0" Margin="10" Content="Ja" IsChecked="{Binding ClosedEnd}" />
|
||||
<CheckBox Style="{StaticResource checkBoxCircleSmall}" Grid.Column="1" Grid.Row="1" Margin="10" Content="Ja" IsChecked="{Binding Preliner}" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="2" Margin="10" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="3" Margin="10" Text="{Binding LagerungTemperatur}" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="4" Margin="10" Text="{Binding EinbauTemperatur}" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="5" Margin="10" Text="{Binding EinbauDruck}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
@@ -49,13 +49,15 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<controls:MainWindowNavigationBar Grid.Column="0" Grid.Row="0"/>
|
||||
<ContentControl Grid.Column="1" Grid.Row="0" Content="{Binding CurrentViewModel}" />
|
||||
<StatusBar FontSize="20" Grid.Row="1" Grid.ColumnSpan="2">
|
||||
<StatusBarItem FontSize="20" Content="{Binding ClientName}" />
|
||||
<StatusBarItem FontSize="20" Content="{Binding Projektname}" />
|
||||
<Separator />
|
||||
<StatusBarItem FontSize="20" Content="{Binding Projektnummer}" />
|
||||
<Separator />
|
||||
<StatusBarItem FontSize="20" Content="{Binding Buildingsitename}" />
|
||||
</StatusBar>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user