<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\ComplaintTypeRepository")
*/
class ComplaintType
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=200)
*/
private $name;
/**
* @var ArrayCollection
*
* @ORM\ManyToMany(targetEntity="App\Entity\EeocFeed", mappedBy="complaintTypes")
*/
private $eeocFeeds;
public function __construct()
{
$this->eeocFeeds = new ArrayCollection();
}
/**
* @return string
*/
public function __toString()
{
return $this->name;
}
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;
}
/**
* @return Collection|EeocFeed[]
*/
public function getEeocFeeds(): Collection
{
return $this->eeocFeeds;
}
public function addEeocFeed(EeocFeed $eeocFeed): self
{
if (!$this->eeocFeeds->contains($eeocFeed)) {
$this->eeocFeeds[] = $eeocFeed;
$eeocFeed->addComplaintType($this);
}
return $this;
}
public function removeEeocFeed(EeocFeed $eeocFeed): self
{
if ($this->eeocFeeds->contains($eeocFeed)) {
$this->eeocFeeds->removeElement($eeocFeed);
$eeocFeed->removeComplaintType($this);
}
return $this;
}
}