before deleting Rules

This commit is contained in:
2021-05-08 10:26:04 -05:00
parent 05a9c71499
commit f8f779e84c
80 changed files with 1109 additions and 832 deletions

View File

@@ -0,0 +1,30 @@
namespace Gameboard.ShogiUI.Sockets.Repositories.CouchModels
{
public class Session : CouchDocument
{
public string Name { get; set; }
public string Player1 { get; set; }
public string? Player2 { get; set; }
public bool IsPrivate { get; set; }
/// <summary>
/// Default constructor and setters are for deserialization.
/// </summary>
public Session() : base()
{
Name = string.Empty;
Player1 = string.Empty;
Player2 = string.Empty;
}
public Session(string id, Models.Session session) : base(id, nameof(Session))
{
Name = session.Name;
Player1 = session.Player1;
Player2 = session.Player2;
IsPrivate = session.IsPrivate;
}
public Models.Session ToDomainModel() => new(Name, IsPrivate, Player1, Player2);
}
}