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/IFavoriteService.cs

34 lines
1.4 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Shared
{
public interface IFavoriteService<TQuote>
{
// Adds a quote to a user's list of favorites.
// 'quoteid' is the unique identifier of the quote to be added to favorites.
// 'userId' is the unique identifier of the user who is adding the quote to their favorites.
Task AddFavorite(int quoteid, int userId);
// Removes a quote from a user's list of favorites.
// 'quoteid' is the unique identifier of the quote to be removed from favorites.
// 'userId' is the unique identifier of the user who is removing the quote from their favorites.
Task RemoveFavorite(int quoteid, int userId);
// Removes all favorite quotes for a specific user.
// 'userId' is the unique identifier of the user whose favorites will be removed.
Task RemoveAllFavoriteForUser(int userId);
// Removes a specific quote from the favorite lists of all users.
// 'quoteId' is the unique identifier of the quote to be removed from all users' favorites.
Task RemoveAllFavoriteForQuote(int quoteId);
Task<PaginationResult<TQuote>> GetFavoriteByIdUser(int userId, int index, int count);
Task<TQuote> GetFavorite(int userId, int idQuote);
}
}