src/Domain/Entity/SonataUserUser.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 Sonata\UserBundle\Entity\BaseUser;
  9. use Symfony\Component\Uid\Uuid;
  10. class SonataUserUser extends BaseUser
  11. {
  12.     protected $id;
  13.     private Collection $expedientesCreador;
  14.     private Collection $expedientesResponsable;
  15.     private Collection $metadataExpedientesResponsable;
  16.     private Collection $tramitesResponsable;
  17.     private Collection $metadataTramitesResponsable;
  18.     private ?Entidad $entidad null;
  19.     private ?Sede $sedeResponsable null;
  20.     private ?DateTimeInterface $deletedAt;
  21.     private Collection $documentacionRegistros;
  22.     public function __construct()
  23.     {
  24.         $this->expedientesCreador = new ArrayCollection();
  25.         $this->metadataExpedientesResponsable = new ArrayCollection();
  26.         $this->tramitesResponsable = new ArrayCollection();
  27.         $this->metadataTramitesResponsable = new ArrayCollection();
  28.         $this->expedientesResponsable = new ArrayCollection();
  29.         $this->documentacionRegistros = new ArrayCollection();
  30.     }
  31.     public function getId(): ?Uuid
  32.     {
  33.         return $this->id;
  34.     }
  35.     /**
  36.      * @return Collection<int, Expediente>
  37.      */
  38.     public function getExpedientesCreador(): Collection
  39.     {
  40.         return $this->expedientesCreador;
  41.     }
  42.     public function addExpedientesCreador(Expediente $expedientesCreador): static
  43.     {
  44.         if (!$this->expedientesCreador->contains($expedientesCreador)) {
  45.             $this->expedientesCreador->add($expedientesCreador);
  46.             $expedientesCreador->setCreador($this);
  47.         }
  48.         return $this;
  49.     }
  50.     public function removeExpedientesCreador(Expediente $expedientesCreador): static
  51.     {
  52.         if ($this->expedientesCreador->removeElement($expedientesCreador)) {
  53.             // set the owning side to null (unless already changed)
  54.             if ($expedientesCreador->getCreador() === $this) {
  55.                 $expedientesCreador->setCreador(null);
  56.             }
  57.         }
  58.         return $this;
  59.     }
  60.     /**
  61.      * @return Collection<int, MetadataExpediente>
  62.      */
  63.     public function getMetadataExpedientesResponsable(): Collection
  64.     {
  65.         return $this->metadataExpedientesResponsable;
  66.     }
  67.     public function addMetadataExpedientesResponsable(MetadataExpediente $metadataExpedientesResponsable): static
  68.     {
  69.         if (!$this->metadataExpedientesResponsable->contains($metadataExpedientesResponsable)) {
  70.             $this->metadataExpedientesResponsable->add($metadataExpedientesResponsable);
  71.             $metadataExpedientesResponsable->addResponsable($this);
  72.         }
  73.         return $this;
  74.     }
  75.     public function removeMetadataExpedientesResponsable(MetadataExpediente $metadataExpedientesResponsable): static
  76.     {
  77.         if ($this->metadataExpedientesResponsable->removeElement($metadataExpedientesResponsable)) {
  78.             $metadataExpedientesResponsable->removeResponsable($this);
  79.         }
  80.         return $this;
  81.     }
  82.     /**
  83.      * @return Collection<int, Tramite>
  84.      */
  85.     public function getTramitesResponsable(): Collection
  86.     {
  87.         return $this->tramitesResponsable;
  88.     }
  89.     public function addTramitesResponsable(Tramite $tramitesResponsable): static
  90.     {
  91.         if (!$this->tramitesResponsable->contains($tramitesResponsable)) {
  92.             $this->tramitesResponsable->add($tramitesResponsable);
  93.             $tramitesResponsable->addResponsable($this);
  94.         }
  95.         return $this;
  96.     }
  97.     public function removeTramitesResponsable(Tramite $tramitesResponsable): static
  98.     {
  99.         if ($this->tramitesResponsable->removeElement($tramitesResponsable)) {
  100.             $tramitesResponsable->removeResponsable($this);
  101.         }
  102.         return $this;
  103.     }
  104.     /**
  105.      * @return Collection<int, MetadataTramite>
  106.      */
  107.     public function getMetadataTramitesResponsable(): Collection
  108.     {
  109.         return $this->metadataTramitesResponsable;
  110.     }
  111.     public function addMetadataTramitesResponsable(MetadataTramite $metadataTramitesResponsable): static
  112.     {
  113.         if (!$this->metadataTramitesResponsable->contains($metadataTramitesResponsable)) {
  114.             $this->metadataTramitesResponsable->add($metadataTramitesResponsable);
  115.             $metadataTramitesResponsable->addResponsable($this);
  116.         }
  117.         return $this;
  118.     }
  119.     public function removeMetadataTramitesResponsable(MetadataTramite $metadataTramitesResponsable): static
  120.     {
  121.         if ($this->metadataTramitesResponsable->removeElement($metadataTramitesResponsable)) {
  122.             $metadataTramitesResponsable->removeResponsable($this);
  123.         }
  124.         return $this;
  125.     }
  126.     /**
  127.      * @return Collection<int, Expediente>
  128.      */
  129.     public function getExpedientesResponsable(): Collection
  130.     {
  131.         return $this->expedientesResponsable;
  132.     }
  133.     public function addExpedientesResponsable(Expediente $expedientesResponsable): static
  134.     {
  135.         if (!$this->expedientesResponsable->contains($expedientesResponsable)) {
  136.             $this->expedientesResponsable->add($expedientesResponsable);
  137.             $expedientesResponsable->addResponsable($this);
  138.         }
  139.         return $this;
  140.     }
  141.     public function removeExpedientesResponsable(Expediente $expedientesResponsable): static
  142.     {
  143.         if ($this->expedientesResponsable->removeElement($expedientesResponsable)) {
  144.             $expedientesResponsable->removeResponsable($this);
  145.         }
  146.         return $this;
  147.     }
  148.     public function getEntidad(): ?Entidad
  149.     {
  150.         return $this->entidad;
  151.     }
  152.     public function setEntidad(?Entidad $entidad): static
  153.     {
  154.         $this->entidad $entidad;
  155.         return $this;
  156.     }
  157.     public function getDeletedAt(): ?\DateTimeInterface
  158.     {
  159.         return $this->deletedAt;
  160.     }
  161.     public function setDeletedAt(?\DateTimeInterface $deletedAt): static
  162.     {
  163.         $this->deletedAt $deletedAt;
  164.         return $this;
  165.     }
  166.     public function getSedeResponsable(): ?Sede
  167.     {
  168.         return $this->sedeResponsable;
  169.     }
  170.     public function setSedeResponsable(?Sede $sedeResponsable): static
  171.     {
  172.         // unset the owning side of the relation if necessary
  173.         if ($sedeResponsable === null && $this->sedeResponsable !== null) {
  174.             $this->sedeResponsable->setResponsable(null);
  175.         }
  176.         // set the owning side of the relation if necessary
  177.         if ($sedeResponsable !== null && $sedeResponsable->getResponsable() !== $this) {
  178.             $sedeResponsable->setResponsable($this);
  179.         }
  180.         $this->sedeResponsable $sedeResponsable;
  181.         return $this;
  182.     }
  183.     /**
  184.      * @return Collection<int, DocumentacionRegistro>
  185.      */
  186.     public function getDocumentacionRegistros(): Collection
  187.     {
  188.         return $this->documentacionRegistros;
  189.     }
  190.     public function addDocumentacionRegistro(DocumentacionRegistro $documentacionRegistro): static
  191.     {
  192.         if (!$this->documentacionRegistros->contains($documentacionRegistro)) {
  193.             $this->documentacionRegistros->add($documentacionRegistro);
  194.             $documentacionRegistro->setUser($this);
  195.         }
  196.         return $this;
  197.     }
  198.     public function removeDocumentacionRegistro(DocumentacionRegistro $documentacionRegistro): static
  199.     {
  200.         if ($this->documentacionRegistros->removeElement($documentacionRegistro)) {
  201.             // set the owning side to null (unless already changed)
  202.             if ($documentacionRegistro->getUser() === $this) {
  203.                 $documentacionRegistro->setUser(null);
  204.             }
  205.         }
  206.         return $this;
  207.     }
  208. }