src/Domain/Entity/Provincia.php line 12

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. class Provincia
  10. {
  11.     private ?Uuid $id null;
  12.     private ?string $codigo null;
  13.     private ?string $nombre null;
  14.     private ?string $nombreLocal null;
  15.     private ?array $geoPoint null;
  16.     private ?array $geoShape null;
  17.     private ?Ccaa $ccaa null;
  18.     private ?string $pais null;
  19.     private ?DateTimeInterface $createdAt null;
  20.     private ?DateTimeInterface $updatedAt null;
  21.     private ?DateTimeInterface $deletedAt null;
  22.     private Collection $calendarios;
  23.     private Collection $localidads;
  24.     private Collection $empresas;
  25.     private Collection $sedes;
  26.     private Collection $municipios;
  27.     private Collection $consortiumLaborals;
  28.     private Collection $comisionesParitarias;
  29.     public function __construct()
  30.     {
  31.         $this->calendarios = new ArrayCollection();
  32.         $this->empresas = new ArrayCollection();
  33.         $this->sedes = new ArrayCollection();
  34.         $this->municipios = new ArrayCollection();
  35.         $this->consortiumLaborals = new ArrayCollection();
  36.         $this->comisionesParitarias = new ArrayCollection();
  37.     }
  38.     public function __toString(): string
  39.     {
  40.         return $this->getNombre()??'Provincia Sin Definir';
  41.     }
  42.     public function getCodigo(): ?string
  43.     {
  44.         return $this->codigo;
  45.     }
  46.     public function setCodigo(?string $codigo): static
  47.     {
  48.         $this->codigo $codigo;
  49.         return $this;
  50.     }
  51.     public function getNombre(): ?string
  52.     {
  53.         return $this->nombre;
  54.     }
  55.     public function setNombre(?string $nombre): static
  56.     {
  57.         $this->nombre $nombre;
  58.         return $this;
  59.     }
  60.     public function getNombreLocal(): ?string
  61.     {
  62.         return $this->nombreLocal;
  63.     }
  64.     public function setNombreLocal(?string $nombreLocal): static
  65.     {
  66.         $this->nombreLocal $nombreLocal;
  67.         return $this;
  68.     }
  69.     public function getPais(): ?string
  70.     {
  71.         return $this->pais;
  72.     }
  73.     public function setPais(?string $pais): static
  74.     {
  75.         $this->pais $pais;
  76.         return $this;
  77.     }
  78.     public function getGeoPoint(): ?array
  79.     {
  80.         return $this->geoPoint;
  81.     }
  82.     public function setGeoPoint(?array $geoPoint): static
  83.     {
  84.         $this->geoPoint $geoPoint;
  85.         return $this;
  86.     }
  87.     public function getGeoShape(): ?array
  88.     {
  89.         return $this->geoShape;
  90.     }
  91.     public function setGeoShape(?array $geoShape): static
  92.     {
  93.         $this->geoShape $geoShape;
  94.         return $this;
  95.     }
  96.     public function getCreatedAt(): ?\DateTimeInterface
  97.     {
  98.         return $this->createdAt;
  99.     }
  100.     public function setCreatedAt(\DateTimeInterface $createdAt): static
  101.     {
  102.         $this->createdAt $createdAt;
  103.         return $this;
  104.     }
  105.     public function getUpdatedAt(): ?\DateTimeInterface
  106.     {
  107.         return $this->updatedAt;
  108.     }
  109.     public function setUpdatedAt(\DateTimeInterface $updatedAt): static
  110.     {
  111.         $this->updatedAt $updatedAt;
  112.         return $this;
  113.     }
  114.     public function getDeletedAt(): ?\DateTimeInterface
  115.     {
  116.         return $this->deletedAt;
  117.     }
  118.     public function setDeletedAt(?\DateTimeInterface $deletedAt): static
  119.     {
  120.         $this->deletedAt $deletedAt;
  121.         return $this;
  122.     }
  123.     public function getId(): ?Uuid
  124.     {
  125.         return $this->id;
  126.     }
  127.     /**
  128.      * @return Collection<int, Calendario>
  129.      */
  130.     public function getCalendarios(): Collection
  131.     {
  132.         return $this->calendarios;
  133.     }
  134.     public function addCalendario(Calendario $calendario): static
  135.     {
  136.         if (!$this->calendarios->contains($calendario)) {
  137.             $this->calendarios->add($calendario);
  138.             $calendario->setProvincia($this);
  139.         }
  140.         return $this;
  141.     }
  142.     public function removeCalendario(Calendario $calendario): static
  143.     {
  144.         if ($this->calendarios->removeElement($calendario)) {
  145.             // set the owning side to null (unless already changed)
  146.             if ($calendario->getProvincia() === $this) {
  147.                 $calendario->setProvincia(null);
  148.             }
  149.         }
  150.         return $this;
  151.     }
  152.     /**
  153.      * @return Collection<int, Empresa>
  154.      */
  155.     public function getEmpresas(): Collection
  156.     {
  157.         return $this->empresas;
  158.     }
  159.     public function addEmpresa(Empresa $empresa): static
  160.     {
  161.         if (!$this->empresas->contains($empresa)) {
  162.             $this->empresas->add($empresa);
  163.             $empresa->setProvincia($this);
  164.         }
  165.         return $this;
  166.     }
  167.     public function removeEmpresa(Empresa $empresa): static
  168.     {
  169.         if ($this->empresas->removeElement($empresa)) {
  170.             // set the owning side to null (unless already changed)
  171.             if ($empresa->getProvincia() === $this) {
  172.                 $empresa->setProvincia(null);
  173.             }
  174.         }
  175.         return $this;
  176.     }
  177.     /**
  178.      * @return Collection<int, Sede>
  179.      */
  180.     public function getSedes(): Collection
  181.     {
  182.         return $this->sedes;
  183.     }
  184.     public function addSede(Sede $sede): static
  185.     {
  186.         if (!$this->sedes->contains($sede)) {
  187.             $this->sedes->add($sede);
  188.             $sede->setProvincia($this);
  189.         }
  190.         return $this;
  191.     }
  192.     public function removeSede(Sede $sede): static
  193.     {
  194.         if ($this->sedes->removeElement($sede)) {
  195.             // set the owning side to null (unless already changed)
  196.             if ($sede->getProvincia() === $this) {
  197.                 $sede->setProvincia(null);
  198.             }
  199.         }
  200.         return $this;
  201.     }
  202.     /**
  203.      * @return Collection<int, Municipio>
  204.      */
  205.     public function getMunicipios(): Collection
  206.     {
  207.         return $this->municipios;
  208.     }
  209.     public function addMunicipio(Municipio $municipio): static
  210.     {
  211.         if (!$this->municipios->contains($municipio)) {
  212.             $this->municipios->add($municipio);
  213.             $municipio->setProvincia($this);
  214.         }
  215.         return $this;
  216.     }
  217.     public function removeMunicipio(Municipio $municipio): static
  218.     {
  219.         if ($this->municipios->removeElement($municipio)) {
  220.             // set the owning side to null (unless already changed)
  221.             if ($municipio->getProvincia() === $this) {
  222.                 $municipio->setProvincia(null);
  223.             }
  224.         }
  225.         return $this;
  226.     }
  227.     /**
  228.      * @return Collection<int, ConsortiumLaboral>
  229.      */
  230.     public function getConsortiumLaborals(): Collection
  231.     {
  232.         return $this->consortiumLaborals;
  233.     }
  234.     public function addConsortiumLaboral(ConsortiumLaboral $consortiumLaboral): static
  235.     {
  236.         if (!$this->consortiumLaborals->contains($consortiumLaboral)) {
  237.             $this->consortiumLaborals->add($consortiumLaboral);
  238.             $consortiumLaboral->setProvincia($this);
  239.         }
  240.         return $this;
  241.     }
  242.     public function removeConsortiumLaboral(ConsortiumLaboral $consortiumLaboral): static
  243.     {
  244.         if ($this->consortiumLaborals->removeElement($consortiumLaboral)) {
  245.             // set the owning side to null (unless already changed)
  246.             if ($consortiumLaboral->getProvincia() === $this) {
  247.                 $consortiumLaboral->setProvincia(null);
  248.             }
  249.         }
  250.         return $this;
  251.     }
  252.     /**
  253.      * @return Collection<int, ComisionParitaria>
  254.      */
  255.     public function getComisionesParitarias(): Collection
  256.     {
  257.         return $this->comisionesParitarias;
  258.     }
  259.     public function addComisionesParitaria(ComisionParitaria $comisionesParitaria): static
  260.     {
  261.         if (!$this->comisionesParitarias->contains($comisionesParitaria)) {
  262.             $this->comisionesParitarias->add($comisionesParitaria);
  263.             $comisionesParitaria->setProvincia($this);
  264.         }
  265.         return $this;
  266.     }
  267.     public function removeComisionesParitaria(ComisionParitaria $comisionesParitaria): static
  268.     {
  269.         if ($this->comisionesParitarias->removeElement($comisionesParitaria)) {
  270.             // set the owning side to null (unless already changed)
  271.             if ($comisionesParitaria->getProvincia() === $this) {
  272.                 $comisionesParitaria->setProvincia(null);
  273.             }
  274.         }
  275.         return $this;
  276.     }
  277.     public function getCcaa(): ?Ccaa
  278.     {
  279.         return $this->ccaa;
  280.     }
  281.     public function setCcaa(?Ccaa $ccaa): static
  282.     {
  283.         $this->ccaa $ccaa;
  284.         return $this;
  285.     }
  286. }