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:
13
SVSim.Database/Models/ViewerFriend.cs
Normal file
13
SVSim.Database/Models/ViewerFriend.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user