feat(friend): add ViewerFriend + ViewerFriendApply + ViewerPlayedTogether entities
Lays the persistence foundation for the /friend/* API surface. Three new model classes with composite PKs / unique constraints / FK cascades registered on SVSimDbContext; 4/4 persistence tests pass on SQLite in-memory. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
17
SVSim.Database/Models/ViewerPlayedTogether.cs
Normal file
17
SVSim.Database/Models/ViewerPlayedTogether.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// One row per (owner, opponent) pair. Upserted on each new battle so the table
|
||||
/// holds at most one row per opponent. Per-viewer 50-row retention cap pruned
|
||||
/// by <c>IPlayedTogetherWriter.RecordAsync</c>.
|
||||
/// </summary>
|
||||
public class ViewerPlayedTogether
|
||||
{
|
||||
public long OwnerViewerId { get; set; }
|
||||
public long OpponentViewerId { get; set; }
|
||||
public DateTime PlayedAt { get; set; }
|
||||
public int PlayedMode { get; set; }
|
||||
public int BattleType { get; set; }
|
||||
public int DeckFormat { get; set; }
|
||||
public int TwoPickType { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user