Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Data / DevHive.Data.Models
diff options
context:
space:
mode:
Commit43336a1e977f33ad49ad8b4851ca449936f93ce6 (patch)
Author
 Danail Dimitrov <danaildimitrov321@gmail.com>
2021-04-07 19:30:04 +0300
Committer
 Danail Dimitrov <danaildimitrov321@gmail.com>
2021-04-07 19:30:04 +0300
Filesc5170bebb63d1e57bef891905e0c2839766b8a08 /src/Data/DevHive.Data.Models
DevHive-43336a1e977f33ad49ad8b4851ca449936f93ce6.tar
DevHive-43336a1e977f33ad49ad8b4851ca449936f93ce6.tar.gz
DevHive-43336a1e977f33ad49ad8b4851ca449936f93ce6.zip
Parentb8d1edfc582bee2ef648757bcad1bbadd075bb08 (diff)
adding functionality to add and remove friends
1 files changed, 17 insertions, 0 deletions
-rw-r--r--src/Data/DevHive.Data.Models/Friendship.cs17
diff --git a/src/Data/DevHive.Data.Models/Friendship.cs b/src/Data/DevHive.Data.Models/Friendship.cs
new file mode 100644
index 0000000..91ac9c7
--- /dev/null
+++ b/src/Data/DevHive.Data.Models/Friendship.cs
@@ -0,0 +1,17 @@
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace DevHive.Data.Models
+{
+ //class for handling the many to many relationship betwen users and users for friends
+ public class Friendship
+ {
+ [NotMapped]
+ public Guid BaseUserId { get; set; }
+ [NotMapped]
+ public Guid FriendUserId { get; set; }
+
+ public User BaseUser { get; set; }
+ public User FriendUser { get; set; }
+ }
+}