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