<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* GeneralSkill
*
* @ORM\Table(name="general_skill")
* @ORM\Entity
*/
class GeneralSkill
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="libelle", type="string", length=255, nullable=false)
*/
private $libelle;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Expert", mappedBy="generalSkill")
*/
private $expert;
/**
* Constructor
*/
public function __construct()
{
$this->expert = new \Doctrine\Common\Collections\ArrayCollection();
}
public function __toString() { return $this->libelle;}
public function getId(): ?int
{
return $this->id;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setLibelle(string $libelle): self
{
$this->libelle = $libelle;
return $this;
}
/**
* @return Collection<int, Expert>
*/
public function getExpert(): Collection
{
return $this->expert;
}
public function addExpert(Expert $expert): self
{
if (!$this->expert->contains($expert)) {
$this->expert[] = $expert;
$expert->addGeneralSkill($this);
}
return $this;
}
public function removeExpert(Expert $expert): self
{
if ($this->expert->removeElement($expert)) {
$expert->removeGeneralSkill($this);
}
return $this;
}
}