feat(guild): service skeletons + DI

This commit is contained in:
gamer147
2026-06-27 11:25:55 -04:00
parent 45947053c8
commit a1aa6998b8
6 changed files with 252 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
namespace SVSim.Database.Services.Guild;
public sealed record ChatWindow(IReadOnlyList<Entities.Guild.GuildChatMessage> Messages, int WaitIntervalSeconds);
public sealed record ChatPostResult(bool Ok, int? AssignedMessageId);
public interface IGuildChatService
{
Task<ChatWindow> GetWindowAsync(long viewerId, int startMessageId, int direction, int waitIntervalHint, CancellationToken ct = default);
Task<ChatPostResult> PostTextOrStampAsync(long viewerId, int type, string message, CancellationToken ct = default);
Task<ChatPostResult> PostDeckAsync(long viewerId, string deckPayloadJson, CancellationToken ct = default);
Task<bool> DeleteDeckAsync(long viewerId, int messageId, CancellationToken ct = default);
Task<ChatPostResult> PostReplayAsync(long viewerId, string replayPayloadJson, CancellationToken ct = default);
Task<string?> GetReplayDetailAsync(long viewerId, int messageId, CancellationToken ct = default);
Task<string?> GetDeckLogAsync(long viewerId, int messageId, CancellationToken ct = default);
/// <summary>Emit a system-event row. Called by IGuildService at create/join/leave/remove/role-change/description-change.</summary>
Task EmitSystemEventAsync(int guildId, long actorViewerId, Entities.Guild.GuildChatMessageType type, string? body = null, CancellationToken ct = default);
}