aboutsummaryrefslogtreecommitdiff
path: root/Backend/Api/Api/Interfaces/IPostService.cs
blob: 24a1e749f1d699e0ada6d79254c88e6528a054fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using Api.Models;

namespace Api.Interfaces
{
    public interface IPostService
    {
        Task<PostSend> addPost(PostReceive post);
        Task<List<PostSend>> getAllPosts();
        Task<PostSend> getPostById(string id,string userid);
        Task<PostSend> postToPostSend(Post post);
        Task<Boolean> AddOrReplaceRating(RatingReceive rating, string userid);
        Task<Boolean> RemoveRating(string postid, string userid);
        Task<Comment> AddComment(CommentReceive cmnt, string userid, string postid);
        Task<List<CommentSend>> ListComments(string postid);
        Task<List<CommentSend>> CascadeComments(string parentid, Post p);
        Task<Boolean> DeleteComments(string postid, string cmntid,string userid);
        Task CascadeDeleteComments(string cmntid, Post p);
        Task<PostSendPage> SearchPosts(string locid, int page = 0, int sorttype = 1, int filterdate = 1);
        int DateEnumToDays(int filterdate);
    }
}