feat(guild): join / cancel_join_request / join_request_list

Implements three join-path state machine endpoints:
- /guild/join: FREE (instant), APPROVAL (pending row + idempotent re-apply),
  ONLY_INVITE (pending invite required); CommitJoin consumes invites + cancels
  join requests; MaxMemberNum cap enforced.
- /guild/cancel_join_request: cancels all pending requests for caller (no
  request_id on wire per GuildJoinRequestCancelTask decompile, composite PK kept).
- /guild/join_request_list: leader/subleader sees pending applicants with
  viewer profile (name/emblem/degree/request_time unix secs).

IGuildService.CancelJoinRequestAsync signature changed from (viewerId, guildId)
to (viewerId) since the client sends no guildId. GuildJoinRequestEntry enriched
record added to GuildServiceTypes. Re-apply after cancel resets existing row
in-place to avoid composite-PK conflict. 11 integration tests, all green.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-27 13:44:04 -04:00
parent 11a129ea90
commit d7f9ba8f2a
6 changed files with 619 additions and 14 deletions

View File

@@ -198,7 +198,8 @@ namespace SVSim.Database.Migrations
b.HasKey("Id");
b.HasIndex("GuildId", "InviteeViewerId")
.IsUnique();
.IsUnique()
.HasFilter("\"Status\" = 0");
b.HasIndex("InviteeViewerId", "Status");