Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
716cf56cb2.url-de-test.ws
/
htdocs_old
/
src
/
Entity
/
/srv/data/web/vhosts/716cf56cb2.url-de-test.ws/htdocs_old/src/Entity/Job.php
<?php namespace App\Entity; use Doctrine\ORM\Mapping as ORM; use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\ArrayCollection; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** * @ORM\Entity(repositoryClass="App\Repository\JobRepository") * @UniqueEntity("value") */ class Job { /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $value; /** * @ORM\OneToMany(targetEntity="App\Entity\Training", mappedBy="job") */ private $trainings; /** * @ORM\Column(type="string", length=255) */ private $color; public function __construct() { $this->trainings = new ArrayCollection(); } public function __toString() { return $this->value; } public function getId(): ?int { return $this->id; } public function getValue(): ?string { return $this->value; } public function setValue(string $value): self { $this->value = $value; return $this; } /** * @return Collection|Training[] */ public function getTrainings(): Collection { return $this->trainings; } public function addTraining(Training $training): self { if (!$this->trainings->contains($training)) { $this->trainings[] = $training; $training->setJob($this); } return $this; } public function removeTraining(Training $training): self { if ($this->trainings->contains($training)) { $this->trainings->removeElement($training); // set the owning side to null (unless already changed) if ($training->getJob() === $this) { $training->setJob(null); } } return $this; } public function getColor(): ?string { return $this->color; } public function setColor(string $color): self { $this->color = $color; return $this; } }