<?php
namespace App\Entity;
use App\Repository\CommitteeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: CommitteeRepository::class)]
class Committee
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $libelle = null;
#[ORM\ManyToMany(targetEntity: Committeemember::class, inversedBy: 'committees')]
private Collection $Committeembr;
public function __construct()
{
$this->Committeembr = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setLibelle(?string $libelle): static
{
$this->libelle = $libelle;
return $this;
}
/**
* @return Collection<int, Committeemember>
*/
public function getCommitteembr(): Collection
{
return $this->Committeembr;
}
public function addCommitteembr(Committeemember $committeembr): static
{
if (!$this->Committeembr->contains($committeembr)) {
$this->Committeembr->add($committeembr);
}
return $this;
}
public function removeCommitteembr(Committeemember $committeembr): static
{
$this->Committeembr->removeElement($committeembr);
return $this;
}
}