<?php
namespace App\Entity;
use App\Repository\IctusFormeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=IctusFormeRepository::class)
*/
class IctusForme
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $designation;
/**
* @ORM\OneToMany(targetEntity=Stockpharmacie::class, mappedBy="ictusforme")
*/
private $stockpharmacies;
public function __construct()
{
$this->stockpharmacies = 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, Stockpharmacie>
*/
public function getStockpharmacies(): Collection
{
return $this->stockpharmacies;
}
public function addStockpharmacy(Stockpharmacie $stockpharmacy): self
{
if (!$this->stockpharmacies->contains($stockpharmacy)) {
$this->stockpharmacies[] = $stockpharmacy;
$stockpharmacy->setIctusforme($this);
}
return $this;
}
public function removeStockpharmacy(Stockpharmacie $stockpharmacy): self
{
if ($this->stockpharmacies->removeElement($stockpharmacy)) {
// set the owning side to null (unless already changed)
if ($stockpharmacy->getIctusforme() === $this) {
$stockpharmacy->setIctusforme(null);
}
}
return $this;
}
}