<?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;use Symfony\Component\Validator\Constraints as Assert;class Sede implements EntityInterface{ /** * @var string|null * @Assert\NotBlank(message="not_blank") */ private ?string $abreviatura = null; /** * @var string|null * @Assert\NotBlank(message="not_blank") */ private ?string $direccion = null; /** * @var string|null * @Assert\NotBlank(message="not_blank") */ private ?string $cp = null; /** * @var string|null * @Assert\NotBlank(message="not_blank") */ private ?string $telefono = null; /** * @var string|null * @Assert\NotBlank(message="not_blank") */ private ?string $email = null; private ?\DateTimeInterface $createdAt = null; private ?\DateTimeInterface $updatedAt = null; private ?\DateTimeInterface $deletedAt = null; private ?Uuid $id = null; /** * @var SonataUserUser|null * @Assert\NotBlank(message="not_blank") */ private ?SonataUserUser $responsable = null; private Collection $contadores; /** * @var Provincia|null * @Assert\NotBlank(message="not_blank") */ private ?Provincia $provincia = null; private ?Entidad $entidad = null; /** * @var Municipio|null * @Assert\NotBlank(message="not_blank") */ private ?Municipio $municipio = null; private Collection $registros; public function __construct() { $this->contadores = new ArrayCollection(); $this->registros = new ArrayCollection(); } public function __toString(): string { return $this->getAbreviatura()??'---'; } public function getAbreviatura(): ?string { return $this->abreviatura; } public function setAbreviatura(?string $abreviatura): static { $this->abreviatura = $abreviatura; return $this; } public function getDireccion(): ?string { return $this->direccion; } public function setDireccion(?string $direccion): static { $this->direccion = $direccion; return $this; } public function getCp(): ?string { return $this->cp; } public function setCp(?string $cp): static { $this->cp = $cp; return $this; } public function getTelefono(): ?string { return $this->telefono; } public function setTelefono(?string $telefono): static { $this->telefono = $telefono; return $this; } public function getEmail(): ?string { return $this->email; } public function setEmail(?string $email): static { $this->email = $email; 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, Contador> */ public function getContadores(): Collection { return $this->contadores; } public function addContadore(Contador $contadore): static { if (!$this->contadores->contains($contadore)) { $this->contadores->add($contadore); $contadore->setSede($this); } return $this; } public function removeContadore(Contador $contadore): static { if ($this->contadores->removeElement($contadore)) { // set the owning side to null (unless already changed) if ($contadore->getSede() === $this) { $contadore->setSede(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 getMunicipio(): ?Municipio { return $this->municipio; } public function setMunicipio(?Municipio $municipio): static { $this->municipio = $municipio; return $this; } public function getResponsable(): ?SonataUserUser { return $this->responsable; } public function setResponsable(?SonataUserUser $responsable): static { $this->responsable = $responsable; return $this; } /** * @return Collection<int, DocumentacionRegistro> */ public function getRegistros(): Collection { return $this->registros; } public function addRegistro(DocumentacionRegistro $registro): static { if (!$this->registros->contains($registro)) { $this->registros->add($registro); $registro->setSede($this); } return $this; } public function removeRegistro(DocumentacionRegistro $registro): static { if ($this->registros->removeElement($registro)) { // set the owning side to null (unless already changed) if ($registro->getSede() === $this) { $registro->setSede(null); } } return $this; }}