37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
namespace LocationsApi.Models;
|
|
|
|
public class TrainUnitRequest
|
|
{
|
|
public string UnitType { get; set; } = "Scout";
|
|
}
|
|
|
|
public class UnitTrainingResponse
|
|
{
|
|
public string Id { get; set; } = "";
|
|
public string Username { get; set; } = "";
|
|
public string UnitType { get; set; } = "";
|
|
public int GoldCost { get; set; }
|
|
public string Status { get; set; } = "";
|
|
public DateTime StartedAtUtc { get; set; }
|
|
public DateTime CompletesAtUtc { get; set; }
|
|
public DateTime? CompletedAtUtc { get; set; }
|
|
|
|
public static UnitTrainingResponse FromTraining(UnitTraining training) => new()
|
|
{
|
|
Id = training.Id,
|
|
Username = training.Username,
|
|
UnitType = training.UnitType,
|
|
GoldCost = training.GoldCost,
|
|
Status = training.Status,
|
|
StartedAtUtc = training.StartedAtUtc,
|
|
CompletesAtUtc = training.CompletesAtUtc,
|
|
CompletedAtUtc = training.CompletedAtUtc
|
|
};
|
|
}
|
|
|
|
public class PlayerUnitsResponse
|
|
{
|
|
public int CompletedScouts { get; set; }
|
|
public List<UnitTrainingResponse> Training { get; set; } = [];
|
|
}
|