<?php
namespace App\Entity;
use App\Repository\GameRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Annotation\Ignore;
/**
* @ORM\Entity(repositoryClass=GameRepository::class)
*/
class Game
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups( {"atpprogram:list", "atpprogram:item"})
*/
private $id;
/**
* @ORM\Column(type="integer")
* @Groups( {"atpprogram:list", "atpprogram:item"})
*/
private $roundId;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups( {"atpprogram:list", "atpprogram:item"})
*/
private $isNightSession;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups( {"atpprogram:list", "atpprogram:item"})
*/
private $status;
/**
* @ORM\ManyToOne(targetEntity=Umpire::class, inversedBy="games")
* @Ignore()
*/
private $umpire;
/**
* @ORM\Column(type="string", length=255)
* @Groups( {"atpprogram:list", "atpprogram:item"})
*/
private $matchId;
/**
* @ORM\ManyToMany(targetEntity=MatchTeam::class, inversedBy="games")
*/
private $matchTeams;
/**
* @ORM\ManyToOne(targetEntity=ATPProgramCourt::class, inversedBy="games")
* @ORM\JoinColumn(nullable=false)
* @Ignore()
*/
private $court;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups( {"atpprogram:list", "atpprogram:item"})
*/
private $notBeforeISOTime;
public function __construct()
{
$this->matchTeams = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getRoundId(): ?int
{
return $this->roundId;
}
public function setRoundId(int $roundId): self
{
$this->roundId = $roundId;
return $this;
}
public function getIsNightSession(): ?bool
{
return $this->isNightSession;
}
public function setIsNightSession(?bool $isNightSession): self
{
$this->isNightSession = $isNightSession;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(?string $status): self
{
$this->status = $status;
return $this;
}
public function getUmpire(): ?Umpire
{
return $this->umpire;
}
public function setUmpire(?Umpire $umpire): self
{
$this->umpire = $umpire;
return $this;
}
public function getMatchId(): ?string
{
return $this->matchId;
}
public function setMatchId(string $matchId): self
{
$this->matchId = $matchId;
return $this;
}
/**
* @return Collection<int, MatchTeam>
*/
public function getMatchTeams(): Collection
{
return $this->matchTeams;
}
public function addMatchTeam(MatchTeam $matchTeam): self
{
if (!$this->matchTeams->contains($matchTeam)) {
$this->matchTeams[] = $matchTeam;
}
return $this;
}
public function removeMatchTeam(MatchTeam $matchTeam): self
{
$this->matchTeams->removeElement($matchTeam);
return $this;
}
public function getCourt(): ?ATPProgramCourt
{
return $this->court;
}
public function setCourt(?ATPProgramCourt $court): self
{
$this->court = $court;
return $this;
}
public function getNotBeforeISOTime(): ?string
{
return $this->notBeforeISOTime;
}
public function setNotBeforeISOTime(?string $notBeforeISOTime): self
{
$this->notBeforeISOTime = $notBeforeISOTime;
return $this;
}
}