<?phpnamespace App\Domain\Entity;use App\Shared\Domain\ApplicationCore\Interfaces\EntityInterface;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 Calendario implements EntityInterface{ private ?int $anyo = null; private ?bool $active = null; private ?Uuid $id = null; private Collection $festivos; private ?Provincia $provincia = null; private ?Entidad $entidad = null; private ?\DateTimeInterface $createdAt = null; private ?\DateTimeInterface $updatedAt = null; private ?\DateTimeInterface $deletedAt = null; public function __construct() { $this->festivos = new ArrayCollection(); } public function __toString(): string { return trim($this->getAnyo() . ' ' . $this->getProvincia()) ?? '---'; } public function getAnyo(): ?int { return $this->anyo; } public function setAnyo(?int $anyo): static { $this->anyo = $anyo; return $this; } public function isActive(): ?bool { return $this->active; } public function setActive(?bool $active): static { $this->active = $active; return $this; } public function getId(): ?Uuid { return $this->id; } /** * @return Collection<int, Festivo> */ public function getFestivos(): Collection { return $this->festivos; } public function addFestivo(Festivo $festivo): static { if (!$this->festivos->contains($festivo)) { $this->festivos->add($festivo); $festivo->setCalendario($this); } return $this; } public function removeFestivo(Festivo $festivo): static { if ($this->festivos->removeElement($festivo)) { // set the owning side to null (unless already changed) if ($festivo->getCalendario() === $this) { $festivo->setCalendario(null); } } return $this; } public function getProvincia(): ?Provincia { return $this->provincia; } public function setProvincia(?Provincia $provincia): static { $this->provincia = $provincia; return $this; } public function getEntidad(): ?Entidad { return $this->entidad; } public function setEntidad(?Entidad $entidad): static { $this->entidad = $entidad; 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; }}