aboutsummaryrefslogtreecommitdiff
path: root/src/Data/DevHive.Data/Interfaces/IRatingRepository.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/DevHive.Data/Interfaces/IRatingRepository.cs')
-rw-r--r--src/Data/DevHive.Data/Interfaces/IRatingRepository.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Data/DevHive.Data/Interfaces/IRatingRepository.cs b/src/Data/DevHive.Data/Interfaces/IRatingRepository.cs
new file mode 100644
index 0000000..4840c59
--- /dev/null
+++ b/src/Data/DevHive.Data/Interfaces/IRatingRepository.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using DevHive.Data.Models;
+namespace DevHive.Data.Interfaces
+{
+ public interface IRatingRepository : IRepository<Rating>
+ {
+ Task<List<Rating>> GetRatingsByPostId(Guid postId);
+ Task<bool> UserRatedPost(Guid userId, Guid postId);
+ Task<Rating> GetRatingByUserAndPostId(Guid userId, Guid postId);
+
+ Task<bool> DoesRatingExist(Guid id);
+ }
+}