src/Entity/ParConceptoNomina.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParConceptoNominaRepository;
  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. #[ORM\Entity(repositoryClassParConceptoNominaRepository::class)]
  9. class ParConceptoNomina
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length150)]
  16.     private ?string $nombre null;
  17.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  18.     private ?\DateTimeInterface $createAt null;
  19.     #[ORM\Column(length50)]
  20.     private ?string $createUser null;
  21.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  22.     private ?\DateTimeInterface $updateAt null;
  23.     #[ORM\Column(length50)]
  24.     private ?string $updateUser null;
  25.     #[ORM\ManyToOne(inversedBy'conceptoNomina')]
  26.     private ?ParEstado $estado null;
  27.     #[ORM\OneToMany(mappedBy'conceptoNomina'targetEntityParSubConceptoNomina::class)]
  28.     private Collection $subConceptoNomina;
  29.     #[ORM\ManyToMany(targetEntityGHNovedadNomina::class, mappedBy'conceptoNomina')]
  30.     private Collection $novedadNomina;
  31.     public function __construct()
  32.     {
  33.         $this->subConceptoNomina = new ArrayCollection();
  34.         $this->novedadNomina = new ArrayCollection();
  35.     }
  36.     
  37.     public function __toString() {
  38.         return $this->getNombre();
  39.     }
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getNombre(): ?string
  45.     {
  46.         return $this->nombre;
  47.     }
  48.     public function setNombre(string $nombre): static
  49.     {
  50.         $this->nombre $nombre;
  51.         return $this;
  52.     }
  53.     public function getCreateAt(): ?\DateTimeInterface
  54.     {
  55.         return $this->createAt;
  56.     }
  57.     public function setCreateAt(\DateTimeInterface $createAt): static
  58.     {
  59.         $this->createAt $createAt;
  60.         return $this;
  61.     }
  62.     public function getCreateUser(): ?string
  63.     {
  64.         return $this->createUser;
  65.     }
  66.     public function setCreateUser(string $createUser): static
  67.     {
  68.         $this->createUser $createUser;
  69.         return $this;
  70.     }
  71.     public function getUpdateAt(): ?\DateTimeInterface
  72.     {
  73.         return $this->updateAt;
  74.     }
  75.     public function setUpdateAt(\DateTimeInterface $updateAt): static
  76.     {
  77.         $this->updateAt $updateAt;
  78.         return $this;
  79.     }
  80.     public function getUpdateUser(): ?string
  81.     {
  82.         return $this->updateUser;
  83.     }
  84.     public function setUpdateUser(string $updateUser): static
  85.     {
  86.         $this->updateUser $updateUser;
  87.         return $this;
  88.     }
  89.     public function getEstado(): ?ParEstado
  90.     {
  91.         return $this->estado;
  92.     }
  93.     public function setEstado(?ParEstado $estado): static
  94.     {
  95.         $this->estado $estado;
  96.         return $this;
  97.     }
  98.     /**
  99.      * @return Collection<int, ParSubConceptoNomina>
  100.      */
  101.     public function getSubConceptoNomina(): Collection
  102.     {
  103.         return $this->subConceptoNomina;
  104.     }
  105.     public function addSubConceptoNomina(ParSubConceptoNomina $subConceptoNomina): static
  106.     {
  107.         if (!$this->subConceptoNomina->contains($subConceptoNomina)) {
  108.             $this->subConceptoNomina->add($subConceptoNomina);
  109.             $subConceptoNomina->setConceptoNomina($this);
  110.         }
  111.         return $this;
  112.     }
  113.     public function removeSubConceptoNomina(ParSubConceptoNomina $subConceptoNomina): static
  114.     {
  115.         if ($this->subConceptoNomina->removeElement($subConceptoNomina)) {
  116.             // set the owning side to null (unless already changed)
  117.             if ($subConceptoNomina->getConceptoNomina() === $this) {
  118.                 $subConceptoNomina->setConceptoNomina(null);
  119.             }
  120.         }
  121.         return $this;
  122.     }
  123.     /**
  124.      * @return Collection<int, GHNovedadNomina>
  125.      */
  126.     public function getNovedadNomina(): Collection
  127.     {
  128.         return $this->novedadNomina;
  129.     }
  130.     public function addNovedadNomina(GHNovedadNomina $novedadNomina): static
  131.     {
  132.         if (!$this->novedadNomina->contains($novedadNomina)) {
  133.             $this->novedadNomina->add($novedadNomina);
  134.             $novedadNomina->addConceptoNomina($this);
  135.         }
  136.         return $this;
  137.     }
  138.     public function removeNovedadNomina(GHNovedadNomina $novedadNomina): static
  139.     {
  140.         if ($this->novedadNomina->removeElement($novedadNomina)) {
  141.             $novedadNomina->removeConceptoNomina($this);
  142.         }
  143.         return $this;
  144.     }
  145. }