diff --git a/src/GmRelay.Shared/Features/Sessions/CreateSession/CreateSessionCommand.cs b/src/GmRelay.Shared/Features/Sessions/CreateSession/CreateSessionCommand.cs index 3f63c5e..d92f51f 100644 --- a/src/GmRelay.Shared/Features/Sessions/CreateSession/CreateSessionCommand.cs +++ b/src/GmRelay.Shared/Features/Sessions/CreateSession/CreateSessionCommand.cs @@ -1,3 +1,4 @@ +using GmRelay.Shared.Domain; using GmRelay.Shared.Platform; namespace GmRelay.Shared.Features.Sessions.CreateSession; @@ -9,4 +10,9 @@ public sealed record CreateSessionCommand( string Link, IReadOnlyList ScheduledTimes, int? MaxPlayers, - string? ImageReference); + string? ImageReference, + GameSystem? System = null, + string? Description = null, + string? Format = null, + int? DurationMinutes = null, + bool IsOneShot = false); diff --git a/src/GmRelay.Shared/Features/Sessions/CreateSession/CreateSessionHandler.cs b/src/GmRelay.Shared/Features/Sessions/CreateSession/CreateSessionHandler.cs index 4c96744..4f5d9b8 100644 --- a/src/GmRelay.Shared/Features/Sessions/CreateSession/CreateSessionHandler.cs +++ b/src/GmRelay.Shared/Features/Sessions/CreateSession/CreateSessionHandler.cs @@ -117,8 +117,8 @@ public sealed class CreateSessionHandler( { var sessionId = await connection.ExecuteScalarAsync( """ - INSERT INTO sessions (batch_id, group_id, title, join_link, scheduled_at, status, max_players) - VALUES (@BatchId, @GroupId, @Title, @Link, @ScheduledAt, @Status, @MaxPlayers) + INSERT INTO sessions (batch_id, group_id, title, join_link, scheduled_at, status, max_players, system, description, format, duration_minutes, is_one_shot) + VALUES (@BatchId, @GroupId, @Title, @Link, @ScheduledAt, @Status, @MaxPlayers, @System, @Description, @Format, @DurationMinutes, @IsOneShot) RETURNING id; """, new @@ -129,7 +129,12 @@ public sealed class CreateSessionHandler( Link = command.Link, ScheduledAt = scheduledAt, Status = SessionStatus.Planned, - MaxPlayers = command.MaxPlayers + MaxPlayers = command.MaxPlayers, + System = command.System, + command.Description, + command.Format, + DurationMinutes = command.DurationMinutes, + IsOneShot = command.IsOneShot }, transaction);