create, read, playercount
This commit is contained in:
@@ -5,6 +5,5 @@ namespace Shogi.Contracts.Api;
|
||||
public class CreateSessionCommand
|
||||
{
|
||||
[Required]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public bool IsPrivate { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
|
||||
namespace Shogi.Contracts.Api;
|
||||
|
||||
public class ReadAllSessionsResponse
|
||||
public class ReadSessionsPlayerCountResponse
|
||||
{
|
||||
public IList<SessionMetadata> PlayerHasJoinedSessions { get; set; }
|
||||
public IList<SessionMetadata> AllOtherSessions { get; set; }
|
||||
|
||||
11
Shogi.Contracts/ShogiApiJsonSerializerSettings.cs
Normal file
11
Shogi.Contracts/ShogiApiJsonSerializerSettings.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Shogi.Contracts;
|
||||
|
||||
public class ShogiApiJsonSerializerSettings
|
||||
{
|
||||
public readonly static JsonSerializerOptions SystemTextJsonSerializerOptions = new(JsonSerializerDefaults.Web)
|
||||
{
|
||||
WriteIndented = true,
|
||||
};
|
||||
}
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
public class Session
|
||||
{
|
||||
public string Player1 { get; set; } = string.Empty;
|
||||
public string Player1 { get; set; }
|
||||
public string? Player2 { get; set; }
|
||||
public string SessionName { get; set; } = string.Empty;
|
||||
public bool GameOver { get; set; }
|
||||
public string SessionName { get; set; }
|
||||
public BoardState BoardState { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user