Database updates

This commit is contained in:
Andre Beging
2022-04-04 15:15:03 +02:00
parent 427b924759
commit 83fb4a3c5e
14 changed files with 584 additions and 117 deletions

View File

@@ -134,26 +134,45 @@
<TypeName>EntityDeveloper.EntityFrameworkCore.EntityProperty</TypeName>
</Oid>
</Model>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>9</OID>
<Parent>2</Parent>
</CustomProperties>
<Children />
<Location>
<X>0.5 px</X>
<Y>108.5 px</Y>
</Location>
<Size>
<Width>162 px</Width>
<Height>18 px</Height>
</Size>
<Oid xsi:type="SchemaModelOID">
<Path>0e030886-d23e-4293-aeea-86f0a5c53d4e</Path>
<TypeName>EntityDeveloper.EntityFrameworkCore.EntityProperty</TypeName>
</Oid>
</Model>
</Children>
<Size>
<Width>163 px</Width>
<Height>109 px</Height>
<Height>127 px</Height>
</Size>
<MaxSize>
<Width>0 px</Width>
<Height>109 px</Height>
<Height>127 px</Height>
</MaxSize>
</Model>
<Model xsi:type="RelationPropertiesVwModel">
<CustomProperties>
<OID>9</OID>
<OID>10</OID>
<Parent>1</Parent>
</CustomProperties>
<Children>
<Model xsi:type="RelationPropertyVwModel">
<CustomProperties>
<OID>10</OID>
<Parent>9</Parent>
<OID>11</OID>
<Parent>10</Parent>
</CustomProperties>
<Children />
<Size>
@@ -168,7 +187,7 @@
</Children>
<Location>
<X>0 px</X>
<Y>108 px</Y>
<Y>126 px</Y>
</Location>
<Size>
<Width>163 px</Width>
@@ -187,15 +206,15 @@
</Location>
<Size>
<Width>168 px</Width>
<Height>194 px</Height>
<Height>212 px</Height>
</Size>
<MinSize>
<Width>100 px</Width>
<Height>194 px</Height>
<Height>212 px</Height>
</MinSize>
<MaxSize>
<Width>800 px</Width>
<Height>194 px</Height>
<Height>212 px</Height>
</MaxSize>
<Ports />
<Oid xsi:type="SchemaModelOID">
@@ -206,20 +225,20 @@
</Model>
<Model xsi:type="EnumTypeVwModel">
<CustomProperties>
<OID>11</OID>
<OID>12</OID>
<Parent>0</Parent>
</CustomProperties>
<Children>
<Model xsi:type="PropertiesVwModel">
<CustomProperties>
<OID>12</OID>
<Parent>11</Parent>
<OID>13</OID>
<Parent>12</Parent>
</CustomProperties>
<Children>
<Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties>
<OID>13</OID>
<Parent>12</Parent>
<OID>14</OID>
<Parent>13</Parent>
</CustomProperties>
<Children />
<Location>
@@ -237,8 +256,8 @@
</Model>
<Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties>
<OID>14</OID>
<Parent>12</Parent>
<OID>15</OID>
<Parent>13</Parent>
</CustomProperties>
<Children />
<Location>
@@ -256,8 +275,8 @@
</Model>
<Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties>
<OID>15</OID>
<Parent>12</Parent>
<OID>16</OID>
<Parent>13</Parent>
</CustomProperties>
<Children />
<Location>
@@ -275,8 +294,8 @@
</Model>
<Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties>
<OID>16</OID>
<Parent>12</Parent>
<OID>17</OID>
<Parent>13</Parent>
</CustomProperties>
<Children />
<Location>
@@ -294,8 +313,8 @@
</Model>
<Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties>
<OID>17</OID>
<Parent>12</Parent>
<OID>18</OID>
<Parent>13</Parent>
</CustomProperties>
<Children />
<Location>
@@ -313,8 +332,8 @@
</Model>
<Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties>
<OID>18</OID>
<Parent>12</Parent>
<OID>19</OID>
<Parent>13</Parent>
</CustomProperties>
<Children />
<Location>
@@ -366,25 +385,25 @@
</Model>
<Model xsi:type="ClassVwModel">
<CustomProperties>
<OID>19</OID>
<OID>20</OID>
<Parent>0</Parent>
</CustomProperties>
<Children>
<Model xsi:type="PropertiesVwModel">
<CustomProperties>
<OID>20</OID>
<Parent>19</Parent>
<OID>21</OID>
<Parent>20</Parent>
</CustomProperties>
<Children>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>21</OID>
<Parent>20</Parent>
<OID>22</OID>
<Parent>21</Parent>
</CustomProperties>
<Children />
<Location>
<X>0.5 px</X>
<Y>0.500000000000028 px</Y>
<Y>0.5 px</Y>
</Location>
<Size>
<Width>144 px</Width>
@@ -397,8 +416,8 @@
</Model>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>22</OID>
<Parent>20</Parent>
<OID>23</OID>
<Parent>21</Parent>
</CustomProperties>
<Children />
<Location>
@@ -416,8 +435,8 @@
</Model>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>23</OID>
<Parent>20</Parent>
<OID>24</OID>
<Parent>21</Parent>
</CustomProperties>
<Children />
<Location>
@@ -435,8 +454,8 @@
</Model>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>24</OID>
<Parent>20</Parent>
<OID>25</OID>
<Parent>21</Parent>
</CustomProperties>
<Children />
<Location>
@@ -454,8 +473,8 @@
</Model>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>25</OID>
<Parent>20</Parent>
<OID>26</OID>
<Parent>21</Parent>
</CustomProperties>
<Children />
<Location>
@@ -473,8 +492,8 @@
</Model>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>26</OID>
<Parent>20</Parent>
<OID>27</OID>
<Parent>21</Parent>
</CustomProperties>
<Children />
<Location>
@@ -491,10 +510,6 @@
</Oid>
</Model>
</Children>
<Location>
<X>0 px</X>
<Y>2.8421709430404E-14 px</Y>
</Location>
<Size>
<Width>145 px</Width>
<Height>109 px</Height>
@@ -506,20 +521,16 @@
</Model>
<Model xsi:type="RelationPropertiesVwModel">
<CustomProperties>
<OID>27</OID>
<Parent>19</Parent>
<OID>28</OID>
<Parent>20</Parent>
</CustomProperties>
<Children>
<Model xsi:type="RelationPropertyVwModel">
<CustomProperties>
<OID>28</OID>
<Parent>27</Parent>
<OID>29</OID>
<Parent>28</Parent>
</CustomProperties>
<Children />
<Location>
<X>0 px</X>
<Y>2.8421709430404E-14 px</Y>
</Location>
<Size>
<Width>144 px</Width>
<Height>18 px</Height>
@@ -570,20 +581,20 @@
</Model>
<Model xsi:type="ClassVwModel">
<CustomProperties>
<OID>29</OID>
<OID>30</OID>
<Parent>0</Parent>
</CustomProperties>
<Children>
<Model xsi:type="PropertiesVwModel">
<CustomProperties>
<OID>30</OID>
<Parent>29</Parent>
<OID>31</OID>
<Parent>30</Parent>
</CustomProperties>
<Children>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>31</OID>
<Parent>30</Parent>
<OID>32</OID>
<Parent>31</Parent>
</CustomProperties>
<Children />
<Location>
@@ -601,8 +612,8 @@
</Model>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>32</OID>
<Parent>30</Parent>
<OID>33</OID>
<Parent>31</Parent>
</CustomProperties>
<Children />
<Location>
@@ -620,8 +631,8 @@
</Model>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>33</OID>
<Parent>30</Parent>
<OID>34</OID>
<Parent>31</Parent>
</CustomProperties>
<Children />
<Location>
@@ -639,8 +650,8 @@
</Model>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>34</OID>
<Parent>30</Parent>
<OID>35</OID>
<Parent>31</Parent>
</CustomProperties>
<Children />
<Location>
@@ -658,8 +669,8 @@
</Model>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>35</OID>
<Parent>30</Parent>
<OID>36</OID>
<Parent>31</Parent>
</CustomProperties>
<Children />
<Location>
@@ -677,8 +688,8 @@
</Model>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>36</OID>
<Parent>30</Parent>
<OID>37</OID>
<Parent>31</Parent>
</CustomProperties>
<Children />
<Location>
@@ -694,26 +705,64 @@
<TypeName>EntityDeveloper.EntityFrameworkCore.EntityProperty</TypeName>
</Oid>
</Model>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>38</OID>
<Parent>31</Parent>
</CustomProperties>
<Children />
<Location>
<X>0.5 px</X>
<Y>108.5 px</Y>
</Location>
<Size>
<Width>290 px</Width>
<Height>18 px</Height>
</Size>
<Oid xsi:type="SchemaModelOID">
<Path>7856bc01-520d-4caf-aefc-7bd4f1c78bd7</Path>
<TypeName>EntityDeveloper.EntityFrameworkCore.EntityProperty</TypeName>
</Oid>
</Model>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>39</OID>
<Parent>31</Parent>
</CustomProperties>
<Children />
<Location>
<X>0.5 px</X>
<Y>126.5 px</Y>
</Location>
<Size>
<Width>290 px</Width>
<Height>18 px</Height>
</Size>
<Oid xsi:type="SchemaModelOID">
<Path>735a509b-89a5-44b6-a80d-dc1bcd369ee2</Path>
<TypeName>EntityDeveloper.EntityFrameworkCore.EntityProperty</TypeName>
</Oid>
</Model>
</Children>
<Size>
<Width>291 px</Width>
<Height>109 px</Height>
<Height>145 px</Height>
</Size>
<MaxSize>
<Width>0 px</Width>
<Height>109 px</Height>
<Height>145 px</Height>
</MaxSize>
</Model>
<Model xsi:type="RelationPropertiesVwModel">
<CustomProperties>
<OID>37</OID>
<Parent>29</Parent>
<OID>40</OID>
<Parent>30</Parent>
</CustomProperties>
<Children>
<Model xsi:type="RelationPropertyVwModel">
<CustomProperties>
<OID>38</OID>
<Parent>37</Parent>
<OID>41</OID>
<Parent>40</Parent>
</CustomProperties>
<Children />
<Size>
@@ -727,8 +776,8 @@
</Model>
<Model xsi:type="RelationPropertyVwModel">
<CustomProperties>
<OID>39</OID>
<Parent>37</Parent>
<OID>42</OID>
<Parent>40</Parent>
</CustomProperties>
<Children />
<Location>
@@ -747,7 +796,7 @@
</Children>
<Location>
<X>0 px</X>
<Y>108 px</Y>
<Y>144 px</Y>
</Location>
<Size>
<Width>291 px</Width>
@@ -766,15 +815,15 @@
</Location>
<Size>
<Width>296 px</Width>
<Height>212 px</Height>
<Height>248 px</Height>
</Size>
<MinSize>
<Width>100 px</Width>
<Height>212 px</Height>
<Height>248 px</Height>
</MinSize>
<MaxSize>
<Width>800 px</Width>
<Height>212 px</Height>
<Height>248 px</Height>
</MaxSize>
<Ports />
<Oid xsi:type="SchemaModelOID">
@@ -785,11 +834,11 @@
</Model>
<Model xsi:type="AssociationVwModel">
<CustomProperties>
<OID>40</OID>
<OID>43</OID>
<OutModel>1</OutModel>
<InModel>29</InModel>
<OutPort>41</OutPort>
<InPort>42</InPort>
<InModel>30</InModel>
<OutPort>44</OutPort>
<InPort>45</InPort>
<Parent>0</Parent>
</CustomProperties>
<PortAnchors>
@@ -801,7 +850,7 @@
<Anchors>Left Right</Anchors>
<Align>Bottom</Align>
<CustomProperties>
<OID>41</OID>
<OID>44</OID>
<PortType>FloatAnchor</PortType>
</CustomProperties>
</Port>
@@ -813,7 +862,7 @@
<Anchors>Left Right</Anchors>
<Align>Top</Align>
<CustomProperties>
<OID>42</OID>
<OID>45</OID>
<PortType>FloatAnchor</PortType>
</CustomProperties>
</Port>
@@ -826,20 +875,20 @@
</Model>
<Model xsi:type="EnumTypeVwModel">
<CustomProperties>
<OID>43</OID>
<OID>46</OID>
<Parent>0</Parent>
</CustomProperties>
<Children>
<Model xsi:type="PropertiesVwModel">
<CustomProperties>
<OID>44</OID>
<Parent>43</Parent>
<OID>47</OID>
<Parent>46</Parent>
</CustomProperties>
<Children>
<Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties>
<OID>45</OID>
<Parent>44</Parent>
<OID>48</OID>
<Parent>47</Parent>
</CustomProperties>
<Children />
<Location>
@@ -857,8 +906,8 @@
</Model>
<Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties>
<OID>46</OID>
<Parent>44</Parent>
<OID>49</OID>
<Parent>47</Parent>
</CustomProperties>
<Children />
<Location>
@@ -876,8 +925,8 @@
</Model>
<Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties>
<OID>47</OID>
<Parent>44</Parent>
<OID>50</OID>
<Parent>47</Parent>
</CustomProperties>
<Children />
<Location>
@@ -895,8 +944,8 @@
</Model>
<Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties>
<OID>48</OID>
<Parent>44</Parent>
<OID>51</OID>
<Parent>47</Parent>
</CustomProperties>
<Children />
<Location>
@@ -914,8 +963,8 @@
</Model>
<Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties>
<OID>49</OID>
<Parent>44</Parent>
<OID>52</OID>
<Parent>47</Parent>
</CustomProperties>
<Children />
<Location>
@@ -933,8 +982,8 @@
</Model>
<Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties>
<OID>50</OID>
<Parent>44</Parent>
<OID>53</OID>
<Parent>47</Parent>
</CustomProperties>
<Children />
<Location>
@@ -952,8 +1001,8 @@
</Model>
<Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties>
<OID>51</OID>
<Parent>44</Parent>
<OID>54</OID>
<Parent>47</Parent>
</CustomProperties>
<Children />
<Location>
@@ -1005,11 +1054,11 @@
</Model>
<Model xsi:type="AssociationVwModel">
<CustomProperties>
<OID>52</OID>
<OutModel>19</OutModel>
<InModel>29</InModel>
<OutPort>53</OutPort>
<InPort>54</InPort>
<OID>55</OID>
<OutModel>20</OutModel>
<InModel>30</InModel>
<OutPort>56</OutPort>
<InPort>57</InPort>
<Parent>0</Parent>
</CustomProperties>
<PortAnchors>
@@ -1021,19 +1070,19 @@
<Anchors>Top Bottom</Anchors>
<Align>Right</Align>
<CustomProperties>
<OID>53</OID>
<OID>56</OID>
<PortType>FloatAnchor</PortType>
</CustomProperties>
</Port>
<Port>
<Location>
<X>0 px</X>
<Y>86.3298969072165 px</Y>
<Y>100.989690721649 px</Y>
</Location>
<Anchors>Top Bottom</Anchors>
<Align>Left</Align>
<CustomProperties>
<OID>54</OID>
<OID>57</OID>
<PortType>FloatAnchor</PortType>
</CustomProperties>
</Port>
@@ -1045,7 +1094,7 @@
</PointD>
<PointD>
<X>34 px</X>
<Y>342.329896907216 px</Y>
<Y>356.989690721649 px</Y>
</PointD>
</BendPoints>
<IsManuallyRouted>false</IsManuallyRouted>

View File

@@ -38,6 +38,9 @@
<property name="Created" type="DateTime" p1:ValidateRequired="true" p1:Guid="349bc0e7-f815-4593-9215-d2b91fdfacc4">
<column name="" />
</property>
<property name="EncryptedPassword" type="String" p1:ValidateRequired="true" p1:Guid="0e030886-d23e-4293-aeea-86f0a5c53d4e">
<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">
@@ -78,6 +81,12 @@
<property name="ProspectId" type="Guid" p1:ValidateRequired="true" p1:Guid="55b4bace-d6bd-4e19-8a15-8c34157251b6">
<column name="" not-null="False" />
</property>
<property name="NotNeeded" type="Boolean" p1:ValidateRequired="true" p1:Guid="7856bc01-520d-4caf-aefc-7bd4f1c78bd7">
<column name="" />
</property>
<property name="Created" type="DateTime" p1:ValidateRequired="true" p1:Guid="735a509b-89a5-44b6-a80d-dc1bcd369ee2">
<column name="" />
</property>
</class>
<associations>
<association name="User_InteractionDate" cardinality="OneToMany" p1:Guid="865bd42d-b0ba-426f-a351-bcbdd38533f1">

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: 02.04.2022 16:05:26
// Code is generated on: 04.04.2022 13:38:25
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -37,6 +37,10 @@ namespace FoodsharingSiegen.Contracts.Entity
public virtual Guid ProspectId { get; set; }
public virtual bool NotNeeded { get; set; }
public virtual DateTime Created { get; set; }
public virtual User User { get; set; }
public virtual Prospect Prospect { get; set; }

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: 02.04.2022 16:05:26
// Code is generated on: 04.04.2022 13:38:25
//
// 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: 02.04.2022 16:05:26
// Code is generated on: 04.04.2022 13:38:25
//
// 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: 02.04.2022 16:05:26
// Code is generated on: 04.04.2022 13:38:25
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.

View File

@@ -1,15 +1,23 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data;
using System.Data.Common;
using System.Linq;
using System.Linq.Expressions;
using FoodsharingSiegen.Shared.Helper;
namespace FoodsharingSiegen.Contracts.Entity
{
public partial class User
{
[NotMapped]
public string Password
{
get => AuthHelper.Decrypt(EncryptedPassword);
set => EncryptedPassword = AuthHelper.Encrypt(value);
}
}
}

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: 02.04.2022 16:05:26
// Code is generated on: 04.04.2022 13:38:25
//
// 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: 02.04.2022 16:05:26
// Code is generated on: 04.04.2022 13:38:25
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -137,6 +137,8 @@ namespace FoodsharingSiegen.Server.Data
modelBuilder.Entity<Interaction>().Property(x => x.Info).HasColumnName(@"Info").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>().Property(x => x.NotNeeded).HasColumnName(@"NotNeeded").IsRequired().ValueGeneratedNever();
modelBuilder.Entity<Interaction>().Property(x => x.Created).HasColumnName(@"Created").IsRequired().ValueGeneratedNever();
modelBuilder.Entity<Interaction>().HasKey(@"Id");
}

View File

@@ -0,0 +1,165 @@
// <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("20220404113700_notneeded")]
partial class notneeded
{
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<string>("Info")
.HasColumnType("TEXT")
.HasColumnName("Info");
b.Property<bool>("NotNeeded")
.HasColumnType("INTEGER")
.HasColumnName("NotNeeded");
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<DateTime>("Created")
.HasColumnType("TEXT")
.HasColumnName("Created");
b.Property<int>("FsId")
.HasColumnType("INTEGER")
.HasColumnName("FsId");
b.Property<string>("Memo")
.HasColumnType("TEXT")
.HasColumnName("Memo");
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>("EncryptedPassword")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("EncryptedPassword");
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,26 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FoodsharingSiegen.Server.Migrations
{
public partial class notneeded : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "NotNeeded",
table: "Interactions",
type: "INTEGER",
nullable: false,
defaultValue: false);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "NotNeeded",
table: "Interactions");
}
}
}

View File

@@ -0,0 +1,169 @@
// <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("20220404113848_intercreated")]
partial class intercreated
{
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>("Created")
.HasColumnType("TEXT")
.HasColumnName("Created");
b.Property<DateTime>("Date")
.HasColumnType("TEXT")
.HasColumnName("Date");
b.Property<string>("Info")
.HasColumnType("TEXT")
.HasColumnName("Info");
b.Property<bool>("NotNeeded")
.HasColumnType("INTEGER")
.HasColumnName("NotNeeded");
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<DateTime>("Created")
.HasColumnType("TEXT")
.HasColumnName("Created");
b.Property<int>("FsId")
.HasColumnType("INTEGER")
.HasColumnName("FsId");
b.Property<string>("Memo")
.HasColumnType("TEXT")
.HasColumnName("Memo");
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>("EncryptedPassword")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("EncryptedPassword");
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,27 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FoodsharingSiegen.Server.Migrations
{
public partial class intercreated : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "Created",
table: "Interactions",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Created",
table: "Interactions");
}
}
}

View File

@@ -24,6 +24,10 @@ namespace FoodsharingSiegen.Server.Migrations
.HasColumnType("TEXT")
.HasColumnName("Id");
b.Property<DateTime>("Created")
.HasColumnType("TEXT")
.HasColumnName("Created");
b.Property<DateTime>("Date")
.HasColumnType("TEXT")
.HasColumnName("Date");
@@ -32,6 +36,10 @@ namespace FoodsharingSiegen.Server.Migrations
.HasColumnType("TEXT")
.HasColumnName("Info");
b.Property<bool>("NotNeeded")
.HasColumnType("INTEGER")
.HasColumnName("NotNeeded");
b.Property<Guid>("ProspectId")
.HasColumnType("TEXT")
.HasColumnName("ProspectId");