Add games per week to season object and preferred day of week for team object
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user