<?php
namespace App\Entity;
use App\Repository\ComGestionContactoComercialRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ComGestionContactoComercialRepository::class)]
class ComGestionContactoComercial
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $fechaGestion = null;
#[ORM\ManyToMany(targetEntity: ComInformacionContacto::class)]
private Collection $contactoCliente;
#[ORM\Column]
private array $detalleGestion = [];
#[ORM\Column(length: 255, nullable: true)]
private ?string $comentarioGestion = null;
#[ORM\Column(length: 255)]
private ?string $resultadoContacto = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $fechaSeguimiento = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $detalleSeguimiento = null;
#[ORM\ManyToMany(targetEntity: TerEmpresa::class)]
private Collection $serviciosInteres;
#[ORM\OneToMany(mappedBy: 'documentosClienteGestionComercial', targetEntity: ComDocumentosCliente::class)]
private Collection $documentosClienteGestionComercial;
#[ORM\OneToMany(mappedBy: 'gestionContactoComercial', targetEntity: ComHistoricoGestionContactoComercial::class)]
private Collection $historicoGestionComercial;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $createAt = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $updateAt = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $createUser = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $updateUser = null;
#[ORM\ManyToOne(inversedBy: 'comGestionContactoComercials')]
private ?TerEmpresaCliente $comProspectoGestionContacto = null;
public function __construct()
{
$this->documentosClienteGestionComercial = new ArrayCollection();
$this->serviciosInteres = new ArrayCollection(); // ¡importante!
$this->contactoCliente = new ArrayCollection();
$this->historicoGestionComercial = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getFechaGestion(): ?\DateTimeInterface
{
return $this->fechaGestion;
}
public function setFechaGestion(\DateTimeInterface $fechaGestion): static
{
$this->fechaGestion = $fechaGestion;
return $this;
}
public function getContactoCliente(): Collection
{
return $this->contactoCliente;
}
public function addContactoCliente(ComInformacionContacto $contacto): static
{
if (!$this->contactoCliente->contains($contacto)) {
$this->contactoCliente->add($contacto);
}
return $this;
}
public function removeContactoCliente(ComInformacionContacto $contacto): static
{
$this->contactoCliente->removeElement($contacto);
return $this;
}
public function getDetalleGestion(): array
{
return $this->detalleGestion;
}
public function setDetalleGestion(array $detalleGestion): static
{
$this->detalleGestion = $detalleGestion;
return $this;
}
public function getComentarioGestion(): ?string
{
return $this->comentarioGestion;
}
public function setComentarioGestion(?string $comentarioGestion): static
{
$this->comentarioGestion = $comentarioGestion;
return $this;
}
public function getResultadoContacto(): ?string
{
return $this->resultadoContacto;
}
public function setResultadoContacto(string $resultadoContacto): static
{
$this->resultadoContacto = $resultadoContacto;
return $this;
}
public function getFechaSeguimiento(): ?\DateTimeInterface
{
return $this->fechaSeguimiento;
}
public function setFechaSeguimiento(?\DateTimeInterface $fechaSeguimiento): static
{
$this->fechaSeguimiento = $fechaSeguimiento;
return $this;
}
public function getDetalleSeguimiento(): ?string
{
return $this->detalleSeguimiento;
}
public function setDetalleSeguimiento(?string $detalleSeguimiento): static
{
$this->detalleSeguimiento = $detalleSeguimiento;
return $this;
}
public function getServiciosInteres(): Collection
{
return $this->serviciosInteres;
}
public function addServiciosInteres(TerEmpresa $empresa): static
{
if (!$this->serviciosInteres->contains($empresa)) {
$this->serviciosInteres->add($empresa);
}
return $this;
}
public function removeServiciosInteres(TerEmpresa $empresa): static
{
$this->serviciosInteres->removeElement($empresa);
return $this;
}
/**
* @return Collection<int, ComDocumentosCliente>
*/
public function getDocumentosClienteGestionComercial(): Collection
{
return $this->documentosClienteGestionComercial;
}
public function addDocumentosClienteGestionComercial(ComDocumentosCliente $documentosClienteGestionComercial): static
{
if (!$this->documentosClienteGestionComercial->contains($documentosClienteGestionComercial)) {
$this->documentosClienteGestionComercial->add($documentosClienteGestionComercial);
$documentosClienteGestionComercial->setDocumentosClienteGestionComercial($this);
}
return $this;
}
public function removeDocumentosClienteGestionComercial(ComDocumentosCliente $documentosClienteGestionComercial): static
{
if ($this->documentosClienteGestionComercial->removeElement($documentosClienteGestionComercial)) {
// set the owning side to null (unless already changed)
if ($documentosClienteGestionComercial->getDocumentosClienteGestionComercial() === $this) {
$documentosClienteGestionComercial->setDocumentosClienteGestionComercial(null);
}
}
return $this;
}
/**
* @return Collection<int, ComHistoricoGestionContactoComercial>
*/
public function getHistoricoGestionComercial(): Collection
{
return $this->historicoGestionComercial;
}
public function addHistoricoGestionComercial(ComHistoricoGestionContactoComercial $historicoGestionComercial): static
{
if (!$this->historicoGestionComercial->contains($historicoGestionComercial)) {
$this->historicoGestionComercial->add($historicoGestionComercial);
$historicoGestionComercial->setGestionContactoComercial($this);
}
return $this;
}
public function removeHistoricoGestionComercial(ComHistoricoGestionContactoComercial $historicoGestionComercial): static
{
if ($this->historicoGestionComercial->removeElement($historicoGestionComercial)) {
// set the owning side to null (unless already changed)
if ($historicoGestionComercial->getGestionContactoComercial() === $this) {
$historicoGestionComercial->setGestionContactoComercial(null);
}
}
return $this;
}
public function getCreateAt(): ?\DateTimeInterface
{
return $this->createAt;
}
public function setCreateAt(?\DateTimeInterface $createAt): static
{
$this->createAt = $createAt;
return $this;
}
public function getUpdateAt(): ?\DateTimeInterface
{
return $this->updateAt;
}
public function setUpdateAt(?\DateTimeInterface $updateAt): static
{
$this->updateAt = $updateAt;
return $this;
}
public function getCreateUser(): ?string
{
return $this->createUser;
}
public function setCreateUser(?string $createUser): static
{
$this->createUser = $createUser;
return $this;
}
public function getUpdateUser(): ?string
{
return $this->updateUser;
}
public function setUpdateUser(?string $updateUser): static
{
$this->updateUser = $updateUser;
return $this;
}
public function getComProspectoGestionContacto(): ?TerEmpresaCliente
{
return $this->comProspectoGestionContacto;
}
public function setComProspectoGestionContacto(?TerEmpresaCliente $comProspectoGestionContacto): static
{
$this->comProspectoGestionContacto = $comProspectoGestionContacto;
return $this;
}
}