src/Domain/Entity/ComisionParitaria.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 ComisionParitaria
  11. {
  12.     /**
  13.      * @var string|null
  14.      * @Assert\NotBlank(message="not_blank")
  15.      */
  16.     private ?string $convenioColectivo null;
  17.     /**
  18.      * @var DateTimeInterface|null
  19.      * @Assert\NotBlank(message="not_blank")
  20.      */
  21.     private ?DateTimeInterface $fechaVigenciaInicio null;
  22.     /**
  23.      * @var DateTimeInterface|null
  24.      * @Assert\NotBlank(message="not_blank")
  25.      */
  26.     private ?DateTimeInterface $fechaVigenciaFin null;
  27.     /**
  28.      * @var string|null
  29.      * @Assert\NotBlank(message="not_blank")
  30.      */
  31.     private ?string $direccion null;
  32.     /**
  33.      * @var string|null
  34.      * @Assert\NotBlank(message="not_blank")
  35.      */
  36.     private ?string $cp null;
  37.     /**
  38.      * @var string|null
  39.      * @Assert\NotBlank(message="not_blank")
  40.      */
  41.     private ?string $telefono null;
  42.     /**
  43.      * @var string|null
  44.      * @Assert\NotBlank(message="not_blank")
  45.      */
  46.     private ?string $email null;
  47.     private ?DateTimeInterface $createdAt null;
  48.     private ?DateTimeInterface $updatedAt null;
  49.     private ?DateTimeInterface $deletedAt null;
  50.     private ?Uuid $id null;
  51.     /**
  52.      * @var Provincia|null
  53.      * @Assert\NotBlank(message="not_blank")
  54.      */
  55.     private ?Provincia $provincia null;
  56.     /**
  57.      * @var Municipio|null
  58.      * @Assert\NotBlank(message="not_blank")
  59.      */
  60.     private ?Municipio $municipio null;
  61.     private Collection $personas;
  62.     public function __construct()
  63.     {
  64.         $this->personas = new ArrayCollection();
  65.     }
  66.     public function __toString(): string
  67.     {
  68.         return $this->getConvenioColectivo()??'---';
  69.     }
  70.     public function getConvenioColectivo(): ?string
  71.     {
  72.         return $this->convenioColectivo;
  73.     }
  74.     public function setConvenioColectivo(?string $convenioColectivo): static
  75.     {
  76.         $this->convenioColectivo $convenioColectivo;
  77.         return $this;
  78.     }
  79.     public function getDireccion(): ?string
  80.     {
  81.         return $this->direccion;
  82.     }
  83.     public function setDireccion(?string $direccion): static
  84.     {
  85.         $this->direccion $direccion;
  86.         return $this;
  87.     }
  88.     public function getCp(): ?string
  89.     {
  90.         return $this->cp;
  91.     }
  92.     public function setCp(?string $cp): static
  93.     {
  94.         $this->cp $cp;
  95.         return $this;
  96.     }
  97.     public function getTelefono(): ?string
  98.     {
  99.         return $this->telefono;
  100.     }
  101.     public function setTelefono(?string $telefono): static
  102.     {
  103.         $this->telefono $telefono;
  104.         return $this;
  105.     }
  106.     public function getEmail(): ?string
  107.     {
  108.         return $this->email;
  109.     }
  110.     public function setEmail(?string $email): static
  111.     {
  112.         $this->email $email;
  113.         return $this;
  114.     }
  115.     public function getCreatedAt(): ?DateTimeInterface
  116.     {
  117.         return $this->createdAt;
  118.     }
  119.     public function setCreatedAt(DateTimeInterface $createdAt): static
  120.     {
  121.         $this->createdAt $createdAt;
  122.         return $this;
  123.     }
  124.     public function getUpdatedAt(): ?DateTimeInterface
  125.     {
  126.         return $this->updatedAt;
  127.     }
  128.     public function setUpdatedAt(DateTimeInterface $updatedAt): static
  129.     {
  130.         $this->updatedAt $updatedAt;
  131.         return $this;
  132.     }
  133.     public function getDeletedAt(): ?DateTimeInterface
  134.     {
  135.         return $this->deletedAt;
  136.     }
  137.     public function setDeletedAt(?DateTimeInterface $deletedAt): static
  138.     {
  139.         $this->deletedAt $deletedAt;
  140.         return $this;
  141.     }
  142.     public function getId(): ?Uuid
  143.     {
  144.         return $this->id;
  145.     }
  146.     public function getProvincia(): ?Provincia
  147.     {
  148.         return $this->provincia;
  149.     }
  150.     public function setProvincia(?Provincia $provincia): static
  151.     {
  152.         $this->provincia $provincia;
  153.         return $this;
  154.     }
  155.     public function getMunicipio(): ?Municipio
  156.     {
  157.         return $this->municipio;
  158.     }
  159.     public function setMunicipio(?Municipio $municipio): static
  160.     {
  161.         $this->municipio $municipio;
  162.         return $this;
  163.     }
  164.     /**
  165.      * @return Collection<int, Persona>
  166.      */
  167.     public function getPersonas(): Collection
  168.     {
  169.         return $this->personas;
  170.     }
  171.     public function getPersonasContacto(): Collection
  172.     {
  173.         return $this->getPersonas();
  174.     }
  175.     public function addPersona(Persona $persona): static
  176.     {
  177.         if (!$this->personas->contains($persona)) {
  178.             $this->personas->add($persona);
  179.         }
  180.         return $this;
  181.     }
  182.     public function removePersona(Persona $persona): static
  183.     {
  184.         $this->personas->removeElement($persona);
  185.         return $this;
  186.     }
  187.     public function getFechaVigenciaInicio(): ?\DateTimeInterface
  188.     {
  189.         return $this->fechaVigenciaInicio;
  190.     }
  191.     public function setFechaVigenciaInicio(?\DateTimeInterface $fechaVigenciaInicio): static
  192.     {
  193.         $this->fechaVigenciaInicio $fechaVigenciaInicio;
  194.         return $this;
  195.     }
  196.     public function getFechaVigenciaFin(): ?\DateTimeInterface
  197.     {
  198.         return $this->fechaVigenciaFin;
  199.     }
  200.     public function setFechaVigenciaFin(?\DateTimeInterface $fechaVigenciaFin): static
  201.     {
  202.         $this->fechaVigenciaFin $fechaVigenciaFin;
  203.         return $this;
  204.     }
  205. }