<?phpnamespace App\Domain\Entity;use DateTimeInterface;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Uid\Uuid;class Ccaa{ private ?Uuid $id = null; private ?string $codigo = null; private ?string $nombre = null; private ?string $nombreLocal = null; private ?array $geoPoint = null; private ?array $geoShape = null; private ?string $pais = null; private ?DateTimeInterface $createdAt = null; private ?DateTimeInterface $updatedAt = null; private ?DateTimeInterface $deletedAt = null; private Collection $provincias; private Collection $empresas; public function __construct() { $this->provincias = new ArrayCollection(); $this->empresas = new ArrayCollection(); } public function __toString(): string { return $this->getNombre()??'CCAA Sin Definir'; } public function getCodigo(): ?string { return $this->codigo; } public function setCodigo(?string $codigo): static { $this->codigo = $codigo; return $this; } public function getNombre(): ?string { return $this->nombre; } public function setNombre(?string $nombre): static { $this->nombre = $nombre; return $this; } public function getNombreLocal(): ?string { return $this->nombreLocal; } public function setNombreLocal(?string $nombreLocal): static { $this->nombreLocal = $nombreLocal; return $this; } public function getGeoPoint(): ?array { return $this->geoPoint; } public function setGeoPoint(?array $geoPoint): static { $this->geoPoint = $geoPoint; return $this; } public function getGeoShape(): ?array { return $this->geoShape; } public function setGeoShape(?array $geoShape): static { $this->geoShape = $geoShape; return $this; } public function getPais(): ?string { return $this->pais; } public function setPais(?string $pais): static { $this->pais = $pais; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(\DateTimeInterface $createdAt): static { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(\DateTimeInterface $updatedAt): static { $this->updatedAt = $updatedAt; return $this; } public function getDeletedAt(): ?\DateTimeInterface { return $this->deletedAt; } public function setDeletedAt(?\DateTimeInterface $deletedAt): static { $this->deletedAt = $deletedAt; return $this; } public function getId(): ?Uuid { return $this->id; } /** * @return Collection<int, Provincia> */ public function getProvincias(): Collection { return $this->provincias; } public function addProvincia(Provincia $provincia): static { if (!$this->provincias->contains($provincia)) { $this->provincias->add($provincia); $provincia->setCcaa($this); } return $this; } public function removeProvincia(Provincia $provincia): static { if ($this->provincias->removeElement($provincia)) { // set the owning side to null (unless already changed) if ($provincia->getCcaa() === $this) { $provincia->setCcaa(null); } } return $this; } /** * @return Collection<int, Empresa> */ public function getEmpresas(): Collection { return $this->empresas; } public function addEmpresa(Empresa $empresa): static { if (!$this->empresas->contains($empresa)) { $this->empresas->add($empresa); $empresa->setCcaa($this); } return $this; } public function removeEmpresa(Empresa $empresa): static { if ($this->empresas->removeElement($empresa)) { // set the owning side to null (unless already changed) if ($empresa->getCcaa() === $this) { $empresa->setCcaa(null); } } return $this; }}