src/Entity/ParBanco.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParBancoRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassParBancoRepository::class)]
  8. class ParBanco
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length100)]
  15.     private ?string $nombre null;
  16.     #[ORM\Column(length20)]
  17.     private ?string $nit null;
  18.     #[ORM\ManyToOne(inversedBy'banco')]
  19.     private ?ParEstado $estado null;
  20.     #[ORM\OneToMany(mappedBy'banco'targetEntityGHRetiroCesantias::class)]
  21.     private Collection $retiroCesantias;
  22.     public function __construct()
  23.     {
  24.         $this->retiroCesantias = new ArrayCollection();
  25.     }
  26.     
  27.     public function __toString() {
  28.         return $this->getNombre();
  29.     }
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getNombre(): ?string
  35.     {
  36.         return $this->nombre;
  37.     }
  38.     public function setNombre(string $nombre): static
  39.     {
  40.         $this->nombre $nombre;
  41.         return $this;
  42.     }
  43.     public function getNit(): ?string
  44.     {
  45.         return $this->nit;
  46.     }
  47.     public function setNit(string $nit): static
  48.     {
  49.         $this->nit $nit;
  50.         return $this;
  51.     }
  52.     public function getEstado(): ?ParEstado
  53.     {
  54.         return $this->estado;
  55.     }
  56.     public function setEstado(?ParEstado $estado): static
  57.     {
  58.         $this->estado $estado;
  59.         return $this;
  60.     }
  61.     /**
  62.      * @return Collection<int, GHRetiroCesantias>
  63.      */
  64.     public function getRetiroCesantias(): Collection
  65.     {
  66.         return $this->retiroCesantias;
  67.     }
  68.     public function addRetiroCesantia(GHRetiroCesantias $retiroCesantias): static
  69.     {
  70.         if (!$this->retiroCesantias->contains($retiroCesantias)) {
  71.             $this->retiroCesantias->add($retiroCesantias);
  72.             $retiroCesantias->setBanco($this);
  73.         }
  74.         return $this;
  75.     }
  76.     public function removeRetiroCesantia(GHRetiroCesantias $retiroCesantias): static
  77.     {
  78.         if ($this->retiroCesantias->removeElement($retiroCesantias)) {
  79.             // set the owning side to null (unless already changed)
  80.             if ($retiroCesantias->getBanco() === $this) {
  81.                 $retiroCesantias->setBanco(null);
  82.             }
  83.         }
  84.         return $this;
  85.     }
  86. }