aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Data/Interfaces
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-02-05 17:46:59 +0200
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-02-05 17:46:59 +0200
commita0a048d1fc6672a6478169f3c9139d9e5a6ff474 (patch)
tree441ae3b35e2f6b55c9912e70f8a0f304ba26bc83 /src/DevHive.Data/Interfaces
parent60ed435203f0c60d4c6fabe77aa4e87656aaf8c1 (diff)
downloadDevHive-a0a048d1fc6672a6478169f3c9139d9e5a6ff474.tar
DevHive-a0a048d1fc6672a6478169f3c9139d9e5a6ff474.tar.gz
DevHive-a0a048d1fc6672a6478169f3c9139d9e5a6ff474.zip
Implemented post attachments, which move post file urls to their own table; updated post repository and post service to work with them (but didn't update service or web models)
Diffstat (limited to 'src/DevHive.Data/Interfaces')
-rw-r--r--src/DevHive.Data/Interfaces/Models/IPost.cs3
-rw-r--r--src/DevHive.Data/Interfaces/Repositories/IRatingRepository.cs4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/DevHive.Data/Interfaces/Models/IPost.cs b/src/DevHive.Data/Interfaces/Models/IPost.cs
index 5031a05..712d955 100644
--- a/src/DevHive.Data/Interfaces/Models/IPost.cs
+++ b/src/DevHive.Data/Interfaces/Models/IPost.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using DevHive.Data.Models;
+using DevHive.Data.RelationModels;
namespace DevHive.Data.Interfaces.Models
{
@@ -16,6 +17,6 @@ namespace DevHive.Data.Interfaces.Models
// Rating Rating { get; set; }
- List<string> FileUrls { get; set; }
+ List<PostAttachments> Attachments { get; set; }
}
}
diff --git a/src/DevHive.Data/Interfaces/Repositories/IRatingRepository.cs b/src/DevHive.Data/Interfaces/Repositories/IRatingRepository.cs
index 7b99e0e..f77f301 100644
--- a/src/DevHive.Data/Interfaces/Repositories/IRatingRepository.cs
+++ b/src/DevHive.Data/Interfaces/Repositories/IRatingRepository.cs
@@ -7,7 +7,7 @@ namespace DevHive.Data.Interfaces.Repositories
{
public interface IRatingRepository : IRepository<Rating>
{
- Task<Rating> GetByPostId(Guid postId);
- Task<int> GetRating(Guid postId);
+ Task<Rating> GetRatingByPostId(Guid postId);
+ Task<bool> UserRatedPost(Guid userId, Guid postId);
}
}