Website Summary Files Commits Branches @commit @diff @stats
path: root / src / DevHive.Data / Migrations / DevHiveContextModelSnapshot.cs
diff options
context:
space:
mode:
Commit01ad75fa5a871a0c9f8cd0c5291312286ae4d52d (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-02-03 10:22:37 +0200
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-02-03 10:22:37 +0200
Files4f6b2eaef0424ffbfdd405939fbaa9325cc9d2c8 /src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs
DevHive-01ad75fa5a871a0c9f8cd0c5291312286ae4d52d.tar
DevHive-01ad75fa5a871a0c9f8cd0c5291312286ae4d52d.tar.gz
DevHive-01ad75fa5a871a0c9f8cd0c5291312286ae4d52d.zip
Parent81b3fc43a900857443c3c763f52e0a54719c2fae (diff)
Implemented profile picture table functionality; added models and interfaces for profile picture; added ability for user layers to update the profile picture; added migrations; updated mappings
1 files changed, 33 insertions, 3 deletions
-rw-r--r--src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs36
diff --git a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs
index 96cabad..0450670 100644
--- a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs
+++ b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs
@@ -86,6 +86,26 @@ namespace DevHive.Data.Migrations
b.ToTable("Posts");
});
+ modelBuilder.Entity("DevHive.Data.Models.ProfilePicture", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property<string>("PictureURL")
+ .HasColumnType("text");
+
+ b.Property<Guid>("UserId")
+ .HasColumnType("uuid");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId")
+ .IsUnique();
+
+ b.ToTable("ProfilePicture");
+ });
+
modelBuilder.Entity("DevHive.Data.Models.Rating", b =>
{
b.Property<Guid>("Id")
@@ -190,9 +210,6 @@ namespace DevHive.Data.Migrations
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("boolean");
- b.Property<string>("ProfilePictureUrl")
- .HasColumnType("text");
-
b.Property<string>("SecurityStamp")
.HasColumnType("text");
@@ -437,6 +454,17 @@ namespace DevHive.Data.Migrations
b.Navigation("Creator");
});
+ modelBuilder.Entity("DevHive.Data.Models.ProfilePicture", b =>
+ {
+ b.HasOne("DevHive.Data.Models.User", "User")
+ .WithOne("ProfilePicture")
+ .HasForeignKey("DevHive.Data.Models.ProfilePicture", "UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("User");
+ });
+
modelBuilder.Entity("DevHive.Data.RelationModels.RatedPost", b =>
{
b.HasOne("DevHive.Data.Models.Post", "Post")
@@ -594,6 +622,8 @@ namespace DevHive.Data.Migrations
b.Navigation("MyFriends");
b.Navigation("Posts");
+
+ b.Navigation("ProfilePicture");
});
#pragma warning restore 612, 618
}