<?php
namespace App\Entity;
use App\Repository\RFPaqueteRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'rf_paquete')]
#[ORM\Entity(repositoryClass: RFPaqueteRepository::class)]
class RFPaquete
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'paquete')]
private ?ParTipoPaquete $tipoPaquete = null;
#[ORM\ManyToOne(inversedBy: 'paquete')]
private ?ParEstado $estado = null;
#[ORM\ManyToOne(inversedBy: 'paqueteRecepciona')]
private ?TerPersona $personaRecibe = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $createAt = null;
#[ORM\Column(length: 255)]
private ?string $createUser = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $updateAt = null;
#[ORM\Column(length: 255)]
private ?string $updateUser = null;
#[ORM\Column(length: 150, nullable: true)]
private ?string $numeroGuia = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $remitente = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $ciudadOrigen = null;
#[ORM\ManyToOne(inversedBy: 'paqueteDestinatario')]
private ?TerPersona $personaDestinatario = null;
#[ORM\Column(type: Types::JSON, nullable: true)]
private ?array $evidencia = [];
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $observaciones = null;
#[ORM\Column(nullable: true)]
private ?bool $destapado = null;
#[ORM\Column(nullable: true)]
private ?bool $malEstado = null;
#[ORM\Column(nullable: true)]
private ?bool $sinMarcar = null;
#[ORM\ManyToOne(inversedBy: 'paqueteReclama')]
private ?TerPersona $personaReclama = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $firma = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $fechaFirma = null;
#[ORM\ManyToOne(inversedBy: 'paqueteEntrega')]
private ?TerPersona $personaEntrega = null;
#[ORM\ManyToOne(inversedBy: 'paquete')]
private ?ParFuentePaquete $fuente = null;
#[ORM\OneToMany(mappedBy: 'paquete', targetEntity: RFPaqueteEvidencia::class)]
private Collection $paqueteEvidencias;
#[ORM\ManyToMany(targetEntity: ParEstadoPaquete::class, inversedBy: 'paquetes')]
private Collection $EstadoPaquete;
#[ORM\Column(length: 255, nullable: true)]
private ?string $cantidadPaquete = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $cantidadSobre = null;
public function __construct()
{
$this->paqueteEvidencias = new ArrayCollection();
$this->EstadoPaquete = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTipoPaquete(): ?ParTipoPaquete
{
return $this->tipoPaquete;
}
public function setTipoPaquete(?ParTipoPaquete $tipoPaquete): static
{
$this->tipoPaquete = $tipoPaquete;
return $this;
}
public function getRFPaquete(): ?ParTipoPaquete
{
return $this->RFPaquete;
}
public function setRFPaquete(?ParTipoPaquete $RFPaquete): static
{
$this->RFPaquete = $RFPaquete;
return $this;
}
public function getEstado(): ?ParEstado
{
return $this->estado;
}
public function setEstado(?ParEstado $estado): static
{
$this->estado = $estado;
return $this;
}
public function getPersonaRecibe(): ?TerPersona
{
return $this->personaRecibe;
}
public function setPersonaRecibe(?TerPersona $personaRecibe): static
{
$this->personaRecibe = $personaRecibe;
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 getNumeroGuia(): ?string
{
return $this->numeroGuia;
}
public function setNumeroGuia(?string $numeroGuia): static
{
$this->numeroGuia = $numeroGuia;
return $this;
}
public function getRemitente(): ?string
{
return $this->remitente;
}
public function setRemitente(?string $remitente): void
{
$this->remitente = $remitente;
}
public function getCiudadOrigen(): ?string
{
return $this->ciudadOrigen;
}
public function setCiudadOrigen(?string $ciudadOrigen): static
{
$this->ciudadOrigen = $ciudadOrigen;
return $this;
}
public function getPersonaDestinatario(): ?TerPersona
{
return $this->personaDestinatario;
}
public function setPersonaDestinatario(?TerPersona $personaDestinatario): static
{
$this->personaDestinatario = $personaDestinatario;
return $this;
}
public function getEvidencia(): ?array
{
return $this->evidencia;
}
public function setEvidencia(?array $evidencia): static
{
$this->evidencia = $evidencia;
return $this;
}
public function addEvidencia(string $archivo): static
{
$this->evidencia[] = $archivo;
return $this;
}
public function removeEvidencia(string $archivo): static
{
if (($key = array_search($archivo, $this->evidencia)) !== false) {
unset($this->evidencia[$key]);
$this->evidencia = array_values($this->evidencia);
}
return $this;
}
public function getObservaciones(): ?string
{
return $this->observaciones;
}
public function setObservaciones(?string $observaciones): static
{
$this->observaciones = $observaciones;
return $this;
}
public function isDestapado(): ?bool
{
return $this->destapado;
}
public function setDestapado(?bool $destapado): static
{
$this->destapado = $destapado;
return $this;
}
public function isMalEstado(): ?bool
{
return $this->malEstado;
}
public function setMalEstado(?bool $malEstado): static
{
$this->malEstado = $malEstado;
return $this;
}
public function isSinMarcar(): ?bool
{
return $this->sinMarcar;
}
public function setSinMarcar(?bool $sinMarcar): static
{
$this->sinMarcar = $sinMarcar;
return $this;
}
public function getPersonaReclama(): ?TerPersona
{
return $this->personaReclama;
}
public function setPersonaReclama(?TerPersona $personaReclama): static
{
$this->personaReclama = $personaReclama;
return $this;
}
public function getFirma(): ?string
{
return $this->firma;
}
public function setFirma(?string $firma): static
{
$this->firma = $firma;
return $this;
}
public function getFechaFirma(): ?\DateTimeInterface
{
return $this->fechaFirma;
}
public function setFechaFirma(?\DateTimeInterface $fechaFirma): static
{
$this->fechaFirma = $fechaFirma;
return $this;
}
public function getPersonaEntrega(): ?TerPersona
{
return $this->personaEntrega;
}
public function setPersonaEntrega(?TerPersona $personaEntrega): static
{
$this->personaEntrega = $personaEntrega;
return $this;
}
public function getFuente(): ?ParFuentePaquete
{
return $this->fuente;
}
public function setFuente(?ParFuentePaquete $fuente): static
{
$this->fuente = $fuente;
return $this;
}
/**
* @return Collection<int, RFPaqueteEvidencia>
*/
public function getPaqueteEvidencias(): Collection
{
return $this->paqueteEvidencias;
}
public function addPaqueteEvidencia(RFPaqueteEvidencia $paqueteEvidencia): static
{
if (!$this->paqueteEvidencias->contains($paqueteEvidencia)) {
$this->paqueteEvidencias->add($paqueteEvidencia);
$paqueteEvidencia->setPaquete($this);
}
return $this;
}
public function removePaqueteEvidencia(RFPaqueteEvidencia $paqueteEvidencia): static
{
if ($this->paqueteEvidencias->removeElement($paqueteEvidencia)) {
// set the owning side to null (unless already changed)
if ($paqueteEvidencia->getPaquete() === $this) {
$paqueteEvidencia->setPaquete(null);
}
}
return $this;
}
/**
* @return Collection<int, ParEstadoPaquete>
*/
public function getEstadoPaquete(): Collection
{
return $this->EstadoPaquete;
}
public function addEstadoPaquete(ParEstadoPaquete $estadoPaquete): static
{
if (!$this->EstadoPaquete->contains($estadoPaquete)) {
$this->EstadoPaquete->add($estadoPaquete);
}
return $this;
}
public function removeEstadoPaquete(ParEstadoPaquete $estadoPaquete): static
{
$this->EstadoPaquete->removeElement($estadoPaquete);
return $this;
}
public function getCantidadPaquete(): ?string
{
return $this->cantidadPaquete;
}
public function setCantidadPaquete(?string $cantidadPaquete): static
{
$this->cantidadPaquete = $cantidadPaquete;
return $this;
}
public function getCantidadSobre(): ?string
{
return $this->cantidadSobre;
}
public function setCantidadSobre(?string $cantidadSobre): static
{
$this->cantidadSobre = $cantidadSobre;
return $this;
}
}