src/Entity/ParMotivoJuridico.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParMotivoJuridicoRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassParMotivoJuridicoRepository::class)]
  8. class ParMotivoJuridico
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $nombre null;
  16.     #[ORM\ManyToOne(inversedBy'motivoJuridico')]
  17.     private ?ParProceso $proceso null;
  18.     #[ORM\ManyToOne(inversedBy'motivoJuridico')]
  19.     private ?ParEstado $estado null;
  20.     #[ORM\ManyToMany(targetEntityJurOperacionSospechosa::class, mappedBy'motivoJuridico')]
  21.     private Collection $operacionSospechosa;
  22.     public function __construct()
  23.     {
  24.         $this->operacionSospechosa = new ArrayCollection();
  25.     }
  26.     public function __toString() {
  27.         return $this->getNombre();
  28.     }
  29.     public function getId(): ?int
  30.     {
  31.         return $this->id;
  32.     }
  33.     public function getNombre(): ?string
  34.     {
  35.         return $this->nombre;
  36.     }
  37.     public function setNombre(string $nombre): static
  38.     {
  39.         $this->nombre $nombre;
  40.         return $this;
  41.     }
  42.     public function getProceso(): ?ParProceso
  43.     {
  44.         return $this->proceso;
  45.     }
  46.     public function setProceso(?ParProceso $proceso): static
  47.     {
  48.         $this->proceso $proceso;
  49.         return $this;
  50.     }
  51.     public function getEstado(): ?ParEstado
  52.     {
  53.         return $this->estado;
  54.     }
  55.     public function setEstado(?ParEstado $estado): static
  56.     {
  57.         $this->estado $estado;
  58.         return $this;
  59.     }
  60.     /**
  61.      * @return Collection<int, JurOperacionSospechosa>
  62.      */
  63.     public function getOperacionSospechosa(): Collection
  64.     {
  65.         return $this->operacionSospechosa;
  66.     }
  67.     public function addOperacionSospechosa(JurOperacionSospechosa $operacionSospechosa): static
  68.     {
  69.         if (!$this->operacionSospechosa->contains($operacionSospechosa)) {
  70.             $this->operacionSospechosa->add($operacionSospechosa);
  71.             $operacionSospechosa->addMotivoJuridico($this);
  72.         }
  73.         return $this;
  74.     }
  75.     public function removeOperacionSospechosa(JurOperacionSospechosa $operacionSospechosa): static
  76.     {
  77.         if ($this->operacionSospechosa->removeElement($operacionSospechosa)) {
  78.             $operacionSospechosa->removeMotivoJuridico($this);
  79.         }
  80.         return $this;
  81.     }
  82. }