From 94a3b0661106e91ab3a1a523af3c60df131a4f63 Mon Sep 17 00:00:00 2001 From: transtrike Date: Thu, 17 Dec 2020 19:13:01 +0200 Subject: Friends implementation added. UserController/AddAFriend added --- .../Migrations/DevHiveContextModelSnapshot.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/DevHive.Web/Migrations/DevHiveContextModelSnapshot.cs') diff --git a/src/DevHive.Web/Migrations/DevHiveContextModelSnapshot.cs b/src/DevHive.Web/Migrations/DevHiveContextModelSnapshot.cs index c1464d4..328eb9c 100644 --- a/src/DevHive.Web/Migrations/DevHiveContextModelSnapshot.cs +++ b/src/DevHive.Web/Migrations/DevHiveContextModelSnapshot.cs @@ -135,6 +135,9 @@ namespace DevHive.Web.Migrations b.Property("TwoFactorEnabled") .HasColumnType("boolean"); + b.Property("UserId") + .HasColumnType("uuid"); + b.Property("UserName") .HasMaxLength(256) .HasColumnType("character varying(256)"); @@ -148,6 +151,8 @@ namespace DevHive.Web.Migrations .IsUnique() .HasDatabaseName("UserNameIndex"); + b.HasIndex("UserId"); + b.HasIndex("UserName") .IsUnique(); @@ -274,6 +279,13 @@ namespace DevHive.Web.Migrations b.ToTable("RoleUser"); }); + modelBuilder.Entity("DevHive.Data.Models.User", b => + { + b.HasOne("DevHive.Data.Models.User", null) + .WithMany("Friends") + .HasForeignKey("UserId"); + }); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.HasOne("DevHive.Data.Models.Role", null) @@ -339,6 +351,11 @@ namespace DevHive.Web.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("DevHive.Data.Models.User", b => + { + b.Navigation("Friends"); + }); #pragma warning restore 612, 618 } } -- cgit v1.2.3