You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
2.3 KiB
55 lines
2.3 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Shared
|
|
{
|
|
public interface ICommentaryService<TComment>
|
|
{
|
|
// Retrieves a comment by its unique identifier (id).
|
|
// 'id' is the unique identifier of the comment.
|
|
Task<TComment> GetCommentaryById(int id);
|
|
|
|
// Retrieves comments related to a specific quote, with pagination.
|
|
// 'quoteId' is the unique identifier of the quote.
|
|
// 'index' is the page number (for pagination).
|
|
// 'pageSize' is the number of comments per page.
|
|
Task<PaginationResult<TComment>> GetCommentaryByQuote(int quoteId, int index, int pageSize);
|
|
|
|
// Retrieves all comments, with pagination support.
|
|
// This returns a list of all comments.
|
|
Task<PaginationResult<TComment>> GetAllCommentary();
|
|
|
|
// Retrieves comments made by a specific user, with pagination.
|
|
// 'userId' is the unique identifier of the user.
|
|
// 'index' is the page number (for pagination).
|
|
// 'pageSize' is the number of comments per page.
|
|
Task<PaginationResult<TComment>> GetCommentaryByUser(int userId, int index, int pageSize);
|
|
|
|
// Adds a new commenT.
|
|
// 'comment' is the comment object that will be added.
|
|
Task AddComment(TComment commentary, int idQuote);
|
|
|
|
// Updates an existing comment identified by 'id'.
|
|
// 'id' is the unique identifier of the comment, and 'comment' contains the updated comment data.
|
|
Task UpdateCommentary(int id, TComment comment);
|
|
|
|
// Removes a comment based on its unique identifier ('id').
|
|
// 'id' is the unique identifier of the comment to be removed.
|
|
Task RemoveCommentary(int id);
|
|
|
|
// Deletes all comments related to a specific quote.
|
|
// 'quoteId' is the unique identifier of the quote for which comments will be deleted.
|
|
Task DeleteCommentaryForQuote(int quoteId);
|
|
|
|
// Deletes all comments made by a specific user.
|
|
// 'userId' is the unique identifier of the user whose comments will be deleted.
|
|
Task DeleteCommentaryForUser(int userId);
|
|
|
|
// Retrieves the last comment ID.
|
|
Task<int> LastCommentaryId();
|
|
}
|
|
}
|