diff --git a/src/GmRelay.Shared/Features/Sessions/CreateSession/Wizard/WizardPayload.cs b/src/GmRelay.Shared/Features/Sessions/CreateSession/Wizard/WizardPayload.cs new file mode 100644 index 0000000..6ecc43e --- /dev/null +++ b/src/GmRelay.Shared/Features/Sessions/CreateSession/Wizard/WizardPayload.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +namespace GmRelay.Shared.Features.Sessions.CreateSession.Wizard; + +public enum WizardCreationType { Single, Pool } + +public enum WizardVisibility { Public, Club, Members } + +public sealed class WizardSlotInput +{ + public DateTimeOffset ScheduledAt { get; set; } + public int MaxPlayers { get; set; } + public bool Waitlist { get; set; } +} + +public sealed class WizardSingleInput +{ + public DateTimeOffset? ScheduledAt { get; set; } + public int? MaxPlayers { get; set; } +} + +public sealed class WizardPayload +{ + public WizardCreationType? Type { get; set; } + public string? Title { get; set; } + public string? Description { get; set; } + public string? ImageFileId { get; set; } + public string? ImageUrl { get; set; } + public string? System { get; set; } + public int? DurationMinutes { get; set; } + public WizardVisibility? Visibility { get; set; } + public Guid? ClubId { get; set; } + public bool? PublishInShowcase { get; set; } + public bool? Waitlist { get; set; } + public WizardSingleInput? Single { get; set; } + public WizardPoolInput? Pool { get; set; } +} + +public sealed class WizardPoolInput +{ + public List Slots { get; set; } = new(); +} + +[JsonSerializable(typeof(WizardPayload))] +[JsonSerializable(typeof(WizardSingleInput))] +[JsonSerializable(typeof(WizardPoolInput))] +[JsonSerializable(typeof(WizardSlotInput))] +[JsonSourceGenerationOptions( + WriteIndented = false, + PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase, + DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] +public partial class WizardPayloadJsonContext : JsonSerializerContext +{ +}