aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Data/RelationModels
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-02-01 16:03:38 +0200
committertranstrike <transtrike@gmail.com>2021-02-01 16:03:38 +0200
commitb41f887712ef8f2f0b602da3042261a78c5f492a (patch)
treefb6437ea34896da7c7db3a292bbdb8ee7d14e889 /src/DevHive.Data/RelationModels
parentaa342542789b22f24ce3ecbfcb7888d4ff12d30c (diff)
downloadDevHive-b41f887712ef8f2f0b602da3042261a78c5f492a.tar
DevHive-b41f887712ef8f2f0b602da3042261a78c5f492a.tar.gz
DevHive-b41f887712ef8f2f0b602da3042261a78c5f492a.zip
Commented out implementation of Rating; Bug fixes
Diffstat (limited to 'src/DevHive.Data/RelationModels')
-rw-r--r--src/DevHive.Data/RelationModels/RatedPosts.cs18
-rw-r--r--src/DevHive.Data/RelationModels/UserFriends.cs2
-rw-r--r--src/DevHive.Data/RelationModels/UserRate.cs16
3 files changed, 36 insertions, 0 deletions
diff --git a/src/DevHive.Data/RelationModels/RatedPosts.cs b/src/DevHive.Data/RelationModels/RatedPosts.cs
new file mode 100644
index 0000000..7001d92
--- /dev/null
+++ b/src/DevHive.Data/RelationModels/RatedPosts.cs
@@ -0,0 +1,18 @@
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Reflection.Metadata.Ecma335;
+using DevHive.Data.Models;
+using Microsoft.EntityFrameworkCore;
+
+namespace DevHive.Data.RelationModels
+{
+ [Table("RatedPosts")]
+ public class RatedPost
+ {
+ public Guid UserId { get; set; }
+ public User User { get; set; }
+
+ public Guid PostId { get; set; }
+ public Post Post { get; set; }
+ }
+}
diff --git a/src/DevHive.Data/RelationModels/UserFriends.cs b/src/DevHive.Data/RelationModels/UserFriends.cs
index 485d6ec..31bdee2 100644
--- a/src/DevHive.Data/RelationModels/UserFriends.cs
+++ b/src/DevHive.Data/RelationModels/UserFriends.cs
@@ -1,9 +1,11 @@
using System;
using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
using DevHive.Data.Models;
namespace DevHive.Data.RelationModels
{
+ [Table("UserFriends")]
public class UserFriends
{
public Guid UserId { get; set; }
diff --git a/src/DevHive.Data/RelationModels/UserRate.cs b/src/DevHive.Data/RelationModels/UserRate.cs
new file mode 100644
index 0000000..06e9ab5
--- /dev/null
+++ b/src/DevHive.Data/RelationModels/UserRate.cs
@@ -0,0 +1,16 @@
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+using DevHive.Data.Models;
+
+namespace DevHive.Data.RelationModels
+{
+ [Table("UserRates")]
+ public class UserRate
+ {
+ public Guid Id { get; set; }
+
+ public User User { get; set; }
+
+ public bool Rate { get; set; }
+ }
+}