feat(shared): extend CreateSessionCommand with showcase metadata
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
using GmRelay.Shared.Domain;
|
||||||
using GmRelay.Shared.Platform;
|
using GmRelay.Shared.Platform;
|
||||||
|
|
||||||
namespace GmRelay.Shared.Features.Sessions.CreateSession;
|
namespace GmRelay.Shared.Features.Sessions.CreateSession;
|
||||||
@@ -9,4 +10,9 @@ public sealed record CreateSessionCommand(
|
|||||||
string Link,
|
string Link,
|
||||||
IReadOnlyList<DateTimeOffset> ScheduledTimes,
|
IReadOnlyList<DateTimeOffset> ScheduledTimes,
|
||||||
int? MaxPlayers,
|
int? MaxPlayers,
|
||||||
string? ImageReference);
|
string? ImageReference,
|
||||||
|
GameSystem? System = null,
|
||||||
|
string? Description = null,
|
||||||
|
string? Format = null,
|
||||||
|
int? DurationMinutes = null,
|
||||||
|
bool IsOneShot = false);
|
||||||
|
|||||||
@@ -117,8 +117,8 @@ public sealed class CreateSessionHandler(
|
|||||||
{
|
{
|
||||||
var sessionId = await connection.ExecuteScalarAsync<Guid>(
|
var sessionId = await connection.ExecuteScalarAsync<Guid>(
|
||||||
"""
|
"""
|
||||||
INSERT INTO sessions (batch_id, group_id, title, join_link, scheduled_at, status, max_players)
|
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)
|
VALUES (@BatchId, @GroupId, @Title, @Link, @ScheduledAt, @Status, @MaxPlayers, @System, @Description, @Format, @DurationMinutes, @IsOneShot)
|
||||||
RETURNING id;
|
RETURNING id;
|
||||||
""",
|
""",
|
||||||
new
|
new
|
||||||
@@ -129,7 +129,12 @@ public sealed class CreateSessionHandler(
|
|||||||
Link = command.Link,
|
Link = command.Link,
|
||||||
ScheduledAt = scheduledAt,
|
ScheduledAt = scheduledAt,
|
||||||
Status = SessionStatus.Planned,
|
Status = SessionStatus.Planned,
|
||||||
MaxPlayers = command.MaxPlayers
|
MaxPlayers = command.MaxPlayers,
|
||||||
|
System = command.System,
|
||||||
|
command.Description,
|
||||||
|
command.Format,
|
||||||
|
DurationMinutes = command.DurationMinutes,
|
||||||
|
IsOneShot = command.IsOneShot
|
||||||
},
|
},
|
||||||
transaction);
|
transaction);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user