<?php
namespace App\Entity;
use App\Repository\IctoTypemouvementRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=IctoTypemouvementRepository::class)
*/
class IctoTypemouvement
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $designation;
/**
* @ORM\OneToMany(targetEntity=IctoMouvement::class, mappedBy="typemouvement")
*/
private $ictoMouvements;
public function __construct()
{
$this->ictoMouvements = 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, IctoMouvement>
*/
public function getIctoMouvements(): Collection
{
return $this->ictoMouvements;
}
public function addIctoMouvement(IctoMouvement $ictoMouvement): self
{
if (!$this->ictoMouvements->contains($ictoMouvement)) {
$this->ictoMouvements[] = $ictoMouvement;
$ictoMouvement->setTypemouvement($this);
}
return $this;
}
public function removeIctoMouvement(IctoMouvement $ictoMouvement): self
{
if ($this->ictoMouvements->removeElement($ictoMouvement)) {
// set the owning side to null (unless already changed)
if ($ictoMouvement->getTypemouvement() === $this) {
$ictoMouvement->setTypemouvement(null);
}
}
return $this;
}
}