This commit is contained in:
gamer147
2026-05-25 12:03:47 -04:00
parent d067f8a64a
commit 558e8288eb
44 changed files with 6512 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
namespace SVSim.Database.Repositories.Viewer;
public interface IPuzzleClearRepository
{
/// <summary>Returns the set of puzzle_ids this viewer has cleared.</summary>
Task<HashSet<int>> GetClearedPuzzleIds(long viewerId);
/// <summary>Returns cleared puzzle_ids grouped by their PuzzleEntry.GroupId. Only groups
/// with at least one clear appear in the dictionary.</summary>
Task<Dictionary<int, HashSet<int>>> GetClearedPuzzleIdsByGroup(long viewerId);
/// <summary>Inserts or updates the (viewer, puzzle) clear row. BestRetryCount keeps the
/// minimum retry_count across all wins.</summary>
Task UpsertClearAsync(long viewerId, int puzzleId, int retryCount);
}