<?phpnamespace App\Domain\Entity;use App\Shared\Domain\Validator as CRLAssert;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 ConsortiumLaboral{ /** * @var string|null * @Assert\Length( max=9, maxMessage="max_length {{ limit }}") * @CRLAssert\ConstraintCIF() */ private ?string $cif = null; /** * @var string|null * @Assert\NotBlank(message="not_blank") */ private ?string $razonSocial = null; private ?string $descripcion = 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") * @Assert\Regex( * pattern="/^[0-9]+$/", * match=true, * message="The value {{ value }} is not a valid phone number" * ) */ private ?string $telefono = null; /** * @var string|null * @Assert\Email(message="is_not_valid") * @Assert\NotBlank(message="not_blank") */ private ?string $email = null; private ?bool $active = null; private ?\DateTimeInterface $createdAt = null; private ?\DateTimeInterface $updatedAt = null; private ?\DateTimeInterface $deletedAt = null; private ?Uuid $id = null; /** * @var Municipio|null * @Assert\NotBlank(message="not_blank") */ private ?Municipio $municipio = null; /** * @var Provincia|null * @Assert\NotBlank(message="not_blank") */ private ?Provincia $provincia = null; private ?Persona $personaContacto = null; public function __toString(): string { return $this->getRazonSocial() ?? '---'; } public function getCif(): ?string { return $this->cif; } public function setCif(?string $cif): static { $this->cif = $cif; return $this; } public function getRazonSocial(): ?string { return $this->razonSocial; } public function setRazonSocial(?string $razonSocial): static { $this->razonSocial = $razonSocial; return $this; } public function getDescripcion(): ?string { return $this->descripcion; } public function setDescripcion(?string $descripcion): static { $this->descripcion = $descripcion; 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 isActive(): ?bool { return $this->active; } public function setActive(?bool $active): static { $this->active = $active; 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 getMunicipio(): ?Municipio { return $this->municipio; } public function setMunicipio(?Municipio $municipio): static { $this->municipio = $municipio; return $this; } public function getProvincia(): ?Provincia { return $this->provincia; } public function setProvincia(?Provincia $provincia): static { $this->provincia = $provincia; return $this; } public function getPersonaContacto(): ?Persona { return $this->personaContacto; } public function setPersonaContacto(?Persona $persona): static { $this->personaContacto = $persona; return $this; } public function getPersonasContacto():Collection { $personas = new ArrayCollection(); if($this->getPersonaContacto()) { $personas->add($this->getPersonaContacto()); } return $personas; }}