<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\Collection;
use App\Repository\TypeReclamationRepository;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity(repositoryClass=TypeReclamationRepository::class)
*/
class TypeReclamation
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $designation;
/**
* @ORM\OneToMany(targetEntity=Reclamation::class, mappedBy="typereclamation", orphanRemoval=true)
*/
private $reclamations;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $designation_en;
public function __construct()
{
$this->reclamations = new ArrayCollection();
}
public function __toString()
{
return $this->getDesignation();
}
public function getId(): ?int
{
return $this->id;
}
public function getDesignation(): ?string
{
return $this->designation;
}
public function setDesignation(string $designation): self
{
$this->designation = $designation;
return $this;
}
/**
* @return Collection<int, Reclamation>
*/
public function getReclamations(): Collection
{
return $this->reclamations;
}
public function addReclamation(Reclamation $reclamation): self
{
if (!$this->reclamations->contains($reclamation)) {
$this->reclamations[] = $reclamation;
$reclamation->setTypereclamation($this);
}
return $this;
}
public function removeReclamation(Reclamation $reclamation): self
{
if ($this->reclamations->removeElement($reclamation)) {
// set the owning side to null (unless already changed)
if ($reclamation->getTypereclamation() === $this) {
$reclamation->setTypereclamation(null);
}
}
return $this;
}
public function getDesignationEn(): ?string
{
return $this->designation_en;
}
public function setDesignationEn(?string $designation_en): self
{
$this->designation_en = $designation_en;
return $this;
}
}