<?php
namespace App\Entity;
use App\Repository\ParSubprocesoRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ParSubprocesoRepository::class)]
class ParSubproceso
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $subproceso = null;
#[ORM\OneToMany(mappedBy: 'subprocesoId', targetEntity: GHPerfilCargo::class)]
private Collection $idPerfilCargo;
#[ORM\ManyToOne(inversedBy: 'subproceso')]
private ?ParProceso $proceso = null;
#[ORM\OneToMany(mappedBy: 'subProceso', targetEntity: GHGrupoTrabajo::class)]
private Collection $grupoTrabajo;
#[ORM\OneToMany(mappedBy: 'subProceso', targetEntity: RFTablaRetencion::class)]
private Collection $tablaRetenciones;
#[ORM\OneToMany(mappedBy: 'subProceso', targetEntity: GHMatrizEntrenamientoProceso::class)]
private Collection $gHMatrizEntrenamientoProcesos;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $createAt = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $createUser = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $updateAt = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $updateUser = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $codigoTR = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $DocumentosTR = null;
public function __construct()
{
$this->idPerfilCargo = new ArrayCollection();
$this->grupoTrabajo = new ArrayCollection();
$this->tablaRetenciones = new ArrayCollection();
$this->gHMatrizEntrenamientoProcesos = new ArrayCollection();
}
public function __toString() {
return $this->getSubproceso();
}
public function getId(): ?int
{
return $this->id;
}
public function getSubproceso(): ?string
{
return $this->subproceso;
}
public function setSubproceso(string $subproceso): static
{
$this->subproceso = $subproceso;
return $this;
}
/**
* @return Collection<int, GHPerfilCargo>
*/
public function getIdPerfilCargo(): Collection
{
return $this->idPerfilCargo;
}
public function addIdPerfilCargo(GHPerfilCargo $idPerfilCargo): static
{
if (!$this->idPerfilCargo->contains($idPerfilCargo)) {
$this->idPerfilCargo->add($idPerfilCargo);
$idPerfilCargo->setSubprocesoId($this);
}
return $this;
}
public function removeIdPerfilCargo(GHPerfilCargo $idPerfilCargo): static
{
if ($this->idPerfilCargo->removeElement($idPerfilCargo)) {
// set the owning side to null (unless already changed)
if ($idPerfilCargo->getSubprocesoId() === $this) {
$idPerfilCargo->setSubprocesoId(null);
}
}
return $this;
}
public function getProceso(): ?ParProceso
{
return $this->proceso;
}
public function setProceso(?ParProceso $proceso): static
{
$this->proceso = $proceso;
return $this;
}
/**
* @return Collection<int, GHGrupoTrabajo>
*/
public function getGrupoTrabajo(): Collection
{
return $this->grupoTrabajo;
}
public function addGrupoTrabajo(GHGrupoTrabajo $grupoTrabajo): static
{
if (!$this->grupoTrabajo->contains($grupoTrabajo)) {
$this->grupoTrabajo->add($grupoTrabajo);
$grupoTrabajo->setSubProceso($this);
}
return $this;
}
public function removeGrupoTrabajo(GHGrupoTrabajo $grupoTrabajo): static
{
if ($this->grupoTrabajo->removeElement($grupoTrabajo)) {
// set the owning side to null (unless already changed)
if ($grupoTrabajo->getSubProceso() === $this) {
$grupoTrabajo->setSubProceso(null);
}
}
return $this;
}
/**
* @return Collection<int, RFTablaRetencion>
*/
public function getTablaRetenciones(): Collection
{
return $this->tablaRetenciones;
}
public function addTablaRetencione(RFTablaRetencion $tablaRetencione): static
{
if (!$this->tablaRetenciones->contains($tablaRetencione)) {
$this->tablaRetenciones->add($tablaRetencione);
$tablaRetencione->setSubProceso($this);
}
return $this;
}
public function removeTablaRetencione(RFTablaRetencion $tablaRetencione): static
{
if ($this->tablaRetenciones->removeElement($tablaRetencione)) {
// set the owning side to null (unless already changed)
if ($tablaRetencione->getSubProceso() === $this) {
$tablaRetencione->setSubProceso(null);
}
}
return $this;
}
/**
* @return Collection<int, GHMatrizEntrenamientoProceso>
*/
public function getGHMatrizEntrenamientoProcesos(): Collection
{
return $this->gHMatrizEntrenamientoProcesos;
}
public function addGHMatrizEntrenamientoProceso(GHMatrizEntrenamientoProceso $gHMatrizEntrenamientoProceso): static
{
if (!$this->gHMatrizEntrenamientoProcesos->contains($gHMatrizEntrenamientoProceso)) {
$this->gHMatrizEntrenamientoProcesos->add($gHMatrizEntrenamientoProceso);
$gHMatrizEntrenamientoProceso->setSubProceso($this);
}
return $this;
}
public function removeGHMatrizEntrenamientoProceso(GHMatrizEntrenamientoProceso $gHMatrizEntrenamientoProceso): static
{
if ($this->gHMatrizEntrenamientoProcesos->removeElement($gHMatrizEntrenamientoProceso)) {
// set the owning side to null (unless already changed)
if ($gHMatrizEntrenamientoProceso->getSubProceso() === $this) {
$gHMatrizEntrenamientoProceso->setSubProceso(null);
}
}
return $this;
}
public function getCreateAt(): ?\DateTimeInterface
{
return $this->createAt;
}
public function setCreateAt(?\DateTimeInterface $createAt): static
{
$this->createAt = $createAt;
return $this;
}
public function getCreateUser(): ?string
{
return $this->createUser;
}
public function setCreateUser(?string $createUser): static
{
$this->createUser = $createUser;
return $this;
}
public function getUpdateAt(): ?\DateTimeInterface
{
return $this->updateAt;
}
public function setUpdateAt(?\DateTimeInterface $updateAt): static
{
$this->updateAt = $updateAt;
return $this;
}
public function getUpdateUser(): ?string
{
return $this->updateUser;
}
public function setUpdateUser(?string $updateUser): static
{
$this->updateUser = $updateUser;
return $this;
}
public function getCodigoTR(): ?string
{
return $this->codigoTR;
}
public function setCodigoTR(?string $codigoTR): static
{
$this->codigoTR = $codigoTR;
return $this;
}
public function getDocumentosTR(): ?string
{
return $this->DocumentosTR;
}
public function setDocumentosTR(?string $DocumentosTR): static
{
$this->DocumentosTR = $DocumentosTR;
return $this;
}
}