You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
namespace ooya.ga_api;
|
|
|
|
|
|
|
|
|
|
public class Game
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Текущая дата и время
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required]
|
|
|
|
|
public DateTime Date { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Идентификатор игры
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required]
|
|
|
|
|
public string Guid { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Количество очков
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required]
|
|
|
|
|
public int Score { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ведьмы раунда
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Required]
|
|
|
|
|
public IEnumerable<Witch> Witches { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Конструктор
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="score">первоначальное количество очков</param>
|
|
|
|
|
public Game(int score = 0)
|
|
|
|
|
{
|
|
|
|
|
Guid = (System.Guid.NewGuid()).ToString("N");
|
|
|
|
|
Date = DateTime.Now;
|
|
|
|
|
Score = score;
|
|
|
|
|
Witches = new List<Witch>();
|
|
|
|
|
}
|
|
|
|
|
}
|