<?phpnamespace App\Entity;use App\Repository\GeraeteRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=GeraeteRepository::class) */class Geraete{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\ManyToOne(targetEntity=Marke::class, inversedBy="geraetes") */ private $marke; /** * @ORM\OneToMany(targetEntity=Preise::class, mappedBy="Geraete", cascade={"remove"}) */ private $preises; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $bild; /** * @ORM\Column(type="string", length=255) */ private $deviceType; /** * @ORM\Column(type="integer", nullable=true) */ private $positionTable; public function __construct() { $this->preises = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getMarke(): ?Marke { return $this->marke; } public function setMarke(?Marke $marke): self { $this->marke = $marke; return $this; } /** * @return Collection<int, Preise> */ public function getPreises(): Collection { return $this->preises; } public function addPreise(Preise $preise): self { if (!$this->preises->contains($preise)) { $this->preises[] = $preise; $preise->setGeraete($this); } return $this; } public function removePreise(Preise $preise): self { if ($this->preises->removeElement($preise)) { // set the owning side to null (unless already changed) if ($preise->getGeraete() === $this) { $preise->setGeraete(null); } } return $this; } public function getBild(): ?string { return $this->bild; } public function setBild(?string $bild): self { $this->bild = $bild; return $this; } public function getDeviceType(): ?string { return $this->deviceType; } public function setDeviceType(string $deviceType): self { $this->deviceType = $deviceType; return $this; } public function getPositionTable(): ?int { return $this->positionTable; } public function setPositionTable(?int $positionTable): self { $this->positionTable = $positionTable; return $this; }}