aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-02-05 19:00:24 +0200
committertranstrike <transtrike@gmail.com>2021-02-05 19:00:24 +0200
commit75eeb4358e746d887677903052ed4bd5ca176f4d (patch)
tree9f9b9eb0103d61f488c08fa4b4b5f308ca9ab35a /src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs
parent51e157d1e1dc57ea2ba9c29b355fa7982a29bebe (diff)
parent4eb5ccdfc8ee4ac9795c48c701e565dbe2b641f9 (diff)
downloadDevHive-75eeb4358e746d887677903052ed4bd5ca176f4d.tar
DevHive-75eeb4358e746d887677903052ed4bd5ca176f4d.tar.gz
DevHive-75eeb4358e746d887677903052ed4bd5ca176f4d.zip
Merge branch 'dev' of github.com:Team-Kaleidoscope/DevHive into dev
Diffstat (limited to 'src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs')
-rw-r--r--src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs70
1 files changed, 64 insertions, 6 deletions
diff --git a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs
index 0450670..6e0a03a 100644
--- a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs
+++ b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs
@@ -1,6 +1,5 @@
// <auto-generated />
using System;
-using System.Collections.Generic;
using DevHive.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
@@ -70,9 +69,6 @@ namespace DevHive.Data.Migrations
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid");
- b.Property<List<string>>("FileUrls")
- .HasColumnType("text[]");
-
b.Property<string>("Message")
.HasColumnType("text");
@@ -112,11 +108,17 @@ namespace DevHive.Data.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
+ b.Property<Guid>("PostId")
+ .HasColumnType("uuid");
+
b.Property<int>("Rate")
.HasColumnType("integer");
b.HasKey("Id");
+ b.HasIndex("PostId")
+ .IsUnique();
+
b.ToTable("Rating");
});
@@ -235,6 +237,25 @@ namespace DevHive.Data.Migrations
b.ToTable("AspNetUsers");
});
+ modelBuilder.Entity("DevHive.Data.RelationModels.PostAttachments", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property<string>("FileUrl")
+ .HasColumnType("text");
+
+ b.Property<Guid?>("PostId")
+ .HasColumnType("uuid");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PostId");
+
+ b.ToTable("PostAttachments");
+ });
+
modelBuilder.Entity("DevHive.Data.RelationModels.RatedPost", b =>
{
b.Property<Guid>("UserId")
@@ -271,14 +292,19 @@ namespace DevHive.Data.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
- b.Property<bool>("Rate")
+ b.Property<bool>("Liked")
.HasColumnType("boolean");
+ b.Property<Guid?>("PostId")
+ .HasColumnType("uuid");
+
b.Property<Guid?>("UserId")
.HasColumnType("uuid");
b.HasKey("Id");
+ b.HasIndex("PostId");
+
b.HasIndex("UserId");
b.ToTable("UserRates");
@@ -465,6 +491,26 @@ namespace DevHive.Data.Migrations
b.Navigation("User");
});
+ modelBuilder.Entity("DevHive.Data.Models.Rating", b =>
+ {
+ b.HasOne("DevHive.Data.Models.Post", "Post")
+ .WithOne("Rating")
+ .HasForeignKey("DevHive.Data.Models.Rating", "PostId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Post");
+ });
+
+ modelBuilder.Entity("DevHive.Data.RelationModels.PostAttachments", b =>
+ {
+ b.HasOne("DevHive.Data.Models.Post", "Post")
+ .WithMany("Attachments")
+ .HasForeignKey("PostId");
+
+ b.Navigation("Post");
+ });
+
modelBuilder.Entity("DevHive.Data.RelationModels.RatedPost", b =>
{
b.HasOne("DevHive.Data.Models.Post", "Post")
@@ -474,7 +520,7 @@ namespace DevHive.Data.Migrations
.IsRequired();
b.HasOne("DevHive.Data.Models.User", "User")
- .WithMany()
+ .WithMany("RatedPosts")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@@ -505,10 +551,16 @@ namespace DevHive.Data.Migrations
modelBuilder.Entity("DevHive.Data.RelationModels.UserRate", b =>
{
+ b.HasOne("DevHive.Data.Models.Post", "Post")
+ .WithMany()
+ .HasForeignKey("PostId");
+
b.HasOne("DevHive.Data.Models.User", "User")
.WithMany()
.HasForeignKey("UserId");
+ b.Navigation("Post");
+
b.Navigation("User");
});
@@ -610,7 +662,11 @@ namespace DevHive.Data.Migrations
modelBuilder.Entity("DevHive.Data.Models.Post", b =>
{
+ b.Navigation("Attachments");
+
b.Navigation("Comments");
+
+ b.Navigation("Rating");
});
modelBuilder.Entity("DevHive.Data.Models.User", b =>
@@ -624,6 +680,8 @@ namespace DevHive.Data.Migrations
b.Navigation("Posts");
b.Navigation("ProfilePicture");
+
+ b.Navigation("RatedPosts");
});
#pragma warning restore 612, 618
}