using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Shared { public interface ICommentService { // Retrieves a comment by its unique identifier (id). // 'id' is the unique identifier of the comment. Task GetCommentById(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> GetCommentByQuote(int quoteId, int index, int pageSize); // Retrieves all comments, with pagination support. // This returns a list of all comments. Task> GetAllComment(); // 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> GetCommentByUser(int userId, int index, int pageSize); // Adds a new commenT. // 'comment' is the comment object that will be added. Task AddComment(TComment comment); // Updates an existing comment identified by 'id'. // 'id' is the unique identifier of the comment, and 'comment' contains the updated comment data. Task UpdateComment(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 RemoveComment(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 DeleteCommentForQuote(int quoteId); // Deletes all comments made by a specific user. // 'userId' is the unique identifier of the user whose comments will be deleted. Task DeleteCommentForUser(int userId); // Retrieves the last comment ID. Task LastCommentId(); } }