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>
This commit is contained in:
@@ -23,8 +23,8 @@ public interface IGuildService
|
||||
Task<GuildOpResult> BreakupAsync(long viewerId, CancellationToken ct = default);
|
||||
|
||||
Task<GuildOpResult> InviteAsync(long callerViewerId, long targetViewerId, CancellationToken ct = default);
|
||||
Task<GuildOpResult> CancelInviteAsync(long callerViewerId, long targetViewerId, CancellationToken ct = default);
|
||||
Task<GuildOpResult> RejectInviteAsync(long callerViewerId, int guildId, CancellationToken ct = default);
|
||||
Task<GuildOpResult> CancelInviteAsync(long callerViewerId, long inviteId, CancellationToken ct = default);
|
||||
Task<GuildOpResult> RejectInviteAsync(long callerViewerId, long inviteId, CancellationToken ct = default);
|
||||
|
||||
Task<GuildOpResult> JoinAsync(long viewerId, int guildId, CancellationToken ct = default);
|
||||
Task<GuildOpResult> CancelJoinRequestAsync(long viewerId, int guildId, CancellationToken ct = default);
|
||||
@@ -36,5 +36,7 @@ public interface IGuildService
|
||||
Task<GuildOpResult> ChangeRoleAsync(long callerViewerId, long targetViewerId, int newRoleId, CancellationToken ct = default);
|
||||
|
||||
Task<IReadOnlyList<Entities.Guild.GuildInvite>> ListPendingInvitesForMeAsync(long viewerId, CancellationToken ct = default);
|
||||
Task<IReadOnlyList<GuildOutgoingInviteEntry>> ListOutgoingInvitesAsync(long callerViewerId, CancellationToken ct = default);
|
||||
Task<IReadOnlyList<GuildReceivedInviteEntry>> ListInvitedGuildsAsync(long viewerId, CancellationToken ct = default);
|
||||
Task<IReadOnlyList<Entities.Guild.GuildJoinRequest>> ListPendingJoinRequestsForMyGuildAsync(long viewerId, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user