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.
WF-PmAPI/WF_EF_Api/Shared/IComentaryService.cs

55 lines
2.2 KiB

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