first commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using Fitness_core_BE.Models;
|
||||
|
||||
namespace Fitness_core_BE.Interfaces
|
||||
{
|
||||
public interface IFeedRepository
|
||||
{
|
||||
Task<FeedPost> GetFeedPostByIdAsync(Guid creatorId, Guid postId);
|
||||
Task<List<FeedPost>> GetFeedListAsync(int skip, int take);
|
||||
Task<bool> IsLikedAsync(Guid postId, Guid userId);
|
||||
Task AddLikeAsync(Guid postId, Guid userId);
|
||||
Task RemoveLikeAsync(Guid postId, Guid userId);
|
||||
Task<object> CreateFeedAsync(FeedPost feedPost, CancellationToken ct = default);
|
||||
Task<int> GetLikeCountAsync(Guid postId);
|
||||
Task<List<FeedPost>> GetFeedByClientAsync(Guid clientId);
|
||||
Task<(Guid? ClientId, List<FeedPost> Posts)> GetFeedForCustomerAsync(
|
||||
Guid customerUserId,
|
||||
int skip,
|
||||
int take,
|
||||
CancellationToken ct = default);
|
||||
Task<object> DeletePostPostIdAsync(Guid creatorId, Guid postId);
|
||||
|
||||
// Resolves a feed poster's user id to the gym (Client) they own, then returns the ids of
|
||||
// all customers with an active subscription at that gym — used to fan out a push
|
||||
// notification to every member when the gym owner creates a post. Returns an empty list
|
||||
// for staff-authored posts or any poster who isn't a Client owner.
|
||||
Task<List<Guid>> GetActiveCustomerIdsByPosterUserIdAsync(Guid posterUserId, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user