src/Domain/Entity/Estado.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Domain\Entity;
  3. use App\Shared\Domain\Interfaces\EstadoInterface;
  4. use DateTimeInterface;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Symfony\Component\Uid\Uuid;
  10. class Estado implements EstadoInterface
  11. {
  12.     private $id;
  13.     private $key;
  14.     private $nombre;
  15.     private $color;
  16.     private $icono;
  17.     private $orden;
  18.     private $descripcion;
  19.     private ?DateTimeInterface $createdAt null;
  20.     private ?DateTimeInterface $updatedAt null;
  21.     private ?Entidad $entidad null;
  22.     private ?\DateTimeInterface $deletedAt null;
  23.     private Collection $metadataExpedientes;
  24.     public function __construct()
  25.     {
  26.         $this->metadataExpedientes = new ArrayCollection();
  27.     }
  28.     public function __toString(): string
  29.     {
  30.         return $this->getKey()??'';
  31.     }
  32.     public function getKey(): string
  33.     {
  34.         return $this->key;
  35.     }
  36.     public function setKey(string $key): static
  37.     {
  38.         $this->key $key;
  39.         return $this;
  40.     }
  41.     public function getNombre(): string
  42.     {
  43.         return $this->nombre;
  44.     }
  45.     public function setNombre(?string $nombre): static
  46.     {
  47.         $this->nombre $nombre;
  48.         return $this;
  49.     }
  50.     public function getColor(): ?string
  51.     {
  52.         return $this->color;
  53.     }
  54.     public function setColor(?string $color): static
  55.     {
  56.         $this->color $color;
  57.         return $this;
  58.     }
  59.     public function getIcono(): ?string
  60.     {
  61.         return $this->icono;
  62.     }
  63.     public function setIcono(?string $icono): static
  64.     {
  65.         $this->icono $icono;
  66.         return $this;
  67.     }
  68.     public function getOrden(): ?int
  69.     {
  70.         return $this->orden;
  71.     }
  72.     public function setOrden(?int $orden): static
  73.     {
  74.         $this->orden $orden;
  75.         return $this;
  76.     }
  77.     public function getId(): ?Uuid
  78.     {
  79.         return $this->id;
  80.     }
  81.     public function getCreatedAt(): ?DateTimeInterface
  82.     {
  83.         return $this->createdAt;
  84.     }
  85.     public function setCreatedAt(DateTimeInterface $createdAt): static
  86.     {
  87.         $this->createdAt $createdAt;
  88.         return $this;
  89.     }
  90.     public function getUpdatedAt(): ?DateTimeInterface
  91.     {
  92.         return $this->updatedAt;
  93.     }
  94.     public function setUpdatedAt(DateTimeInterface $updatedAt): static
  95.     {
  96.         $this->updatedAt $updatedAt;
  97.         return $this;
  98.     }
  99.     public function getEntidad(): ?Entidad
  100.     {
  101.         return $this->entidad;
  102.     }
  103.     public function setEntidad(?Entidad $entidad): static
  104.     {
  105.         $this->entidad $entidad;
  106.         return $this;
  107.     }
  108.     public function getDeletedAt(): ?\DateTimeInterface
  109.     {
  110.         return $this->deletedAt;
  111.     }
  112.     public function setDeletedAt(?\DateTimeInterface $deletedAt): static
  113.     {
  114.         $this->deletedAt $deletedAt;
  115.         return $this;
  116.     }
  117.     /**
  118.      * @return Collection<int, MetadataExpediente>
  119.      */
  120.     public function getMetadataExpedientes(): Collection
  121.     {
  122.         return $this->metadataExpedientes;
  123.     }
  124.     public function addMetadataExpediente(MetadataExpediente $metadataExpediente): static
  125.     {
  126.         if (!$this->metadataExpedientes->contains($metadataExpediente)) {
  127.             $this->metadataExpedientes->add($metadataExpediente);
  128.             $metadataExpediente->addEstado($this);
  129.         }
  130.         return $this;
  131.     }
  132.     public function removeMetadataExpediente(MetadataExpediente $metadataExpediente): static
  133.     {
  134.         if ($this->metadataExpedientes->removeElement($metadataExpediente)) {
  135.             $metadataExpediente->removeEstado($this);
  136.         }
  137.         return $this;
  138.     }
  139.     public function getDescripcion(): ?string
  140.     {
  141.         return $this->descripcion;
  142.     }
  143.     public function setDescripcion(?string $descripcion): static
  144.     {
  145.         $this->descripcion $descripcion;
  146.         return $this;
  147.     }
  148. }//class