<?php
namespace App\Entity;
use App\Repository\JurProcesoRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: JurProcesoRepository::class)]
class JurProceso {
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'proceso')]
private ?TerEmpresa $empresaFilial = null;
#[ORM\ManyToOne(inversedBy: 'proceso')]
private ?ParRama $rama = null;
#[ORM\Column(length: 255)]
private ?string $tipo = null;
#[ORM\Column(length: 255)]
private ?string $contraparte = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $fechaNotificacion = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $archivoNotificacion = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $fechaVencimiento = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $motivo = null;
#[ORM\Column(type: Types::DECIMAL, precision: 11, scale: 2, nullable: true)]
private ?string $monto = null;
#[ORM\ManyToOne(inversedBy: 'procesoJuridico')]
private ?ParEstado $estado = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $createAt = null;
#[ORM\Column(length: 50)]
private ?string $createUser = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $updateAt = null;
#[ORM\Column(length: 50)]
private ?string $updateUser = null;
#[ORM\OneToMany(mappedBy: 'proceso', targetEntity: JurRespuestaProceso::class)]
private Collection $respuestaProceso;
#[ORM\ManyToOne(inversedBy: 'procesoJuridico')]
private ?TerEmpresaCliente $empresaCliente = null;
#[ORM\ManyToOne(inversedBy: 'procesoJuridico')]
private ?TerAsociado $empresaAsociado = null;
#[ORM\OneToMany(mappedBy: 'proceso', targetEntity: JurProcesoEvidencia::class)]
private Collection $procesoEvidencia;
#[ORM\ManyToOne(inversedBy: 'procesosJuridico')]
private ?TerSedeEmpresa $sede = null;
#[ORM\ManyToOne(inversedBy: 'proceso')]
private ?ParTipificacionJuridica $tipificacionJuridica = null;
#[ORM\ManyToOne(targetEntity: self::class, inversedBy: 'procesosAnteriores')]
private ?self $procesoAnterior = null;
#[ORM\OneToMany(mappedBy: 'procesoAnterior', targetEntity: self::class)]
private Collection $procesosAnteriores;
#[ORM\Column(nullable: true)]
private ?bool $vinculoProcesoAnterior = null;
#[ORM\Column(nullable: true)]
private ?bool $accionCorrectiva = null;
public function __toString(): string {
$rama = $this->getRama() != null ? $this->getRama()->getNombre() : "";
$fecNot = $this->getFechaNotificacion() != null ? $this->getFechaNotificacion()->format('Y-m-d') : "";
// return "{$this->getId()} - {$rama} - {$fecNot}";
return $this->getTipo();
}
public function __construct() {
$this->respuestaProceso = new ArrayCollection();
$this->procesoEvidencia = new ArrayCollection();
$this->procesosAnteriores = new ArrayCollection();
}
public function getId(): ?int {
return $this->id;
}
public function getEmpresaFilial(): ?TerEmpresa {
return $this->empresaFilial;
}
public function setEmpresaFilial(?TerEmpresa $empresaFilial): static {
$this->empresaFilial = $empresaFilial;
return $this;
}
public function getRama(): ?ParRama {
return $this->rama;
}
public function setRama(?ParRama $rama): static {
$this->rama = $rama;
return $this;
}
public function getTipo(): ?string {
return $this->tipo;
}
public function setTipo(string $tipo): static {
$this->tipo = $tipo;
return $this;
}
public function getContraparte(): ?string {
return $this->contraparte;
}
public function setContraparte(string $contraparte): static {
$this->contraparte = $contraparte;
return $this;
}
public function getFechaNotificacion(): ?\DateTimeInterface {
return $this->fechaNotificacion;
}
public function setFechaNotificacion(\DateTimeInterface $fechaNotificacion): static {
$this->fechaNotificacion = $fechaNotificacion;
return $this;
}
public function getArchivoNotificacion(): ?string {
return $this->archivoNotificacion;
}
public function setArchivoNotificacion(string $archivoNotificacion): static {
$this->archivoNotificacion = $archivoNotificacion;
return $this;
}
public function getFechaVencimiento(): ?\DateTimeInterface {
return $this->fechaVencimiento;
}
public function setFechaVencimiento(\DateTimeInterface $fechaVencimiento): static {
$this->fechaVencimiento = $fechaVencimiento;
return $this;
}
public function getMotivo(): ?string {
return $this->motivo;
}
public function setMotivo(string $motivo): static {
$this->motivo = $motivo;
return $this;
}
public function getMonto(): ?string {
return $this->monto;
}
public function setMonto(string $monto): static {
$this->monto = $monto;
return $this;
}
public function getEstado(): ?ParEstado {
return $this->estado;
}
public function setEstado(?ParEstado $estado): static {
$this->estado = $estado;
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;
}
/**
* @return Collection<int, JurRespuestaProceso>
*/
public function getRespuestaProceso(): Collection {
return $this->respuestaProceso;
}
public function addRespuestaProceso(JurRespuestaProceso $respuestaProceso): static {
if (!$this->respuestaProceso->contains($respuestaProceso)) {
$this->respuestaProceso->add($respuestaProceso);
$respuestaProceso->setProceso($this);
}
return $this;
}
public function removeRespuestaProceso(JurRespuestaProceso $respuestaProceso): static {
if ($this->respuestaProceso->removeElement($respuestaProceso)) {
// set the owning side to null (unless already changed)
if ($respuestaProceso->getProceso() === $this) {
$respuestaProceso->setProceso(null);
}
}
return $this;
}
public function getEmpresaCliente(): ?TerEmpresaCliente {
return $this->empresaCliente;
}
public function setEmpresaCliente(?TerEmpresaCliente $empresaCliente): static {
$this->empresaCliente = $empresaCliente;
return $this;
}
public function getEmpresaAsociado(): ?TerAsociado {
return $this->empresaAsociado;
}
public function setEmpresaAsociado(?TerAsociado $empresaAsociado): static {
$this->empresaAsociado = $empresaAsociado;
return $this;
}
/**
* @return Collection<int, JurProcesoEvidencia>
*/
public function getProcesoEvidencia(): Collection {
return $this->procesoEvidencia;
}
public function addProcesoEvidencium(JurProcesoEvidencia $procesoEvidencium): static {
if (!$this->procesoEvidencia->contains($procesoEvidencium)) {
$this->procesoEvidencia->add($procesoEvidencium);
$procesoEvidencium->setProceso($this);
}
return $this;
}
public function removeProcesoEvidencium(JurProcesoEvidencia $procesoEvidencium): static {
if ($this->procesoEvidencia->removeElement($procesoEvidencium)) {
// set the owning side to null (unless already changed)
if ($procesoEvidencium->getProceso() === $this) {
$procesoEvidencium->setProceso(null);
}
}
return $this;
}
public function getSede(): ?TerSedeEmpresa {
return $this->sede;
}
public function setSede(?TerSedeEmpresa $sede): static {
$this->sede = $sede;
return $this;
}
public function getTipificacionJuridica(): ?ParTipificacionJuridica {
return $this->tipificacionJuridica;
}
public function setTipificacionJuridica(?ParTipificacionJuridica $tipificacionJuridica): static {
$this->tipificacionJuridica = $tipificacionJuridica;
return $this;
}
public function getProcesoAnterior(): ?self {
return $this->procesoAnterior;
}
public function setProcesoAnterior(?self $procesoAnterior): static {
$this->procesoAnterior = $procesoAnterior;
return $this;
}
/**
* @return Collection<int, self>
*/
public function getProcesosAnteriores(): Collection {
return $this->procesosAnteriores;
}
public function addProcesosAnteriore(self $procesosAnteriore): static {
if (!$this->procesosAnteriores->contains($procesosAnteriore)) {
$this->procesosAnteriores->add($procesosAnteriore);
$procesosAnteriore->setProcesoAnterior($this);
}
return $this;
}
public function removeProcesosAnteriore(self $procesosAnteriore): static {
if ($this->procesosAnteriores->removeElement($procesosAnteriore)) {
// set the owning side to null (unless already changed)
if ($procesosAnteriore->getProcesoAnterior() === $this) {
$procesosAnteriore->setProcesoAnterior(null);
}
}
return $this;
}
public function isVinculoProcesoAnterior(): ?bool {
return $this->vinculoProcesoAnterior;
}
public function setVinculoProcesoAnterior(?bool $vinculoProcesoAnterior): static {
$this->vinculoProcesoAnterior = $vinculoProcesoAnterior;
return $this;
}
public function isAccionCorrectiva(): ?bool
{
return $this->accionCorrectiva;
}
public function setAccionCorrectiva(?bool $accionCorrectiva): static
{
$this->accionCorrectiva = $accionCorrectiva;
return $this;
}
}