<?php
namespace App\Entity;
use App\Repository\ATPProgramRepository;
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=ATPProgramRepository::class)
*/
class ATPProgram
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups("atpprogram:list", "atpprogram:item", "atpprogram:list", "atpprogram:item")
*/
private $id;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups("atpprogram:list", "atpprogram:item", "atpprogram:list", "atpprogram:item")
*/
private $seq;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups("atp_program:list", "atp_program:item", "atpprogram:list", "atpprogram:item")
*/
private $tournamentYear;
/**
* @ORM\Column(type="date", nullable=true)
* @Groups("atpprogram:list", "atpprogram:item")
*/
private $isoDate;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups("atpprogram:list", "atpprogram:item")
*/
private $tournamentId;
/**
* @ORM\OneToMany(targetEntity=ATPProgramCourt::class, mappedBy="program")
* @Groups("atpprogram:list", "atpprogram:item")
*/
private $aTPProgramCourts;
public function __construct()
{
$this->aTPProgramCourts = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getSeq(): ?int
{
return $this->seq;
}
public function setSeq(?int $seq): self
{
$this->seq = $seq;
return $this;
}
public function getTournamentYear(): ?string
{
return $this->tournamentYear;
}
public function setTournamentYear(?string $tournamentYear): self
{
$this->tournamentYear = $tournamentYear;
return $this;
}
public function getIsoDate(): ?\DateTimeInterface
{
return $this->isoDate;
}
public function setIsoDate(?\DateTimeInterface $isoDate): self
{
$this->isoDate = $isoDate;
return $this;
}
public function getTournamentId(): ?string
{
return $this->tournamentId;
}
public function setTournamentId(?string $tournamentId): self
{
$this->tournamentId = $tournamentId;
return $this;
}
/**
* @return Collection<int, ATPProgramCourt>
*/
public function getATPProgramCourts(): Collection
{
return $this->aTPProgramCourts;
}
public function addATPProgramCourt(ATPProgramCourt $aTPProgramCourt): self
{
if (!$this->aTPProgramCourts->contains($aTPProgramCourt)) {
$this->aTPProgramCourts[] = $aTPProgramCourt;
$aTPProgramCourt->setProgram($this);
}
return $this;
}
public function removeATPProgramCourt(ATPProgramCourt $aTPProgramCourt): self
{
if ($this->aTPProgramCourts->removeElement($aTPProgramCourt)) {
// set the owning side to null (unless already changed)
if ($aTPProgramCourt->getProgram() === $this) {
$aTPProgramCourt->setProgram(null);
}
}
return $this;
}
}