Files
SVSimServer/SVSim.Database/Models/ViewerFriend.cs
gamer147 1813217c16 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>
2026-06-09 21:40:08 -04:00

14 lines
464 B
C#

namespace SVSim.Database.Models;
/// <summary>
/// One row per direction of a friendship. Approving an apply creates two rows
/// (A → B and B → A). <see cref="FriendViewerId"/> from a played-together row
/// can be self-joined against this table to detect an existing friendship.
/// </summary>
public class ViewerFriend
{
public long OwnerViewerId { get; set; }
public long FriendViewerId { get; set; }
public DateTime CreatedAt { get; set; }
}