diff --git a/FSSiegen.Diagram1.view b/FSSiegen.Diagram1.view index 6d6e126..fb56f60 100644 --- a/FSSiegen.Diagram1.view +++ b/FSSiegen.Diagram1.view @@ -134,26 +134,45 @@ EntityDeveloper.EntityFrameworkCore.EntityProperty + + + 9 + 2 + + + + 0.5 px + 108.5 px + + + 162 px + 18 px + + + 0e030886-d23e-4293-aeea-86f0a5c53d4e + EntityDeveloper.EntityFrameworkCore.EntityProperty + + 163 px - 109 px + 127 px 0 px - 109 px + 127 px - 9 + 10 1 - 10 - 9 + 11 + 10 @@ -168,7 +187,7 @@ 0 px - 108 px + 126 px 163 px @@ -187,15 +206,15 @@ 168 px - 194 px + 212 px 100 px - 194 px + 212 px 800 px - 194 px + 212 px @@ -206,20 +225,20 @@ - 11 + 12 0 - 12 - 11 + 13 + 12 - 13 - 12 + 14 + 13 @@ -237,8 +256,8 @@ - 14 - 12 + 15 + 13 @@ -256,8 +275,8 @@ - 15 - 12 + 16 + 13 @@ -275,8 +294,8 @@ - 16 - 12 + 17 + 13 @@ -294,8 +313,8 @@ - 17 - 12 + 18 + 13 @@ -313,8 +332,8 @@ - 18 - 12 + 19 + 13 @@ -366,25 +385,25 @@ - 19 + 20 0 - 20 - 19 + 21 + 20 - 21 - 20 + 22 + 21 0.5 px - 0.500000000000028 px + 0.5 px 144 px @@ -397,8 +416,8 @@ - 22 - 20 + 23 + 21 @@ -416,8 +435,8 @@ - 23 - 20 + 24 + 21 @@ -435,8 +454,8 @@ - 24 - 20 + 25 + 21 @@ -454,8 +473,8 @@ - 25 - 20 + 26 + 21 @@ -473,8 +492,8 @@ - 26 - 20 + 27 + 21 @@ -491,10 +510,6 @@ - - 0 px - 2.8421709430404E-14 px - 145 px 109 px @@ -506,20 +521,16 @@ - 27 - 19 + 28 + 20 - 28 - 27 + 29 + 28 - - 0 px - 2.8421709430404E-14 px - 144 px 18 px @@ -570,20 +581,20 @@ - 29 + 30 0 - 30 - 29 + 31 + 30 - 31 - 30 + 32 + 31 @@ -601,8 +612,8 @@ - 32 - 30 + 33 + 31 @@ -620,8 +631,8 @@ - 33 - 30 + 34 + 31 @@ -639,8 +650,8 @@ - 34 - 30 + 35 + 31 @@ -658,8 +669,8 @@ - 35 - 30 + 36 + 31 @@ -677,8 +688,8 @@ - 36 - 30 + 37 + 31 @@ -694,26 +705,64 @@ EntityDeveloper.EntityFrameworkCore.EntityProperty + + + 38 + 31 + + + + 0.5 px + 108.5 px + + + 290 px + 18 px + + + 7856bc01-520d-4caf-aefc-7bd4f1c78bd7 + EntityDeveloper.EntityFrameworkCore.EntityProperty + + + + + 39 + 31 + + + + 0.5 px + 126.5 px + + + 290 px + 18 px + + + 735a509b-89a5-44b6-a80d-dc1bcd369ee2 + EntityDeveloper.EntityFrameworkCore.EntityProperty + + 291 px - 109 px + 145 px 0 px - 109 px + 145 px - 37 - 29 + 40 + 30 - 38 - 37 + 41 + 40 @@ -727,8 +776,8 @@ - 39 - 37 + 42 + 40 @@ -747,7 +796,7 @@ 0 px - 108 px + 144 px 291 px @@ -766,15 +815,15 @@ 296 px - 212 px + 248 px 100 px - 212 px + 248 px 800 px - 212 px + 248 px @@ -785,11 +834,11 @@ - 40 + 43 1 - 29 - 41 - 42 + 30 + 44 + 45 0 @@ -801,7 +850,7 @@ Left Right Bottom - 41 + 44 FloatAnchor @@ -813,7 +862,7 @@ Left Right Top - 42 + 45 FloatAnchor @@ -826,20 +875,20 @@ - 43 + 46 0 - 44 - 43 + 47 + 46 - 45 - 44 + 48 + 47 @@ -857,8 +906,8 @@ - 46 - 44 + 49 + 47 @@ -876,8 +925,8 @@ - 47 - 44 + 50 + 47 @@ -895,8 +944,8 @@ - 48 - 44 + 51 + 47 @@ -914,8 +963,8 @@ - 49 - 44 + 52 + 47 @@ -933,8 +982,8 @@ - 50 - 44 + 53 + 47 @@ -952,8 +1001,8 @@ - 51 - 44 + 54 + 47 @@ -1005,11 +1054,11 @@ - 52 - 19 - 29 - 53 - 54 + 55 + 20 + 30 + 56 + 57 0 @@ -1021,19 +1070,19 @@ Top Bottom Right - 53 + 56 FloatAnchor 0 px - 86.3298969072165 px + 100.989690721649 px Top Bottom Left - 54 + 57 FloatAnchor @@ -1045,7 +1094,7 @@ 34 px - 342.329896907216 px + 356.989690721649 px false diff --git a/FSSiegen.efml b/FSSiegen.efml index 815d434..1c3979c 100644 --- a/FSSiegen.efml +++ b/FSSiegen.efml @@ -38,6 +38,9 @@ + + + @@ -78,6 +81,12 @@ + + + + + + diff --git a/FoodsharingSiegen.Contracts/Entity/Interaction.Generated.cs b/FoodsharingSiegen.Contracts/Entity/Interaction.Generated.cs index 726980a..e917c06 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 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; } diff --git a/FoodsharingSiegen.Contracts/Entity/InteractionType.cs b/FoodsharingSiegen.Contracts/Entity/InteractionType.cs index 6c50600..a23f176 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 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. diff --git a/FoodsharingSiegen.Contracts/Entity/Prospect.Generated.cs b/FoodsharingSiegen.Contracts/Entity/Prospect.Generated.cs index 4ced7c3..1bd71ee 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 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. diff --git a/FoodsharingSiegen.Contracts/Entity/User.Generated.cs b/FoodsharingSiegen.Contracts/Entity/User.Generated.cs index abaab07..e355f1b 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 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. diff --git a/FoodsharingSiegen.Contracts/Entity/User.cs b/FoodsharingSiegen.Contracts/Entity/User.cs index a1dc82f..0f96ff8 100644 --- a/FoodsharingSiegen.Contracts/Entity/User.cs +++ b/FoodsharingSiegen.Contracts/Entity/User.cs @@ -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); + } } } diff --git a/FoodsharingSiegen.Contracts/Entity/UserType.cs b/FoodsharingSiegen.Contracts/Entity/UserType.cs index eacd86e..be16cb1 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 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. diff --git a/FoodsharingSiegen.Server/Data/FsContext.Generated.cs b/FoodsharingSiegen.Server/Data/FsContext.Generated.cs index 6a7143b..ca8f186 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 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().Property(x => x.Info).HasColumnName(@"Info").ValueGeneratedNever(); modelBuilder.Entity().Property(x => x.Type).HasColumnName(@"Type").IsRequired().ValueGeneratedNever(); modelBuilder.Entity().Property(x => x.ProspectId).HasColumnName(@"ProspectId").ValueGeneratedNever(); + modelBuilder.Entity().Property(x => x.NotNeeded).HasColumnName(@"NotNeeded").IsRequired().ValueGeneratedNever(); + modelBuilder.Entity().Property(x => x.Created).HasColumnName(@"Created").IsRequired().ValueGeneratedNever(); modelBuilder.Entity().HasKey(@"Id"); } diff --git a/FoodsharingSiegen.Server/Migrations/20220404113700_notneeded.Designer.cs b/FoodsharingSiegen.Server/Migrations/20220404113700_notneeded.Designer.cs new file mode 100644 index 0000000..79a6bf2 --- /dev/null +++ b/FoodsharingSiegen.Server/Migrations/20220404113700_notneeded.Designer.cs @@ -0,0 +1,165 @@ +// +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("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasColumnName("Id"); + + b.Property("Date") + .HasColumnType("TEXT") + .HasColumnName("Date"); + + b.Property("Info") + .HasColumnType("TEXT") + .HasColumnName("Info"); + + b.Property("NotNeeded") + .HasColumnType("INTEGER") + .HasColumnName("NotNeeded"); + + 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("EncryptedPassword") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("EncryptedPassword"); + + 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/20220404113700_notneeded.cs b/FoodsharingSiegen.Server/Migrations/20220404113700_notneeded.cs new file mode 100644 index 0000000..78b9827 --- /dev/null +++ b/FoodsharingSiegen.Server/Migrations/20220404113700_notneeded.cs @@ -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( + name: "NotNeeded", + table: "Interactions", + type: "INTEGER", + nullable: false, + defaultValue: false); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "NotNeeded", + table: "Interactions"); + } + } +} diff --git a/FoodsharingSiegen.Server/Migrations/20220404113848_intercreated.Designer.cs b/FoodsharingSiegen.Server/Migrations/20220404113848_intercreated.Designer.cs new file mode 100644 index 0000000..b52cad2 --- /dev/null +++ b/FoodsharingSiegen.Server/Migrations/20220404113848_intercreated.Designer.cs @@ -0,0 +1,169 @@ +// +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("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasColumnName("Id"); + + b.Property("Created") + .HasColumnType("TEXT") + .HasColumnName("Created"); + + b.Property("Date") + .HasColumnType("TEXT") + .HasColumnName("Date"); + + b.Property("Info") + .HasColumnType("TEXT") + .HasColumnName("Info"); + + b.Property("NotNeeded") + .HasColumnType("INTEGER") + .HasColumnName("NotNeeded"); + + 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("EncryptedPassword") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("EncryptedPassword"); + + 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/20220404113848_intercreated.cs b/FoodsharingSiegen.Server/Migrations/20220404113848_intercreated.cs new file mode 100644 index 0000000..37f935a --- /dev/null +++ b/FoodsharingSiegen.Server/Migrations/20220404113848_intercreated.cs @@ -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( + 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"); + } + } +} diff --git a/FoodsharingSiegen.Server/Migrations/FsContextModelSnapshot.cs b/FoodsharingSiegen.Server/Migrations/FsContextModelSnapshot.cs index f7ba54f..6f39810 100644 --- a/FoodsharingSiegen.Server/Migrations/FsContextModelSnapshot.cs +++ b/FoodsharingSiegen.Server/Migrations/FsContextModelSnapshot.cs @@ -24,6 +24,10 @@ namespace FoodsharingSiegen.Server.Migrations .HasColumnType("TEXT") .HasColumnName("Id"); + b.Property("Created") + .HasColumnType("TEXT") + .HasColumnName("Created"); + b.Property("Date") .HasColumnType("TEXT") .HasColumnName("Date"); @@ -32,6 +36,10 @@ namespace FoodsharingSiegen.Server.Migrations .HasColumnType("TEXT") .HasColumnName("Info"); + b.Property("NotNeeded") + .HasColumnType("INTEGER") + .HasColumnName("NotNeeded"); + b.Property("ProspectId") .HasColumnType("TEXT") .HasColumnName("ProspectId");