<?php
namespace App\Entity;
use App\Repository\ReparaturenRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ReparaturenRepository::class)
*/
class Reparaturen
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $Reparaturen;
/**
* @ORM\OneToMany(targetEntity=Preise::class, mappedBy="reparatur")
*/
private $preises;
public function __construct()
{
$this->preises = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getReparaturen(): ?string
{
return $this->Reparaturen;
}
public function setReparaturen(string $Reparaturen): self
{
$this->Reparaturen = $Reparaturen;
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->setReparatur($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->getReparatur() === $this) {
$preise->setReparatur(null);
}
}
return $this;
}
}