<?php
namespace App\Entity;
use App\Repository\EtatAchatIctoRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=EtatAchatIctoRepository::class)
*/
class EtatAchatIcto
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $designation;
/**
* @ORM\OneToMany(targetEntity=AchatIctocoin::class, mappedBy="etat")
*/
private $achatIctocoins;
public function __construct()
{
$this->achatIctocoins = new ArrayCollection();
}
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, AchatIctocoin>
*/
public function getAchatIctocoins(): Collection
{
return $this->achatIctocoins;
}
public function addAchatIctocoin(AchatIctocoin $achatIctocoin): self
{
if (!$this->achatIctocoins->contains($achatIctocoin)) {
$this->achatIctocoins[] = $achatIctocoin;
$achatIctocoin->setEtat($this);
}
return $this;
}
public function removeAchatIctocoin(AchatIctocoin $achatIctocoin): self
{
if ($this->achatIctocoins->removeElement($achatIctocoin)) {
// set the owning side to null (unless already changed)
if ($achatIctocoin->getEtat() === $this) {
$achatIctocoin->setEtat(null);
}
}
return $this;
}
}