<?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;use Symfony\Component\Validator\Constraints as Assert;class OrganoRepresentacion{ private ?string $nombre = null; private ?string $direccion = null; /** * @var string|null * @Assert\Regex( * pattern="/^[0-9]+$/", * match=true, * message="The value {{ value }} is not a valid phone number" * ) */ private ?string $telefono = null; private ?string $email = null; private ?DateTimeInterface $createdAt = null; private ?DateTimeInterface $updatedAt = null; private ?DateTimeInterface $deletedAt = null; private ?Uuid $id = null; private ?Empresa $empresa = null; private Collection $personasContacto; public function __construct() { $this->personasContacto = new ArrayCollection(); } public function __toString(): string { return $this->getNombre()??'---'; } public function getNombre(): ?string { return $this->nombre; } public function setNombre(?string $nombre): static { $this->nombre = $nombre; return $this; } public function getDireccion(): ?string { return $this->direccion; } public function setDireccion(?string $direccion): static { $this->direccion = $direccion; 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; } public function getEmpresa(): ?Empresa { return $this->empresa; } public function setEmpresa(?Empresa $empresa): static { $this->empresa = $empresa; return $this; } /** * @return Collection<int, Persona> */ public function getPersonasContacto(): Collection { return $this->personasContacto; } public function addPersonasContacto(Persona $personasContacto): static { if (!$this->personasContacto->contains($personasContacto)) { $this->personasContacto->add($personasContacto); } return $this; } public function removePersonasContacto(Persona $personasContacto): static { $this->personasContacto->removeElement($personasContacto); return $this; }}