<?phpnamespace App\Entity;use App\Repository\LineupRepository;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Uid\Uuid;/** * @ORM\Entity(repositoryClass=LineupRepository::class) */class Lineup{ /** * @ORM\Id * @ORM\Column(type="uuid", unique=true) */ private $id; /** * @ORM\ManyToOne(targetEntity=Stage::class, inversedBy="lineups") * @ORM\JoinColumn(nullable=false) */ private $stage; /** * @ORM\ManyToOne(targetEntity=Artist::class, inversedBy="lineups") */ private $artist; /** * @ORM\Column(type="datetime_immutable") */ private $startAt; /** * @ORM\Column(type="datetime_immutable") */ private $endAt; /** * @ORM\Column(type="text", nullable=true) */ private $details; /** * @ORM\ManyToOne(targetEntity=Event::class) */ private $stagesFilter; public function __construct() { $this->id = Uuid::v4(); } public function getId(): Uuid { return $this->id; } public function getStage(): ?Stage { return $this->stage; } public function setStage(?Stage $stage): self { $this->stage = $stage; return $this; } public function getArtist(): ?Artist { return $this->artist; } public function setArtist(?Artist $artist): self { $this->artist = $artist; return $this; } public function getStartAt(): ?\DateTimeImmutable { return $this->startAt; } public function setStartAt(\DateTimeImmutable $startAt): self { $this->startAt = $startAt; return $this; } public function getEndAt(): ?\DateTimeImmutable { return $this->endAt; } public function setEndAt(\DateTimeImmutable $endAt): self { $this->endAt = $endAt; return $this; } public function getDetails(): ?string { return $this->details; } public function setDetails(?string $details): self { $this->details = $details; return $this; } public function getStagesFilter(): ?Event { if (!$this->stagesFilter) { return $this->getStage()->getEvents()->first(); } return $this->stagesFilter; } public function setStagesFilter(?Event $stagesFilter): self { $this->stagesFilter = $stagesFilter; return $this; }}