Database updates

This commit is contained in:
Andre Beging
2022-04-01 16:35:09 +02:00
parent 33c631aaf6
commit 5a1c79ad20
15 changed files with 646 additions and 1523 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -7,6 +7,12 @@
<Member Name="Admin" Value="2" p1:Guid="b61df6d8-6f93-4605-bcb8-40e631176cd7" />
<Member Name="Superadmin" Value="3" p1:Guid="ebd061a6-a896-4a7d-936f-207f87e52535" />
</EnumType>
<EnumType Name="InteractionType" class="InteractionType" p1:Guid="93f9359f-3deb-4dbe-9a8b-b8949f833919">
<Member Name="EinAb" Value="10" p1:Guid="f2ad51e2-93c8-4c70-8620-b3f9fc8fe484" />
<Member Name="Welcome" Value="20" p1:Guid="1e45cfc5-c222-4c21-b09d-fbfdd68f6006" />
<Member Name="Verify" Value="30" p1:Guid="b660c84b-a6ad-456d-b43f-eedca6891ff3" />
<Member Name="Pass" Value="40" p1:Guid="c259e9b3-519f-42ba-99f7-80ea5b268a6c" />
</EnumType>
</class>
<class name="User" entity-set="Users" p1:Guid="f956d4e9-7523-4b77-96be-10cbe0cc6929">
<id name="Id" type="Guid" value-generated="OnAdd" p1:ValidateRequired="true" p1:Guid="ba4bfd64-dca0-4716-beff-1c571eb08665">
@@ -28,29 +34,6 @@
<column name="" />
</property>
</class>
<class name="InteractionProcess" entity-set="InteractionProcesses" p1:Guid="d23a88ab-08ee-4f2e-af3c-45d8b4c6f5a2">
<id name="Id" type="Guid" value-generated="OnAdd" p1:ValidateRequired="true" p1:Guid="638ae9f6-597e-49df-a76e-8931498485a7">
<column name="" />
</id>
<property name="EinAb1Id" type="Guid" p1:ValidateRequired="true" p1:Guid="e78ce4d6-fce8-4584-aae0-876425f00323">
<column name="" />
</property>
<property name="EinAb2Id" type="Guid" p1:ValidateRequired="true" p1:Guid="d41aee11-2f57-406c-bd76-19fdaba89705">
<column name="" />
</property>
<property name="EinAb3Id" type="Guid" p1:ValidateRequired="true" p1:Guid="f1534bb5-c6c4-4022-acb6-9050adeeabb0">
<column name="" />
</property>
<property name="WelcomeId" type="Guid" p1:ValidateRequired="true" p1:Guid="8b29b005-41ee-44e8-934b-f2f24a3d371c">
<column name="" />
</property>
<property name="VerifyId" type="Guid" p1:ValidateRequired="true" p1:Guid="3113a240-5b76-410b-808f-843ad3d49272">
<column name="" />
</property>
<property name="PassId" type="Guid" p1:ValidateRequired="true" p1:Guid="d2592a60-356e-49c6-8116-b8bf86791598">
<column name="" />
</property>
</class>
<class name="Prospect" entity-set="Prospects" p1:Guid="2f24182f-047a-4dba-a926-ddb2044ce3a3">
<id name="Id" type="Guid" value-generated="OnAdd" p1:ValidateRequired="true" p1:Guid="be4ea414-f058-4b82-ab45-43750869702c">
<column name="" />
@@ -65,7 +48,7 @@
<column name="" />
</property>
</class>
<class name="InteractionDate" entity-set="InteractionDates" p1:Guid="c430a343-1225-40dd-9bc3-8f0fdd22b29a">
<class name="Interaction" entity-set="Interactions" p1:Guid="c430a343-1225-40dd-9bc3-8f0fdd22b29a">
<id name="Id" type="Guid" value-generated="OnAdd" p1:ValidateRequired="true" p1:Guid="cca7506d-fc68-4075-bb8c-1b502aa79807">
<column name="" />
</id>
@@ -75,71 +58,29 @@
<property name="UserId" type="Guid" p1:ValidateRequired="true" p1:Guid="fff013a1-3d14-4f2b-aee3-f5c0e5ad4d8e">
<column name="" not-null="False" />
</property>
<property name="Type" type="FoodsharingSiegen.Contracts.Entity.InteractionType" p1:ValidateRequired="true" p1:Guid="caf3dc53-f6cb-4554-98ac-a700657258e9">
<column name="" />
</property>
<property name="ProspectId" type="Guid" p1:ValidateRequired="true" p1:Guid="55b4bace-d6bd-4e19-8a15-8c34157251b6">
<column name="" not-null="False" />
</property>
</class>
<associations>
<association name="InteractionDate_InteractionProcess" cardinality="OneToOne" p1:Guid="9ba69659-8a8e-4e85-a458-060d4fa3e87f">
<end1 multiplicity="One" name="EinAb1" class="InteractionProcess" relation-class="InteractionDate" constrained="False" lazy="False" p1:Guid="99ed9595-a97a-4fca-9351-0dae95c50666">
<property name="Id" />
</end1>
<end2 multiplicity="One" name="InteractionProcess" class="InteractionDate" relation-class="InteractionProcess" generate="False" constrained="False" lazy="False" p1:Guid="842710d5-4c62-4b06-9aae-c325590f29c8">
<property name="EinAb1Id" />
</end2>
</association>
<association name="InteractionDate_InteractionProcess1" cardinality="OneToOne" p1:Guid="e90ffc7d-b8b4-4d9b-86d7-818cde5478c9">
<end1 multiplicity="One" name="EinAb2" class="InteractionProcess" relation-class="InteractionDate" constrained="False" lazy="False" p1:Guid="fe22740f-bf2c-4fef-8874-11403568789e">
<property name="Id" />
</end1>
<end2 multiplicity="One" name="InteractionProcess1" class="InteractionDate" relation-class="InteractionProcess" generate="False" constrained="False" lazy="False" p1:Guid="d1cd8317-a7c9-421e-b39a-7a6d9e5a34df">
<property name="EinAb2Id" />
</end2>
</association>
<association name="InteractionDate_InteractionProcess2" cardinality="OneToOne" p1:Guid="4b27a5e2-0562-4e5d-b0af-a73d9fbae7fa">
<end1 multiplicity="One" name="EinAb3" class="InteractionProcess" relation-class="InteractionDate" constrained="False" lazy="False" p1:Guid="1ddbf2e4-9926-47c7-b8d3-9d5b9c40e577">
<property name="Id" />
</end1>
<end2 multiplicity="One" name="InteractionProcess2" class="InteractionDate" relation-class="InteractionProcess" generate="False" constrained="False" lazy="False" p1:Guid="2857c635-1625-4a85-b62f-941d9375b553">
<property name="EinAb3Id" />
</end2>
</association>
<association name="InteractionDate_InteractionProcess3" cardinality="OneToOne" p1:Guid="c0d57b35-7be8-4cff-851d-12b31e39e7e8">
<end1 multiplicity="One" name="Welcome" class="InteractionProcess" relation-class="InteractionDate" constrained="False" lazy="False" p1:Guid="05022c2e-094c-4ee3-b447-9b71bd7af12e">
<property name="Id" />
</end1>
<end2 multiplicity="One" name="InteractionProcess3" class="InteractionDate" relation-class="InteractionProcess" generate="False" constrained="False" lazy="False" p1:Guid="13d8e731-a95c-4e15-9c47-0d9dbe9a1ade">
<property name="WelcomeId" />
</end2>
</association>
<association name="InteractionDate_InteractionProcess4" cardinality="OneToOne" p1:Guid="508e9d41-16f4-41c1-aaec-6648bfb5b97e">
<end1 multiplicity="One" name="Verify" class="InteractionProcess" relation-class="InteractionDate" constrained="False" lazy="False" p1:Guid="e36eccc6-5945-440f-aa8d-4258e8e0d3a1">
<property name="Id" />
</end1>
<end2 multiplicity="One" name="InteractionProcess4" class="InteractionDate" relation-class="InteractionProcess" generate="False" constrained="False" lazy="False" p1:Guid="ca51296d-51f1-47a0-ab51-8f03f8958c8c">
<property name="VerifyId" />
</end2>
</association>
<association name="InteractionDate_InteractionProcess5" cardinality="OneToOne" p1:Guid="a5e79c5f-77f5-4c77-ae66-ac1ed701917b">
<end1 multiplicity="One" name="Pass" class="InteractionProcess" relation-class="InteractionDate" constrained="False" lazy="False" p1:Guid="7358db21-b81d-4e50-bbf6-e2d943d2c374">
<property name="Id" />
</end1>
<end2 multiplicity="One" name="InteractionProcess5" class="InteractionDate" relation-class="InteractionProcess" generate="False" constrained="False" lazy="False" p1:Guid="ae165858-4164-4fb4-b171-e9e67d00e548">
<property name="PassId" />
</end2>
</association>
<association name="InteractionProcess_Prospect" cardinality="OneToOne" p1:Guid="0b330def-bb89-4941-b362-6ecdd68d8f23">
<end1 multiplicity="One" name="Progress" class="Prospect" relation-class="InteractionProcess" constrained="False" lazy="False" p1:Guid="f87c2a20-9f58-443c-91e6-4f1c96f42e67">
<property name="Id" />
</end1>
<end2 multiplicity="One" name="Prospect" class="InteractionProcess" relation-class="Prospect" generate="False" constrained="False" lazy="False" p1:Guid="121d62f2-b919-40e3-9006-ef35b21fe051">
<property name="ProgressId" />
</end2>
</association>
<association name="User_InteractionDate" cardinality="OneToMany" p1:Guid="865bd42d-b0ba-426f-a351-bcbdd38533f1">
<end1 multiplicity="One" name="User" class="InteractionDate" relation-class="User" constrained="True" lazy="False" p1:Guid="c0594051-ffb9-41a9-88a9-bed70e1693cd">
<end1 multiplicity="One" name="User" class="Interaction" relation-class="User" constrained="True" lazy="False" p1:Guid="c0594051-ffb9-41a9-88a9-bed70e1693cd">
<property name="Id" />
</end1>
<end2 multiplicity="Many" name="InteractionDates" class="User" relation-class="InteractionDate" lazy="False" p1:Guid="d437fc11-f09b-4d31-8c0e-a6c38d48d4fb">
<end2 multiplicity="Many" name="Interactions" class="User" relation-class="Interaction" lazy="False" p1:Guid="d437fc11-f09b-4d31-8c0e-a6c38d48d4fb">
<property name="UserId" />
</end2>
</association>
<association name="Prospect_Interaction" cardinality="OneToMany" p1:Guid="8653aabe-ac0e-4c77-a151-ab7d0c71060b">
<end1 multiplicity="One" name="Prospect" class="Interaction" relation-class="Prospect" constrained="True" lazy="False" p1:Guid="603ec2d2-a38a-4f33-b253-cb150c2985e9">
<property name="Id" />
</end1>
<end2 multiplicity="Many" name="Interactions" class="Prospect" relation-class="Interaction" lazy="False" p1:Guid="a6482ef1-2e42-43f6-a934-c3f507888b12">
<property name="ProspectId" />
</end2>
</association>
</associations>
</efcore>

View File

@@ -2,7 +2,7 @@
// This is auto-generated code.
//------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using EF Core template.
// Code is generated on: 24.01.2022 08:57:25
// Code is generated on: 01.04.2022 16:25:00
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -18,9 +18,9 @@ using System.Linq.Expressions;
namespace FoodsharingSiegen.Contracts.Entity
{
public partial class InteractionDate {
public partial class Interaction {
public InteractionDate()
public Interaction()
{
OnCreated();
}
@@ -31,8 +31,14 @@ namespace FoodsharingSiegen.Contracts.Entity
public virtual Guid UserId { get; set; }
public virtual InteractionType Type { get; set; }
public virtual Guid ProspectId { get; set; }
public virtual User User { get; set; }
public virtual Prospect Prospect { get; set; }
#region Extensibility Method Definitions
partial void OnCreated();

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Linq;
using System.Linq.Expressions;
namespace FoodsharingSiegen.Contracts.Entity
{
public partial class Interaction
{
}
}

View File

@@ -1,61 +0,0 @@
//------------------------------------------------------------------------------
// This is auto-generated code.
//------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using EF Core template.
// Code is generated on: 24.01.2022 08:57:25
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Linq;
using System.Linq.Expressions;
namespace FoodsharingSiegen.Contracts.Entity
{
public partial class InteractionProcess {
public InteractionProcess()
{
OnCreated();
}
public virtual Guid Id { get; set; }
public virtual Guid EinAb1Id { get; set; }
public virtual Guid EinAb2Id { get; set; }
public virtual Guid EinAb3Id { get; set; }
public virtual Guid WelcomeId { get; set; }
public virtual Guid VerifyId { get; set; }
public virtual Guid PassId { get; set; }
public virtual InteractionDate EinAb1 { get; set; }
public virtual InteractionDate EinAb2 { get; set; }
public virtual InteractionDate EinAb3 { get; set; }
public virtual InteractionDate Welcome { get; set; }
public virtual InteractionDate Verify { get; set; }
public virtual InteractionDate Pass { get; set; }
#region Extensibility Method Definitions
partial void OnCreated();
#endregion
}
}

View File

@@ -0,0 +1,28 @@
//------------------------------------------------------------------------------
// This is auto-generated code.
//------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using EF Core template.
// Code is generated on: 01.04.2022 16:25:00
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Linq;
using System.Linq.Expressions;
namespace FoodsharingSiegen.Contracts.Entity
{
public enum InteractionType : int
{
EinAb = 10,
Welcome = 20,
Verify = 30,
Pass = 40
}
}

View File

@@ -2,7 +2,7 @@
// This is auto-generated code.
//------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using EF Core template.
// Code is generated on: 24.01.2022 08:57:25
// Code is generated on: 01.04.2022 16:25:00
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -22,6 +22,7 @@ namespace FoodsharingSiegen.Contracts.Entity
public Prospect()
{
this.Interactions = new List<Interaction>();
OnCreated();
}
@@ -33,7 +34,7 @@ namespace FoodsharingSiegen.Contracts.Entity
public virtual Guid ProgressId { get; set; }
public virtual InteractionProcess Progress { get; set; }
public virtual IList<Interaction> Interactions { get; set; }
#region Extensibility Method Definitions

View File

@@ -2,7 +2,7 @@
// This is auto-generated code.
//------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using EF Core template.
// Code is generated on: 24.01.2022 08:57:25
// Code is generated on: 01.04.2022 16:25:00
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -22,7 +22,7 @@ namespace FoodsharingSiegen.Contracts.Entity
public User()
{
this.InteractionDates = new List<InteractionDate>();
this.Interactions = new List<Interaction>();
OnCreated();
}
@@ -38,7 +38,7 @@ namespace FoodsharingSiegen.Contracts.Entity
public virtual DateTime Created { get; set; }
public virtual IList<InteractionDate> InteractionDates { get; set; }
public virtual IList<Interaction> Interactions { get; set; }
#region Extensibility Method Definitions

View File

@@ -2,7 +2,7 @@
// This is auto-generated code.
//------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using EF Core template.
// Code is generated on: 24.01.2022 08:57:25
// Code is generated on: 01.04.2022 16:25:00
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.

View File

@@ -2,7 +2,7 @@
// This is auto-generated code.
//------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using EF Core template.
// Code is generated on: 24.01.2022 08:57:25
// Code is generated on: 01.04.2022 16:25:00
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -60,19 +60,13 @@ namespace FoodsharingSiegen.Server.Data
set;
}
public virtual DbSet<InteractionProcess> InteractionProcesses
{
get;
set;
}
public virtual DbSet<Prospect> Prospects
{
get;
set;
}
public virtual DbSet<InteractionDate> InteractionDates
public virtual DbSet<Interaction> Interactions
{
get;
set;
@@ -85,14 +79,11 @@ namespace FoodsharingSiegen.Server.Data
this.UserMapping(modelBuilder);
this.CustomizeUserMapping(modelBuilder);
this.InteractionProcessMapping(modelBuilder);
this.CustomizeInteractionProcessMapping(modelBuilder);
this.ProspectMapping(modelBuilder);
this.CustomizeProspectMapping(modelBuilder);
this.InteractionDateMapping(modelBuilder);
this.CustomizeInteractionDateMapping(modelBuilder);
this.InteractionMapping(modelBuilder);
this.CustomizeInteractionMapping(modelBuilder);
RelationshipsMapping(modelBuilder);
CustomizeMapping(ref modelBuilder);
@@ -116,25 +107,6 @@ namespace FoodsharingSiegen.Server.Data
#endregion
#region InteractionProcess Mapping
private void InteractionProcessMapping(ModelBuilder modelBuilder)
{
modelBuilder.Entity<InteractionProcess>().ToTable(@"InteractionProcesses");
modelBuilder.Entity<InteractionProcess>().Property(x => x.Id).HasColumnName(@"Id").IsRequired().ValueGeneratedOnAdd();
modelBuilder.Entity<InteractionProcess>().Property(x => x.EinAb1Id).HasColumnName(@"EinAb1Id").IsRequired().ValueGeneratedNever();
modelBuilder.Entity<InteractionProcess>().Property(x => x.EinAb2Id).HasColumnName(@"EinAb2Id").IsRequired().ValueGeneratedNever();
modelBuilder.Entity<InteractionProcess>().Property(x => x.EinAb3Id).HasColumnName(@"EinAb3Id").IsRequired().ValueGeneratedNever();
modelBuilder.Entity<InteractionProcess>().Property(x => x.WelcomeId).HasColumnName(@"WelcomeId").IsRequired().ValueGeneratedNever();
modelBuilder.Entity<InteractionProcess>().Property(x => x.VerifyId).HasColumnName(@"VerifyId").IsRequired().ValueGeneratedNever();
modelBuilder.Entity<InteractionProcess>().Property(x => x.PassId).HasColumnName(@"PassId").IsRequired().ValueGeneratedNever();
modelBuilder.Entity<InteractionProcess>().HasKey(@"Id");
}
partial void CustomizeInteractionProcessMapping(ModelBuilder modelBuilder);
#endregion
#region Prospect Mapping
private void ProspectMapping(ModelBuilder modelBuilder)
@@ -151,35 +123,31 @@ namespace FoodsharingSiegen.Server.Data
#endregion
#region InteractionDate Mapping
#region Interaction Mapping
private void InteractionDateMapping(ModelBuilder modelBuilder)
private void InteractionMapping(ModelBuilder modelBuilder)
{
modelBuilder.Entity<InteractionDate>().ToTable(@"InteractionDates");
modelBuilder.Entity<InteractionDate>().Property(x => x.Id).HasColumnName(@"Id").IsRequired().ValueGeneratedOnAdd();
modelBuilder.Entity<InteractionDate>().Property(x => x.Date).HasColumnName(@"Date").IsRequired().ValueGeneratedNever();
modelBuilder.Entity<InteractionDate>().Property(x => x.UserId).HasColumnName(@"UserId").ValueGeneratedNever();
modelBuilder.Entity<InteractionDate>().HasKey(@"Id");
modelBuilder.Entity<Interaction>().ToTable(@"Interactions");
modelBuilder.Entity<Interaction>().Property(x => x.Id).HasColumnName(@"Id").IsRequired().ValueGeneratedOnAdd();
modelBuilder.Entity<Interaction>().Property(x => x.Date).HasColumnName(@"Date").IsRequired().ValueGeneratedNever();
modelBuilder.Entity<Interaction>().Property(x => x.UserId).HasColumnName(@"UserId").ValueGeneratedNever();
modelBuilder.Entity<Interaction>().Property(x => x.Type).HasColumnName(@"Type").IsRequired().ValueGeneratedNever();
modelBuilder.Entity<Interaction>().Property(x => x.ProspectId).HasColumnName(@"ProspectId").ValueGeneratedNever();
modelBuilder.Entity<Interaction>().HasKey(@"Id");
}
partial void CustomizeInteractionDateMapping(ModelBuilder modelBuilder);
partial void CustomizeInteractionMapping(ModelBuilder modelBuilder);
#endregion
private void RelationshipsMapping(ModelBuilder modelBuilder)
{
modelBuilder.Entity<User>().HasMany(x => x.InteractionDates).WithOne(op => op.User).HasForeignKey(@"UserId").IsRequired(true);
modelBuilder.Entity<User>().HasMany(x => x.Interactions).WithOne(op => op.User).HasForeignKey(@"UserId").IsRequired(true);
modelBuilder.Entity<InteractionProcess>().HasOne(x => x.EinAb1).WithOne().HasPrincipalKey(typeof(InteractionProcess), @"EinAb1Id").HasForeignKey(typeof(InteractionDate), @"Id").IsRequired(true);
modelBuilder.Entity<InteractionProcess>().HasOne(x => x.EinAb2).WithOne().HasPrincipalKey(typeof(InteractionProcess), @"EinAb2Id").HasForeignKey(typeof(InteractionDate), @"Id").IsRequired(true);
modelBuilder.Entity<InteractionProcess>().HasOne(x => x.EinAb3).WithOne().HasPrincipalKey(typeof(InteractionProcess), @"EinAb3Id").HasForeignKey(typeof(InteractionDate), @"Id").IsRequired(true);
modelBuilder.Entity<InteractionProcess>().HasOne(x => x.Welcome).WithOne().HasPrincipalKey(typeof(InteractionProcess), @"WelcomeId").HasForeignKey(typeof(InteractionDate), @"Id").IsRequired(true);
modelBuilder.Entity<InteractionProcess>().HasOne(x => x.Verify).WithOne().HasPrincipalKey(typeof(InteractionProcess), @"VerifyId").HasForeignKey(typeof(InteractionDate), @"Id").IsRequired(true);
modelBuilder.Entity<InteractionProcess>().HasOne(x => x.Pass).WithOne().HasPrincipalKey(typeof(InteractionProcess), @"PassId").HasForeignKey(typeof(InteractionDate), @"Id").IsRequired(true);
modelBuilder.Entity<Prospect>().HasMany(x => x.Interactions).WithOne(op => op.Prospect).HasForeignKey(@"ProspectId").IsRequired(true);
modelBuilder.Entity<Prospect>().HasOne(x => x.Progress).WithOne().HasPrincipalKey(typeof(Prospect), @"ProgressId").HasForeignKey(typeof(InteractionProcess), @"Id").IsRequired(true);
modelBuilder.Entity<InteractionDate>().HasOne(x => x.User).WithMany(op => op.InteractionDates).HasForeignKey(@"UserId").IsRequired(true);
modelBuilder.Entity<Interaction>().HasOne(x => x.User).WithMany(op => op.Interactions).HasForeignKey(@"UserId").IsRequired(true);
modelBuilder.Entity<Interaction>().HasOne(x => x.Prospect).WithMany(op => op.Interactions).HasForeignKey(@"ProspectId").IsRequired(true);
}
partial void CustomizeMapping(ref ModelBuilder modelBuilder);

View File

@@ -1,234 +0,0 @@
// <auto-generated />
using System;
using FoodsharingSiegen.Server.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace FoodsharingSiegen.Server.Migrations
{
[DbContext(typeof(FsContext))]
[Migration("20220124091416_Init")]
partial class Init
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.InteractionDate", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasColumnName("Id");
b.Property<DateTime>("Date")
.HasColumnType("TEXT")
.HasColumnName("Date");
b.Property<Guid>("UserId")
.HasColumnType("TEXT")
.HasColumnName("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("InteractionDates", (string)null);
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.InteractionProcess", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasColumnName("Id");
b.Property<Guid>("EinAb1Id")
.HasColumnType("TEXT")
.HasColumnName("EinAb1Id");
b.Property<Guid>("EinAb2Id")
.HasColumnType("TEXT")
.HasColumnName("EinAb2Id");
b.Property<Guid>("EinAb3Id")
.HasColumnType("TEXT")
.HasColumnName("EinAb3Id");
b.Property<Guid>("PassId")
.HasColumnType("TEXT")
.HasColumnName("PassId");
b.Property<Guid>("VerifyId")
.HasColumnType("TEXT")
.HasColumnName("VerifyId");
b.Property<Guid>("WelcomeId")
.HasColumnType("TEXT")
.HasColumnName("WelcomeId");
b.HasKey("Id");
b.ToTable("InteractionProcesses", (string)null);
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasColumnName("Id");
b.Property<int>("FsId")
.HasColumnType("INTEGER")
.HasColumnName("FsId");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("Name");
b.Property<Guid>("ProgressId")
.HasColumnType("TEXT")
.HasColumnName("ProgressId");
b.HasKey("Id");
b.ToTable("Prospects", (string)null);
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasColumnName("Id");
b.Property<DateTime>("Created")
.HasColumnType("TEXT")
.HasColumnName("Created");
b.Property<string>("Mail")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("Mail");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("Name");
b.Property<int>("Type")
.HasColumnType("INTEGER")
.HasColumnName("Type");
b.Property<bool>("Verified")
.HasColumnType("INTEGER")
.HasColumnName("Verified");
b.HasKey("Id");
b.ToTable("Users", (string)null);
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.InteractionDate", b =>
{
b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
.WithOne("EinAb1")
.HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
.HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "EinAb1Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
.WithOne("EinAb2")
.HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
.HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "EinAb2Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_InteractionDates_InteractionProcesses_Id1");
b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
.WithOne("EinAb3")
.HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
.HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "EinAb3Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_InteractionDates_InteractionProcesses_Id2");
b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
.WithOne("Pass")
.HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
.HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "PassId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_InteractionDates_InteractionProcesses_Id3");
b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
.WithOne("Verify")
.HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
.HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "VerifyId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_InteractionDates_InteractionProcesses_Id4");
b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
.WithOne("Welcome")
.HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
.HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "WelcomeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_InteractionDates_InteractionProcesses_Id5");
b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
.WithMany("InteractionDates")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("User");
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.InteractionProcess", b =>
{
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", null)
.WithOne("Progress")
.HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "Id")
.HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.Prospect", "ProgressId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.InteractionProcess", b =>
{
b.Navigation("EinAb1");
b.Navigation("EinAb2");
b.Navigation("EinAb3");
b.Navigation("Pass");
b.Navigation("Verify");
b.Navigation("Welcome");
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
{
b.Navigation("Progress");
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
{
b.Navigation("InteractionDates");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -1,148 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FoodsharingSiegen.Server.Migrations
{
public partial class Init : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Prospects",
columns: table => new
{
Id = table.Column<Guid>(type: "TEXT", nullable: false),
FsId = table.Column<int>(type: "INTEGER", nullable: false),
Name = table.Column<string>(type: "TEXT", nullable: false),
ProgressId = table.Column<Guid>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Prospects", x => x.Id);
table.UniqueConstraint("AK_Prospects_ProgressId", x => x.ProgressId);
});
migrationBuilder.CreateTable(
name: "Users",
columns: table => new
{
Id = table.Column<Guid>(type: "TEXT", nullable: false),
Mail = table.Column<string>(type: "TEXT", nullable: false),
Type = table.Column<int>(type: "INTEGER", nullable: false),
Verified = table.Column<bool>(type: "INTEGER", nullable: false),
Name = table.Column<string>(type: "TEXT", nullable: false),
Created = table.Column<DateTime>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Users", x => x.Id);
});
migrationBuilder.CreateTable(
name: "InteractionProcesses",
columns: table => new
{
Id = table.Column<Guid>(type: "TEXT", nullable: false),
EinAb1Id = table.Column<Guid>(type: "TEXT", nullable: false),
EinAb2Id = table.Column<Guid>(type: "TEXT", nullable: false),
EinAb3Id = table.Column<Guid>(type: "TEXT", nullable: false),
WelcomeId = table.Column<Guid>(type: "TEXT", nullable: false),
VerifyId = table.Column<Guid>(type: "TEXT", nullable: false),
PassId = table.Column<Guid>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_InteractionProcesses", x => x.Id);
table.UniqueConstraint("AK_InteractionProcesses_EinAb1Id", x => x.EinAb1Id);
table.UniqueConstraint("AK_InteractionProcesses_EinAb2Id", x => x.EinAb2Id);
table.UniqueConstraint("AK_InteractionProcesses_EinAb3Id", x => x.EinAb3Id);
table.UniqueConstraint("AK_InteractionProcesses_PassId", x => x.PassId);
table.UniqueConstraint("AK_InteractionProcesses_VerifyId", x => x.VerifyId);
table.UniqueConstraint("AK_InteractionProcesses_WelcomeId", x => x.WelcomeId);
table.ForeignKey(
name: "FK_InteractionProcesses_Prospects_Id",
column: x => x.Id,
principalTable: "Prospects",
principalColumn: "ProgressId",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "InteractionDates",
columns: table => new
{
Id = table.Column<Guid>(type: "TEXT", nullable: false),
Date = table.Column<DateTime>(type: "TEXT", nullable: false),
UserId = table.Column<Guid>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_InteractionDates", x => x.Id);
table.ForeignKey(
name: "FK_InteractionDates_InteractionProcesses_Id",
column: x => x.Id,
principalTable: "InteractionProcesses",
principalColumn: "EinAb1Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_InteractionDates_InteractionProcesses_Id1",
column: x => x.Id,
principalTable: "InteractionProcesses",
principalColumn: "EinAb2Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_InteractionDates_InteractionProcesses_Id2",
column: x => x.Id,
principalTable: "InteractionProcesses",
principalColumn: "EinAb3Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_InteractionDates_InteractionProcesses_Id3",
column: x => x.Id,
principalTable: "InteractionProcesses",
principalColumn: "PassId",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_InteractionDates_InteractionProcesses_Id4",
column: x => x.Id,
principalTable: "InteractionProcesses",
principalColumn: "VerifyId",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_InteractionDates_InteractionProcesses_Id5",
column: x => x.Id,
principalTable: "InteractionProcesses",
principalColumn: "WelcomeId",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_InteractionDates_Users_UserId",
column: x => x.UserId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_InteractionDates_UserId",
table: "InteractionDates",
column: "UserId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "InteractionDates");
migrationBuilder.DropTable(
name: "InteractionProcesses");
migrationBuilder.DropTable(
name: "Users");
migrationBuilder.DropTable(
name: "Prospects");
}
}
}

View File

@@ -0,0 +1,144 @@
// <auto-generated />
using System;
using FoodsharingSiegen.Server.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace FoodsharingSiegen.Server.Migrations
{
[DbContext(typeof(FsContext))]
[Migration("20220401142848_Init")]
partial class Init
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasColumnName("Id");
b.Property<DateTime>("Date")
.HasColumnType("TEXT")
.HasColumnName("Date");
b.Property<Guid>("ProspectId")
.HasColumnType("TEXT")
.HasColumnName("ProspectId");
b.Property<int>("Type")
.HasColumnType("INTEGER")
.HasColumnName("Type");
b.Property<Guid>("UserId")
.HasColumnType("TEXT")
.HasColumnName("UserId");
b.HasKey("Id");
b.HasIndex("ProspectId");
b.HasIndex("UserId");
b.ToTable("Interactions", (string)null);
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasColumnName("Id");
b.Property<int>("FsId")
.HasColumnType("INTEGER")
.HasColumnName("FsId");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("Name");
b.Property<Guid>("ProgressId")
.HasColumnType("TEXT")
.HasColumnName("ProgressId");
b.HasKey("Id");
b.ToTable("Prospects", (string)null);
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasColumnName("Id");
b.Property<DateTime>("Created")
.HasColumnType("TEXT")
.HasColumnName("Created");
b.Property<string>("Mail")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("Mail");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("Name");
b.Property<int>("Type")
.HasColumnType("INTEGER")
.HasColumnName("Type");
b.Property<bool>("Verified")
.HasColumnType("INTEGER")
.HasColumnName("Verified");
b.HasKey("Id");
b.ToTable("Users", (string)null);
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
{
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", "Prospect")
.WithMany("Interactions")
.HasForeignKey("ProspectId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
.WithMany("Interactions")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Prospect");
b.Navigation("User");
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
{
b.Navigation("Interactions");
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
{
b.Navigation("Interactions");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,92 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FoodsharingSiegen.Server.Migrations
{
public partial class Init : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Prospects",
columns: table => new
{
Id = table.Column<Guid>(type: "TEXT", nullable: false),
FsId = table.Column<int>(type: "INTEGER", nullable: false),
Name = table.Column<string>(type: "TEXT", nullable: false),
ProgressId = table.Column<Guid>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Prospects", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Users",
columns: table => new
{
Id = table.Column<Guid>(type: "TEXT", nullable: false),
Mail = table.Column<string>(type: "TEXT", nullable: false),
Type = table.Column<int>(type: "INTEGER", nullable: false),
Verified = table.Column<bool>(type: "INTEGER", nullable: false),
Name = table.Column<string>(type: "TEXT", nullable: false),
Created = table.Column<DateTime>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Users", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Interactions",
columns: table => new
{
Id = table.Column<Guid>(type: "TEXT", nullable: false),
Date = table.Column<DateTime>(type: "TEXT", nullable: false),
UserId = table.Column<Guid>(type: "TEXT", nullable: false),
Type = table.Column<int>(type: "INTEGER", nullable: false),
ProspectId = table.Column<Guid>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Interactions", x => x.Id);
table.ForeignKey(
name: "FK_Interactions_Prospects_ProspectId",
column: x => x.ProspectId,
principalTable: "Prospects",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Interactions_Users_UserId",
column: x => x.UserId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_Interactions_ProspectId",
table: "Interactions",
column: "ProspectId");
migrationBuilder.CreateIndex(
name: "IX_Interactions_UserId",
table: "Interactions",
column: "UserId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Interactions");
migrationBuilder.DropTable(
name: "Prospects");
migrationBuilder.DropTable(
name: "Users");
}
}
}

View File

@@ -17,7 +17,7 @@ namespace FoodsharingSiegen.Server.Migrations
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.InteractionDate", b =>
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -28,51 +28,25 @@ namespace FoodsharingSiegen.Server.Migrations
.HasColumnType("TEXT")
.HasColumnName("Date");
b.Property<Guid>("ProspectId")
.HasColumnType("TEXT")
.HasColumnName("ProspectId");
b.Property<int>("Type")
.HasColumnType("INTEGER")
.HasColumnName("Type");
b.Property<Guid>("UserId")
.HasColumnType("TEXT")
.HasColumnName("UserId");
b.HasKey("Id");
b.HasIndex("ProspectId");
b.HasIndex("UserId");
b.ToTable("InteractionDates", (string)null);
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.InteractionProcess", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasColumnName("Id");
b.Property<Guid>("EinAb1Id")
.HasColumnType("TEXT")
.HasColumnName("EinAb1Id");
b.Property<Guid>("EinAb2Id")
.HasColumnType("TEXT")
.HasColumnName("EinAb2Id");
b.Property<Guid>("EinAb3Id")
.HasColumnType("TEXT")
.HasColumnName("EinAb3Id");
b.Property<Guid>("PassId")
.HasColumnType("TEXT")
.HasColumnName("PassId");
b.Property<Guid>("VerifyId")
.HasColumnType("TEXT")
.HasColumnName("VerifyId");
b.Property<Guid>("WelcomeId")
.HasColumnType("TEXT")
.HasColumnName("WelcomeId");
b.HasKey("Id");
b.ToTable("InteractionProcesses", (string)null);
b.ToTable("Interactions", (string)null);
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
@@ -134,97 +108,33 @@ namespace FoodsharingSiegen.Server.Migrations
b.ToTable("Users", (string)null);
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.InteractionDate", b =>
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
{
b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
.WithOne("EinAb1")
.HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
.HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "EinAb1Id")
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", "Prospect")
.WithMany("Interactions")
.HasForeignKey("ProspectId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
.WithOne("EinAb2")
.HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
.HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "EinAb2Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_InteractionDates_InteractionProcesses_Id1");
b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
.WithOne("EinAb3")
.HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
.HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "EinAb3Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_InteractionDates_InteractionProcesses_Id2");
b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
.WithOne("Pass")
.HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
.HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "PassId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_InteractionDates_InteractionProcesses_Id3");
b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
.WithOne("Verify")
.HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
.HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "VerifyId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_InteractionDates_InteractionProcesses_Id4");
b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
.WithOne("Welcome")
.HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
.HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "WelcomeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_InteractionDates_InteractionProcesses_Id5");
b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
.WithMany("InteractionDates")
.WithMany("Interactions")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Prospect");
b.Navigation("User");
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.InteractionProcess", b =>
{
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", null)
.WithOne("Progress")
.HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "Id")
.HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.Prospect", "ProgressId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.InteractionProcess", b =>
{
b.Navigation("EinAb1");
b.Navigation("EinAb2");
b.Navigation("EinAb3");
b.Navigation("Pass");
b.Navigation("Verify");
b.Navigation("Welcome");
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
{
b.Navigation("Progress");
b.Navigation("Interactions");
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
{
b.Navigation("InteractionDates");
b.Navigation("Interactions");
});
#pragma warning restore 612, 618
}