using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Shared { public interface ICommentaryService { // Retrieves a comment by its unique identifier (id). // 'id' is the unique identifier of the comment. Task 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> GetCommentaryByQuote(int quoteId, int index, int pageSize); // Retrieves all comments, with pagination support. // This returns a list of all comments. Task> 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> 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 LastCommentaryId(); } }