<?phpnamespace App\Entity;use App\Repository\AppelSujetRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Table(name="appelSujet") * @ORM\Entity(repositoryClass=AppelSujetRepository::class) */class AppelSujet{ /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\OneToMany(targetEntity=Appel::class, mappedBy="sujet") */ private $appels; /** * @ORM\Column(type="string", length=100) */ private $name; /** * @ORM\OneToMany(targetEntity=Rdv::class, mappedBy="sujet") */ private $rdvs; /** * @ORM\Column(type="string", length=100, nullable=true) */ private $role; public function __construct() { $this->appels = new ArrayCollection(); $this->rdvs = new ArrayCollection(); } public function getId(): ?int { return $this->id; } /** * @return Collection|Appel[] */ public function getAppels(): Collection { return $this->appels; } public function addAppel(Appel $appel): self { if (!$this->appels->contains($appel)) { $this->appels[] = $appel; $appel->setSujet($this); } return $this; } public function removeAppel(Appel $appel): self { if ($this->appels->contains($appel)) { $this->appels->removeElement($appel); // set the owning side to null (unless already changed) if ($appel->getSujet() === $this) { $appel->setSujet(null); } } return $this; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } /** * @return Collection|Rdv[] */ public function getRdvs(): Collection { return $this->rdvs; } public function addRdv(Rdv $rdv): self { if (!$this->rdvs->contains($rdv)) { $this->rdvs[] = $rdv; $rdv->setSujet($this); } return $this; } public function removeRdv(Rdv $rdv): self { if ($this->rdvs->contains($rdv)) { $this->rdvs->removeElement($rdv); // set the owning side to null (unless already changed) if ($rdv->getSujet() === $this) { $rdv->setSujet(null); } } return $this; } public function getRole(): ?string { return $this->role; } public function setRole(?string $role): self { $this->role = $role; return $this; }}