19 lines
805 B
C#
19 lines
805 B
C#
using BCards.Web.Models;
|
|
|
|
namespace BCards.Web.Repositories;
|
|
|
|
public interface IUserPageRepository
|
|
{
|
|
Task<UserPage?> GetByIdAsync(string id);
|
|
Task<UserPage?> GetBySlugAsync(string category, string slug);
|
|
Task<UserPage?> GetByUserIdAsync(string userId);
|
|
Task<List<UserPage>> GetByUserIdAllAsync(string userId);
|
|
Task<List<UserPage>> GetActivePagesAsync();
|
|
Task<UserPage> CreateAsync(UserPage userPage);
|
|
Task<UserPage> UpdateAsync(UserPage userPage);
|
|
Task DeleteAsync(string id);
|
|
Task<bool> SlugExistsAsync(string category, string slug, string? excludeId = null);
|
|
Task<List<UserPage>> GetRecentPagesAsync(int limit = 10);
|
|
Task<List<UserPage>> GetByCategoryAsync(string category, int limit = 20);
|
|
Task UpdateAnalyticsAsync(string id, PageAnalytics analytics);
|
|
} |