checkpoint
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Gameboard.ShogiUI.Sockets.Repositories.CouchModels
|
||||
namespace Gameboard.ShogiUI.Sockets.Repositories.CouchModels
|
||||
{
|
||||
public class SessionDocument : CouchDocument
|
||||
public class SessionDocument : CouchDocument
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Player1Id { get; set; }
|
||||
public string? Player2Id { get; set; }
|
||||
public bool IsPrivate { get; set; }
|
||||
public IList<BoardStateDocument> History { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor and setters are for deserialization.
|
||||
@@ -18,17 +15,6 @@ namespace Gameboard.ShogiUI.Sockets.Repositories.CouchModels
|
||||
Name = string.Empty;
|
||||
Player1Id = string.Empty;
|
||||
Player2Id = string.Empty;
|
||||
History = new List<BoardStateDocument>(0);
|
||||
}
|
||||
|
||||
public SessionDocument(Models.Session session)
|
||||
: base(session.Name, WhichDocumentType.Session)
|
||||
{
|
||||
Name = session.Name;
|
||||
Player1Id = session.Player1.Id;
|
||||
Player2Id = session.Player2?.Id;
|
||||
IsPrivate = session.IsPrivate;
|
||||
History = new List<BoardStateDocument>(0);
|
||||
}
|
||||
|
||||
public SessionDocument(Models.SessionMetadata sessionMetaData)
|
||||
@@ -38,7 +24,6 @@ namespace Gameboard.ShogiUI.Sockets.Repositories.CouchModels
|
||||
Player1Id = sessionMetaData.Player1.Id;
|
||||
Player2Id = sessionMetaData.Player2?.Id;
|
||||
IsPrivate = sessionMetaData.IsPrivate;
|
||||
History = new List<BoardStateDocument>(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user