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/ViewerFriendApply.cs
Normal file
17
SVSim.Database/Models/ViewerFriendApply.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// One pending friend application. <see cref="Id"/> is the wire <c>apply_id</c>
|
||||
/// (auto-generated). Unique on <c>(FromViewerId, ToViewerId)</c> — a viewer can only
|
||||
/// have one outstanding apply to any given target.
|
||||
/// </summary>
|
||||
public class ViewerFriendApply
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public long FromViewerId { get; set; }
|
||||
public long ToViewerId { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
/// <summary>Beginner-friend campaign tag. Defaults to 0 (no campaign). Surfaces as optional <c>mission_type</c> on the wire.</summary>
|
||||
public int MissionType { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user