<?php
namespace App\Entity;
use App\Repository\TierpayantRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=TierpayantRepository::class)
*/
class Tierpayant
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $designation;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $logo;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\ManyToMany(targetEntity=IctusPharmacie::class, inversedBy="tierpayants")
*/
private $pharmacie;
/**
* @ORM\OneToMany(targetEntity=IctusCommande::class, mappedBy="tierpayant")
*/
private $ictusCommandes;
public function __construct()
{
$this->pharmacie = new ArrayCollection();
$this->ictusCommandes = 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;
}
public function getLogo(): ?string
{
return $this->logo;
}
public function setLogo(?string $logo): self
{
$this->logo = $logo;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
/**
* @return Collection<int, IctusPharmacie>
*/
public function getPharmacie(): Collection
{
return $this->pharmacie;
}
public function addPharmacie(IctusPharmacie $pharmacie): self
{
if (!$this->pharmacie->contains($pharmacie)) {
$this->pharmacie[] = $pharmacie;
}
return $this;
}
public function removePharmacie(IctusPharmacie $pharmacie): self
{
$this->pharmacie->removeElement($pharmacie);
return $this;
}
/**
* @return Collection<int, IctusCommande>
*/
public function getIctusCommandes(): Collection
{
return $this->ictusCommandes;
}
public function addIctusCommande(IctusCommande $ictusCommande): self
{
if (!$this->ictusCommandes->contains($ictusCommande)) {
$this->ictusCommandes[] = $ictusCommande;
$ictusCommande->setTierpayant($this);
}
return $this;
}
public function removeIctusCommande(IctusCommande $ictusCommande): self
{
if ($this->ictusCommandes->removeElement($ictusCommande)) {
// set the owning side to null (unless already changed)
if ($ictusCommande->getTierpayant() === $this) {
$ictusCommande->setTierpayant(null);
}
}
return $this;
}
}