src/Entity/ParSubConceptoNomina.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParSubConceptoNominaRepository;
  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(repositoryClassParSubConceptoNominaRepository::class)]
  9. class ParSubConceptoNomina
  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'subConceptoNomina')]
  26.     private ?ParConceptoNomina $conceptoNomina null;
  27.     #[ORM\ManyToMany(targetEntityGHNovedadNomina::class, mappedBy'subConcepto')]
  28.     private Collection $gHNovedadNominas;
  29.     public function __construct()
  30.     {
  31.         $this->gHNovedadNominas = new ArrayCollection();
  32.     }
  33.     
  34.     public function __toString() {
  35.         return $this->getNombre();
  36.     }
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  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 getCreateAt(): ?\DateTimeInterface
  51.     {
  52.         return $this->createAt;
  53.     }
  54.     public function setCreateAt(\DateTimeInterface $createAt): static
  55.     {
  56.         $this->createAt $createAt;
  57.         return $this;
  58.     }
  59.     public function getCreateUser(): ?string
  60.     {
  61.         return $this->createUser;
  62.     }
  63.     public function setCreateUser(string $createUser): static
  64.     {
  65.         $this->createUser $createUser;
  66.         return $this;
  67.     }
  68.     public function getUpdateAt(): ?\DateTimeInterface
  69.     {
  70.         return $this->updateAt;
  71.     }
  72.     public function setUpdateAt(\DateTimeInterface $updateAt): static
  73.     {
  74.         $this->updateAt $updateAt;
  75.         return $this;
  76.     }
  77.     public function getUpdateUser(): ?string
  78.     {
  79.         return $this->updateUser;
  80.     }
  81.     public function setUpdateUser(string $updateUser): static
  82.     {
  83.         $this->updateUser $updateUser;
  84.         return $this;
  85.     }
  86.     public function getConceptoNomina(): ?ParConceptoNomina
  87.     {
  88.         return $this->conceptoNomina;
  89.     }
  90.     public function setConceptoNomina(?ParConceptoNomina $conceptoNomina): static
  91.     {
  92.         $this->conceptoNomina $conceptoNomina;
  93.         return $this;
  94.     }
  95.     /**
  96.      * @return Collection<int, GHNovedadNomina>
  97.      */
  98.     public function getGHNovedadNominas(): Collection
  99.     {
  100.         return $this->gHNovedadNominas;
  101.     }
  102.     public function addGHNovedadNomina(GHNovedadNomina $gHNovedadNomina): static
  103.     {
  104.         if (!$this->gHNovedadNominas->contains($gHNovedadNomina)) {
  105.             $this->gHNovedadNominas->add($gHNovedadNomina);
  106.             $gHNovedadNomina->addSubConcepto($this);
  107.         }
  108.         return $this;
  109.     }
  110.     public function removeGHNovedadNomina(GHNovedadNomina $gHNovedadNomina): static
  111.     {
  112.         if ($this->gHNovedadNominas->removeElement($gHNovedadNomina)) {
  113.             $gHNovedadNomina->removeSubConcepto($this);
  114.         }
  115.         return $this;
  116.     }
  117.   
  118. }