<?phpnamespace App\Entity;use App\Repository\Icd10CauseGroupRepository;use Doctrine\Common\Collections\{ ArrayCollection, Collection };use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: Icd10CauseGroupRepository::class), ORM\Table(name: 'icd10_cause_groups')]class Icd10CauseGroup implements \Stringable{ #[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')] private $id; #[ORM\Column(type: 'string', length: 255)] private $name; #[ORM\OneToMany(targetEntity: Icd10CauseSubGroup::class, mappedBy: 'causeGroup')] private $icd10CauseSubGroups; #[ORM\OneToMany(targetEntity: Icd10Disease::class, mappedBy: 'causeGroup')] private $icd10Diseases; public function __construct() { $this->icd10CauseSubGroups = new ArrayCollection(); $this->icd10Diseases = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } /** * @return Collection|Icd10CauseSubGroup[] */ public function getIcd10CauseSubGroups(): Collection { return $this->icd10CauseSubGroups; } public function addIcd10CauseSubGroup(Icd10CauseSubGroup $icd10CauseSubGroup): self { if (!$this->icd10CauseSubGroups->contains($icd10CauseSubGroup)) { $this->icd10CauseSubGroups[] = $icd10CauseSubGroup; $icd10CauseSubGroup->setCauseGroup($this); } return $this; } public function removeIcd10CauseSubGroup(Icd10CauseSubGroup $icd10CauseSubGroup): self { if ($this->icd10CauseSubGroups->contains($icd10CauseSubGroup)) { $this->icd10CauseSubGroups->removeElement($icd10CauseSubGroup); if ($icd10CauseSubGroup->getCauseGroup() === $this) { $icd10CauseSubGroup->setCauseGroup(null); } } return $this; } /** * @return Collection|Icd10Disease[] */ public function getIcd10Diseases(): Collection { return $this->icd10Diseases; } public function addIcd10Disease(Icd10Disease $icd10Disease): self { if (!$this->icd10Diseases->contains($icd10Disease)) { $this->icd10Diseases[] = $icd10Disease; $icd10Disease->setCauseGroup($this); } return $this; } public function removeIcd10Disease(Icd10Disease $icd10Disease): self { if ($this->icd10Diseases->contains($icd10Disease)) { $this->icd10Diseases->removeElement($icd10Disease); if ($icd10Disease->getCauseGroup() === $this) { $icd10Disease->setCauseGroup(null); } } return $this; } public function __toString(): string { return (string) $this->getName(); }}