<?php
namespace App\Entity;
use App\Repository\RoundResultRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=RoundResultRepository::class)
*/
class RoundResult
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $matchCode;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"round:list", "round:item","event:list","event:item"})
*
*/
private $isDoubles;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"round:list", "round:item","event:list","event:item"})
*
*/
private $drawLineTop;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $drawLineBottom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $scoringType;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $numSets;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $courtSequence;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $day;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $winner;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $resultString;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $resultReason;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $resultType;
/**
* @ORM\ManyToOne(targetEntity=Umpire::class, inversedBy="aTPMatchResults")
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $umpire;
/**
* @ORM\Column(type="string", nullable=true)
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $matchTime;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $numberOfSets;
/**
* @ORM\OneToOne(targetEntity=RoundResultTeam::class)
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $teamTop;
/**
* @ORM\OneToOne(targetEntity=RoundResultTeam::class)
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $teamBottom;
/**
* @ORM\OneToMany(targetEntity=SetResult::class, mappedBy="roundResult")
* @Groups({"round:list", "round:item","event:list","event:item"})
*/
private $setResults;
public function __construct()
{
$this->setResults = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getMatchCode(): ?string
{
return $this->matchCode;
}
public function setMatchCode(?string $matchCode): self
{
$this->matchCode = $matchCode;
return $this;
}
public function getUmpire(): ?Umpire
{
return $this->umpire;
}
public function setUmpire(?Umpire $umpire): self
{
$this->umpire = $umpire;
return $this;
}
public function getMatchTime()
{
return $this->matchTime;
}
public function setMatchTime($matchTime): self
{
$this->matchTime = $matchTime;
return $this;
}
public function getNumberOfSets(): ?int
{
return $this->numberOfSets;
}
public function setNumberOfSets(?int $numberOfSets): self
{
$this->numberOfSets = $numberOfSets;
return $this;
}
/**
* @return Collection<int, SetResult>
*/
public function getSetResults(): Collection
{
return $this->setResults;
}
public function addSetResult(SetResult $setResult): self
{
if (!$this->setResults->contains($setResult)) {
$this->setResults[] = $setResult;
$setResult->setRoundResult($this);
}
return $this;
}
public function removeSetResult(SetResult $setResult): self
{
if ($this->setResults->removeElement($setResult)) {
// set the owning side to null (unless already changed)
if ($setResult->getRoundResult() === $this) {
$setResult->setRoundResult(null);
}
}
return $this;
}
/**
* @return mixed
*/
public function getIsDoubles()
{
return $this->isDoubles;
}
/**
* @param mixed $isDoubles
*/
public function setIsDoubles($isDoubles): void
{
$this->isDoubles = $isDoubles;
}
/**
* @return mixed
*/
public function getDrawLineTop()
{
return $this->drawLineTop;
}
/**
* @param mixed $drawLineTop
*/
public function setDrawLineTop($drawLineTop): void
{
$this->drawLineTop = $drawLineTop;
}
/**
* @return mixed
*/
public function getDrawLineBottom()
{
return $this->drawLineBottom;
}
/**
* @param mixed $drawLineBottom
*/
public function setDrawLineBottom($drawLineBottom): void
{
$this->drawLineBottom = $drawLineBottom;
}
/**
* @return mixed
*/
public function getScoringType()
{
return $this->scoringType;
}
/**
* @param mixed $scoringType
*/
public function setScoringType($scoringType): void
{
$this->scoringType = $scoringType;
}
/**
* @return mixed
*/
public function getNumSets()
{
return $this->numSets;
}
/**
* @param mixed $numSets
*/
public function setNumSets($numSets): void
{
$this->numSets = $numSets;
}
/**
* @return mixed
*/
public function getCourtSequence()
{
return $this->courtSequence;
}
/**
* @param mixed $courtSequence
*/
public function setCourtSequence($courtSequence): void
{
$this->courtSequence = $courtSequence;
}
/**
* @return mixed
*/
public function getDay()
{
return $this->day;
}
/**
* @param mixed $day
*/
public function setDay($day): void
{
$this->day = $day;
}
/**
* @return mixed
*/
public function getWinner()
{
return $this->winner;
}
/**
* @param mixed $winner
*/
public function setWinner($winner): void
{
$this->winner = $winner;
}
/**
* @return mixed
*/
public function getResultString()
{
return $this->resultString;
}
/**
* @param mixed $resultString
*/
public function setResultString($resultString): void
{
$this->resultString = $resultString;
}
/**
* @return mixed
*/
public function getResultReason()
{
return $this->resultReason;
}
/**
* @param mixed $resultReason
*/
public function setResultReason($resultReason): void
{
$this->resultReason = $resultReason;
}
/**
* @return mixed
*/
public function getResultType()
{
return $this->resultType;
}
/**
* @param mixed $resultType
*/
public function setResultType($resultType): void
{
$this->resultType = $resultType;
}
/**
* @return mixed
*/
public function getTeamTop()
{
return $this->teamTop;
}
/**
* @param mixed $teamTop
*/
public function setTeamTop($teamTop): void
{
$this->teamTop = $teamTop;
}
/**
* @return mixed
*/
public function getTeamBottom()
{
return $this->teamBottom;
}
/**
* @param mixed $teamBottom
*/
public function setTeamBottom($teamBottom): void
{
$this->teamBottom = $teamBottom;
}
}