Add games per week to season object and preferred day of week for team object

This commit is contained in:
Daniel Guzman
2024-07-14 11:47:21 +02:00
parent c72fd1dfc9
commit 3e6e4ea6e5
390 changed files with 402 additions and 13853 deletions
+10
View File
@@ -10,6 +10,7 @@ class TeamDto
{
public int $id;
public string $name;
public string $dayOfWeekForHomeGame;
public bool $active;
public array $seasonDtoList;
public array $playerDtoList;
@@ -37,6 +38,7 @@ class TeamDto
}
return [
'name' => $this->name ?? '',
'dayOfWeekForHomeGame' => $this->dayOfWeekForHomeGame ?? '',
'playerList' => $playerList,
'seasonList' => $seasonList,
'captainId' => $this->captainDto?->id,
@@ -54,6 +56,10 @@ class TeamDto
{
$this->name = $dataList['name'];
}
if (!empty($dataList['dayOfWeekForHomeGame']))
{
$this->dayOfWeekForHomeGame = $dataList['dayOfWeekForHomeGame'];
}
if (isset($dataList['active']))
{
$this->active = $dataList['active'];
@@ -98,6 +104,10 @@ class TeamDto
{
$this->name = $teamEntity->getName();
}
if ($teamEntity->getDayOfWeekForHomeGame())
{
$this->dayOfWeekForHomeGame = $teamEntity->getDayOfWeekForHomeGame();
}
if ($teamEntity->getPlayers())
{
foreach ($teamEntity->getPlayers() as $playerEntity)