feat(friend): IFriendService + IPlayedTogetherWriter + DTO records

Task 3: service contract (interface + DTOs) and FriendService skeleton.
All methods throw NotImplementedException; Tasks 4-6 fill in the logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-09 21:44:51 -04:00
parent f40ecb8ca7
commit 300eee36e9
4 changed files with 194 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
namespace SVSim.Database.Services.Friend;
/// <summary>
/// Records a recent-opponent entry on the owner viewer. Upserts the (owner, opponent)
/// row to PlayedAt = now, enforces a 50-row per-viewer retention cap by deleting the
/// owner's oldest row when at cap. No-op if owner equals opponent.
/// </summary>
public interface IPlayedTogetherWriter
{
Task RecordAsync(long ownerViewerId, long opponentViewerId, BattleParticipationContext ctx, CancellationToken ct);
}