src/Domain/Entity/OrganoRepresentacion.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Domain\Entity;
  3. use DateTimeInterface;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\Uid\Uuid;
  9. use Symfony\Component\Validator\Constraints as Assert;
  10. class OrganoRepresentacion
  11. {
  12.     private ?string $nombre null;
  13.     private ?string $direccion null;
  14.     /**
  15.      * @var string|null
  16.      * @Assert\Regex(
  17.      *     pattern="/^[0-9]+$/",
  18.      *     match=true,
  19.      *     message="The value {{ value }} is not a valid phone number"
  20.      * )
  21.      */
  22.     private ?string $telefono null;
  23.     private ?string $email null;
  24.     private ?DateTimeInterface $createdAt null;
  25.     private ?DateTimeInterface $updatedAt null;
  26.     private ?DateTimeInterface $deletedAt null;
  27.     private ?Uuid $id null;
  28.     private ?Empresa $empresa null;
  29.     private Collection $personasContacto;
  30.     public function __construct()
  31.     {
  32.         $this->personasContacto = new ArrayCollection();
  33.     }
  34.     public function __toString(): string
  35.     {
  36.         return $this->getNombre()??'---';
  37.     }
  38.     public function getNombre(): ?string
  39.     {
  40.         return $this->nombre;
  41.     }
  42.     public function setNombre(?string $nombre): static
  43.     {
  44.         $this->nombre $nombre;
  45.         return $this;
  46.     }
  47.     public function getDireccion(): ?string
  48.     {
  49.         return $this->direccion;
  50.     }
  51.     public function setDireccion(?string $direccion): static
  52.     {
  53.         $this->direccion $direccion;
  54.         return $this;
  55.     }
  56.     public function getTelefono(): ?string
  57.     {
  58.         return $this->telefono;
  59.     }
  60.     public function setTelefono(?string $telefono): static
  61.     {
  62.         $this->telefono $telefono;
  63.         return $this;
  64.     }
  65.     public function getEmail(): ?string
  66.     {
  67.         return $this->email;
  68.     }
  69.     public function setEmail(?string $email): static
  70.     {
  71.         $this->email $email;
  72.         return $this;
  73.     }
  74.     public function getCreatedAt(): ?DateTimeInterface
  75.     {
  76.         return $this->createdAt;
  77.     }
  78.     public function setCreatedAt(DateTimeInterface $createdAt): static
  79.     {
  80.         $this->createdAt $createdAt;
  81.         return $this;
  82.     }
  83.     public function getUpdatedAt(): ?DateTimeInterface
  84.     {
  85.         return $this->updatedAt;
  86.     }
  87.     public function setUpdatedAt(DateTimeInterface $updatedAt): static
  88.     {
  89.         $this->updatedAt $updatedAt;
  90.         return $this;
  91.     }
  92.     public function getDeletedAt(): ?DateTimeInterface
  93.     {
  94.         return $this->deletedAt;
  95.     }
  96.     public function setDeletedAt(?DateTimeInterface $deletedAt): static
  97.     {
  98.         $this->deletedAt $deletedAt;
  99.         return $this;
  100.     }
  101.     public function getId(): ?Uuid
  102.     {
  103.         return $this->id;
  104.     }
  105.     public function getEmpresa(): ?Empresa
  106.     {
  107.         return $this->empresa;
  108.     }
  109.     public function setEmpresa(?Empresa $empresa): static
  110.     {
  111.         $this->empresa $empresa;
  112.         return $this;
  113.     }
  114.     /**
  115.      * @return Collection<int, Persona>
  116.      */
  117.     public function getPersonasContacto(): Collection
  118.     {
  119.         return $this->personasContacto;
  120.     }
  121.     public function addPersonasContacto(Persona $personasContacto): static
  122.     {
  123.         if (!$this->personasContacto->contains($personasContacto)) {
  124.             $this->personasContacto->add($personasContacto);
  125.         }
  126.         return $this;
  127.     }
  128.     public function removePersonasContacto(Persona $personasContacto): static
  129.     {
  130.         $this->personasContacto->removeElement($personasContacto);
  131.         return $this;
  132.     }
  133. }