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>
14 lines
464 B
C#
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; }
|
|
}
|