src/Entity/Game.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\GameRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. use Symfony\Component\Serializer\Annotation\Ignore;
  9. /**
  10.  * @ORM\Entity(repositoryClass=GameRepository::class)
  11.  */
  12. class Game
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      * @Groups( {"atpprogram:list", "atpprogram:item"})
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(type="integer")
  23.      * @Groups( {"atpprogram:list", "atpprogram:item"})
  24.      */
  25.     private $roundId;
  26.     /**
  27.      * @ORM\Column(type="boolean", nullable=true)
  28.      * @Groups( {"atpprogram:list", "atpprogram:item"})
  29.      */
  30.     private $isNightSession;
  31.     /**
  32.      * @ORM\Column(type="string", length=255, nullable=true)
  33.      * @Groups( {"atpprogram:list", "atpprogram:item"})
  34.      */
  35.     private $status;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity=Umpire::class, inversedBy="games")
  38.      * @Ignore()
  39.      */
  40.     private $umpire;
  41.     /**
  42.      * @ORM\Column(type="string", length=255)
  43.      * @Groups( {"atpprogram:list", "atpprogram:item"})
  44.      */
  45.     private $matchId;
  46.     /**
  47.      * @ORM\ManyToMany(targetEntity=MatchTeam::class, inversedBy="games")
  48.      */
  49.     private $matchTeams;
  50.     /**
  51.      * @ORM\ManyToOne(targetEntity=ATPProgramCourt::class, inversedBy="games")
  52.      * @ORM\JoinColumn(nullable=false)
  53.      * @Ignore()
  54.      */
  55.     private $court;
  56.     /**
  57.      * @ORM\Column(type="string", length=255, nullable=true)
  58.      * @Groups( {"atpprogram:list", "atpprogram:item"})
  59.      */
  60.     private $notBeforeISOTime;
  61.     public function __construct()
  62.     {
  63.         $this->matchTeams = new ArrayCollection();
  64.     }
  65.     public function getId(): ?int
  66.     {
  67.         return $this->id;
  68.     }
  69.     public function getRoundId(): ?int
  70.     {
  71.         return $this->roundId;
  72.     }
  73.     public function setRoundId(int $roundId): self
  74.     {
  75.         $this->roundId $roundId;
  76.         return $this;
  77.     }
  78.     public function getIsNightSession(): ?bool
  79.     {
  80.         return $this->isNightSession;
  81.     }
  82.     public function setIsNightSession(?bool $isNightSession): self
  83.     {
  84.         $this->isNightSession $isNightSession;
  85.         return $this;
  86.     }
  87.     public function getStatus(): ?string
  88.     {
  89.         return $this->status;
  90.     }
  91.     public function setStatus(?string $status): self
  92.     {
  93.         $this->status $status;
  94.         return $this;
  95.     }
  96.     public function getUmpire(): ?Umpire
  97.     {
  98.         return $this->umpire;
  99.     }
  100.     public function setUmpire(?Umpire $umpire): self
  101.     {
  102.         $this->umpire $umpire;
  103.         return $this;
  104.     }
  105.     public function getMatchId(): ?string
  106.     {
  107.         return $this->matchId;
  108.     }
  109.     public function setMatchId(string $matchId): self
  110.     {
  111.         $this->matchId $matchId;
  112.         return $this;
  113.     }
  114.     /**
  115.      * @return Collection<int, MatchTeam>
  116.      */
  117.     public function getMatchTeams(): Collection
  118.     {
  119.         return $this->matchTeams;
  120.     }
  121.     public function addMatchTeam(MatchTeam $matchTeam): self
  122.     {
  123.         if (!$this->matchTeams->contains($matchTeam)) {
  124.             $this->matchTeams[] = $matchTeam;
  125.         }
  126.         return $this;
  127.     }
  128.     public function removeMatchTeam(MatchTeam $matchTeam): self
  129.     {
  130.         $this->matchTeams->removeElement($matchTeam);
  131.         return $this;
  132.     }
  133.     public function getCourt(): ?ATPProgramCourt
  134.     {
  135.         return $this->court;
  136.     }
  137.     public function setCourt(?ATPProgramCourt $court): self
  138.     {
  139.         $this->court $court;
  140.         return $this;
  141.     }
  142.     public function getNotBeforeISOTime(): ?string
  143.     {
  144.         return $this->notBeforeISOTime;
  145.     }
  146.     public function setNotBeforeISOTime(?string $notBeforeISOTime): self
  147.     {
  148.         $this->notBeforeISOTime $notBeforeISOTime;
  149.         return $this;
  150.     }
  151. }