src/Entity/ATPProgram.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ATPProgramRepository;
  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=ATPProgramRepository::class)
  11.  */
  12. class ATPProgram
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      * @Groups("atpprogram:list", "atpprogram:item", "atpprogram:list", "atpprogram:item")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(type="integer", nullable=true)
  23.      * @Groups("atpprogram:list", "atpprogram:item", "atpprogram:list", "atpprogram:item")
  24.      */
  25.     private $seq;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      * @Groups("atp_program:list", "atp_program:item", "atpprogram:list", "atpprogram:item")
  29.      */
  30.     private $tournamentYear;
  31.     /**
  32.      * @ORM\Column(type="date", nullable=true)
  33.      * @Groups("atpprogram:list", "atpprogram:item")
  34.      */
  35.     private $isoDate;
  36.     /**
  37.      * @ORM\Column(type="string", length=255, nullable=true)
  38.      * @Groups("atpprogram:list", "atpprogram:item")
  39.      */
  40.     private $tournamentId;
  41.     /**
  42.      * @ORM\OneToMany(targetEntity=ATPProgramCourt::class, mappedBy="program")
  43.      *  @Groups("atpprogram:list", "atpprogram:item")
  44.      */
  45.     private $aTPProgramCourts;
  46.     public function __construct()
  47.     {
  48.         $this->aTPProgramCourts = new ArrayCollection();
  49.     }
  50.     public function getId(): ?int
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function getSeq(): ?int
  55.     {
  56.         return $this->seq;
  57.     }
  58.     public function setSeq(?int $seq): self
  59.     {
  60.         $this->seq $seq;
  61.         return $this;
  62.     }
  63.     public function getTournamentYear(): ?string
  64.     {
  65.         return $this->tournamentYear;
  66.     }
  67.     public function setTournamentYear(?string $tournamentYear): self
  68.     {
  69.         $this->tournamentYear $tournamentYear;
  70.         return $this;
  71.     }
  72.    public function getIsoDate(): ?\DateTimeInterface
  73.     {
  74.         return $this->isoDate;
  75.     }
  76.     public function setIsoDate(?\DateTimeInterface $isoDate): self
  77.     {
  78.         $this->isoDate $isoDate;
  79.         return $this;
  80.     }
  81.     public function getTournamentId(): ?string
  82.     {
  83.         return $this->tournamentId;
  84.     }
  85.     public function setTournamentId(?string $tournamentId): self
  86.     {
  87.         $this->tournamentId $tournamentId;
  88.         return $this;
  89.     }
  90.     /**
  91.      * @return Collection<int, ATPProgramCourt>
  92.      */
  93.     public function getATPProgramCourts(): Collection
  94.     {
  95.         return $this->aTPProgramCourts;
  96.     }
  97.     public function addATPProgramCourt(ATPProgramCourt $aTPProgramCourt): self
  98.     {
  99.         if (!$this->aTPProgramCourts->contains($aTPProgramCourt)) {
  100.             $this->aTPProgramCourts[] = $aTPProgramCourt;
  101.             $aTPProgramCourt->setProgram($this);
  102.         }
  103.         return $this;
  104.     }
  105.     public function removeATPProgramCourt(ATPProgramCourt $aTPProgramCourt): self
  106.     {
  107.         if ($this->aTPProgramCourts->removeElement($aTPProgramCourt)) {
  108.             // set the owning side to null (unless already changed)
  109.             if ($aTPProgramCourt->getProgram() === $this) {
  110.                 $aTPProgramCourt->setProgram(null);
  111.             }
  112.         }
  113.         return $this;
  114.     }
  115. }