BCards/src/BCards.Web/Repositories/IUserPageRepository.cs
Ricardo Carneiro 3d2ce1f8cf
All checks were successful
BCards Deployment Pipeline / Run Tests (push) Successful in 4s
BCards Deployment Pipeline / PR Validation (push) Has been skipped
BCards Deployment Pipeline / Build and Push Image (push) Successful in 15m22s
BCards Deployment Pipeline / Deploy to Production (ARM - OCI) (push) Successful in 1m54s
BCards Deployment Pipeline / Deploy to Test (x86 - Local) (push) Has been skipped
BCards Deployment Pipeline / Cleanup Old Resources (push) Has been skipped
BCards Deployment Pipeline / Deployment Summary (push) Successful in 0s
fix: Increase session timeout to 7 days and set SameSite=None for Cloudflare compatibility
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-18 12:32:42 -03:00

31 lines
1.5 KiB
C#

using BCards.Web.Models;
using MongoDB.Driver;
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);
Task<List<UserPage>> GetManyAsync(
FilterDefinition<UserPage> filter,
SortDefinition<UserPage>? sort = null,
int skip = 0,
int take = 20);
Task<List<UserPage>> GetPendingModerationAsync(int skip = 0, int take = 20);
Task<long> CountAsync(FilterDefinition<UserPage> filter);
Task<UpdateResult> UpdateAsync(string id, UpdateDefinition<UserPage> update);
Task<UpdateResult> UpdateManyAsync(FilterDefinition<UserPage> filter, UpdateDefinition<UserPage> update);
Task<bool> ApprovePageAsync(string pageId);
Task<bool> RejectPageAsync(string pageId, string reason, List<string> issues);
}