Files
SVSimServer/SVSim.Database/Entities/Guild/GuildInvite.cs
gamer147 1b7fa2d525 feat(guild): invite state machine
Add surrogate PK (IDENTITY bigint) to GuildInvite for wire invite_id.
Implement InviteAsync, CancelInviteAsync, RejectInviteAsync,
ListOutgoingInvitesAsync, ListInvitedGuildsAsync in GuildService.
Wire 5 endpoints: invite_user_list, invited_guild_list, invite,
cancel_invite, reject_invite in GuildController.
Migration: AddGuildInviteSurrogatePk — drops composite PK, adds Id
IDENTITY column, adds unique index on (GuildId, InviteeViewerId).
6 integration tests in GuildInviteFlowTests all green.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 13:21:57 -04:00

19 lines
619 B
C#

namespace SVSim.Database.Entities.Guild;
public class GuildInvite
{
/// <summary>
/// Auto-increment surrogate PK. Used as the wire <c>invite_id</c> returned to the client
/// and echoed back in cancel_invite / reject_invite requests.
/// </summary>
public long Id { get; set; }
public int GuildId { get; set; }
public long InviteeViewerId { get; set; }
public long InviterViewerId { get; set; }
public GuildInviteStatus Status { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? RespondedAt { get; set; }
public Guild Guild { get; set; } = null!;
}