diff --git a/FSSiegen.Diagram1.view b/FSSiegen.Diagram1.view index 16b9c4d..6d6e126 100644 --- a/FSSiegen.Diagram1.view +++ b/FSSiegen.Diagram1.view @@ -950,14 +950,33 @@ EntityDeveloper.EnumTypeMember + + + 51 + 44 + + + + 0.5 px + 108.5 px + + + 144 px + 18 px + + + 4c471e6c-91e8-489e-8a3d-41bee5acf5e3 + EntityDeveloper.EnumTypeMember + + 145 px - 108 px + 126 px 0 px - 109 px + 127 px @@ -967,15 +986,15 @@ 150 px - 157 px + 175 px 100 px - 157 px + 175 px 800 px - 157 px + 175 px @@ -986,11 +1005,11 @@ - 51 + 52 19 29 - 52 - 53 + 53 + 54 0 @@ -1002,7 +1021,7 @@ Top Bottom Right - 52 + 53 FloatAnchor @@ -1014,7 +1033,7 @@ Top Bottom Left - 53 + 54 FloatAnchor diff --git a/FSSiegen.efml b/FSSiegen.efml index a8cdae6..815d434 100644 --- a/FSSiegen.efml +++ b/FSSiegen.efml @@ -16,6 +16,7 @@ + @@ -54,7 +55,7 @@ - + diff --git a/FoodsharingSiegen.Contracts/Entity/Interaction.Generated.cs b/FoodsharingSiegen.Contracts/Entity/Interaction.Generated.cs index 886bc1a..3da418e 100644 --- a/FoodsharingSiegen.Contracts/Entity/Interaction.Generated.cs +++ b/FoodsharingSiegen.Contracts/Entity/Interaction.Generated.cs @@ -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 10:49:14 +// Code is generated on: 02.04.2022 14:16:15 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/FoodsharingSiegen.Contracts/Entity/InteractionType.cs b/FoodsharingSiegen.Contracts/Entity/InteractionType.cs index 289597d..e00ed46 100644 --- a/FoodsharingSiegen.Contracts/Entity/InteractionType.cs +++ b/FoodsharingSiegen.Contracts/Entity/InteractionType.cs @@ -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 10:49:14 +// Code is generated on: 02.04.2022 14:16:15 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/FoodsharingSiegen.Contracts/Entity/Prospect.Generated.cs b/FoodsharingSiegen.Contracts/Entity/Prospect.Generated.cs index 798c6a7..5b7e38d 100644 --- a/FoodsharingSiegen.Contracts/Entity/Prospect.Generated.cs +++ b/FoodsharingSiegen.Contracts/Entity/Prospect.Generated.cs @@ -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 10:49:14 +// Code is generated on: 02.04.2022 14:16:15 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/FoodsharingSiegen.Contracts/Entity/Prospect.cs b/FoodsharingSiegen.Contracts/Entity/Prospect.cs index 462181d..b045bb9 100644 --- a/FoodsharingSiegen.Contracts/Entity/Prospect.cs +++ b/FoodsharingSiegen.Contracts/Entity/Prospect.cs @@ -1,15 +1,8 @@ -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 +namespace FoodsharingSiegen.Contracts.Entity { public partial class Prospect { + public bool Complete => Interactions?.Any(x => x.Type == InteractionType.Complete) == true; } } diff --git a/FoodsharingSiegen.Contracts/Entity/User.Generated.cs b/FoodsharingSiegen.Contracts/Entity/User.Generated.cs index 1810ddd..35807f7 100644 --- a/FoodsharingSiegen.Contracts/Entity/User.Generated.cs +++ b/FoodsharingSiegen.Contracts/Entity/User.Generated.cs @@ -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 10:49:14 +// Code is generated on: 02.04.2022 14:16:15 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/FoodsharingSiegen.Contracts/Entity/UserType.cs b/FoodsharingSiegen.Contracts/Entity/UserType.cs index cb7a5e2..2ca6fc0 100644 --- a/FoodsharingSiegen.Contracts/Entity/UserType.cs +++ b/FoodsharingSiegen.Contracts/Entity/UserType.cs @@ -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 10:49:14 +// Code is generated on: 02.04.2022 14:16:15 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/FoodsharingSiegen.Server/Data/FsContext.Generated.cs b/FoodsharingSiegen.Server/Data/FsContext.Generated.cs index 1bf9874..bf958e0 100644 --- a/FoodsharingSiegen.Server/Data/FsContext.Generated.cs +++ b/FoodsharingSiegen.Server/Data/FsContext.Generated.cs @@ -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 10:49:14 +// Code is generated on: 02.04.2022 14:16:15 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -117,7 +117,7 @@ namespace FoodsharingSiegen.Server.Data modelBuilder.Entity().Property(x => x.Name).HasColumnName(@"Name").IsRequired().ValueGeneratedNever(); modelBuilder.Entity().Property(x => x.ProgressId).HasColumnName(@"ProgressId").IsRequired().ValueGeneratedNever(); modelBuilder.Entity().Property(x => x.Created).HasColumnName(@"Created").IsRequired().ValueGeneratedNever(); - modelBuilder.Entity().Property(x => x.Memo).HasColumnName(@"Memo").IsRequired().ValueGeneratedNever(); + modelBuilder.Entity().Property(x => x.Memo).HasColumnName(@"Memo").ValueGeneratedNever(); modelBuilder.Entity().HasKey(@"Id"); } diff --git a/FoodsharingSiegen.Server/Migrations/20220402121638_memonull.Designer.cs b/FoodsharingSiegen.Server/Migrations/20220402121638_memonull.Designer.cs new file mode 100644 index 0000000..1123305 --- /dev/null +++ b/FoodsharingSiegen.Server/Migrations/20220402121638_memonull.Designer.cs @@ -0,0 +1,156 @@ +// +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("20220402121638_memonull")] + partial class memonull + { + 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("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasColumnName("Id"); + + b.Property("Date") + .HasColumnType("TEXT") + .HasColumnName("Date"); + + b.Property("Info") + .HasColumnType("TEXT") + .HasColumnName("Info"); + + b.Property("ProspectId") + .HasColumnType("TEXT") + .HasColumnName("ProspectId"); + + b.Property("Type") + .HasColumnType("INTEGER") + .HasColumnName("Type"); + + b.Property("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("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasColumnName("Id"); + + b.Property("Created") + .HasColumnType("TEXT") + .HasColumnName("Created"); + + b.Property("FsId") + .HasColumnType("INTEGER") + .HasColumnName("FsId"); + + b.Property("Memo") + .HasColumnType("TEXT") + .HasColumnName("Memo"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("Name"); + + b.Property("ProgressId") + .HasColumnType("TEXT") + .HasColumnName("ProgressId"); + + b.HasKey("Id"); + + b.ToTable("Prospects", (string)null); + }); + + modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasColumnName("Id"); + + b.Property("Created") + .HasColumnType("TEXT") + .HasColumnName("Created"); + + b.Property("Mail") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("Mail"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("Name"); + + b.Property("Type") + .HasColumnType("INTEGER") + .HasColumnName("Type"); + + b.Property("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 + } + } +} diff --git a/FoodsharingSiegen.Server/Migrations/20220402121638_memonull.cs b/FoodsharingSiegen.Server/Migrations/20220402121638_memonull.cs new file mode 100644 index 0000000..8e9305e --- /dev/null +++ b/FoodsharingSiegen.Server/Migrations/20220402121638_memonull.cs @@ -0,0 +1,33 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace FoodsharingSiegen.Server.Migrations +{ + public partial class memonull : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Memo", + table: "Prospects", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Memo", + table: "Prospects", + type: "TEXT", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + } + } +} diff --git a/FoodsharingSiegen.Server/Migrations/FsContextModelSnapshot.cs b/FoodsharingSiegen.Server/Migrations/FsContextModelSnapshot.cs index f2af9f2..fed5f16 100644 --- a/FoodsharingSiegen.Server/Migrations/FsContextModelSnapshot.cs +++ b/FoodsharingSiegen.Server/Migrations/FsContextModelSnapshot.cs @@ -69,7 +69,6 @@ namespace FoodsharingSiegen.Server.Migrations .HasColumnName("FsId"); b.Property("Memo") - .IsRequired() .HasColumnType("TEXT") .HasColumnName("Memo"); diff --git a/FoodsharingSiegen.Server/app.db-shm b/FoodsharingSiegen.Server/app.db-shm deleted file mode 100644 index f751056..0000000 Binary files a/FoodsharingSiegen.Server/app.db-shm and /dev/null differ diff --git a/FoodsharingSiegen.Server/app.db-wal b/FoodsharingSiegen.Server/app.db-wal deleted file mode 100644 index 77612e4..0000000 Binary files a/FoodsharingSiegen.Server/app.db-wal and /dev/null differ