<?php
namespace App\Entity;
use App\Repository\ComInformacionContactoRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ComInformacionContactoRepository::class)]
class ComInformacionContacto
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nombre = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $cargo = null;
#[ORM\Column(length: 20, nullable: true)]
private ?string $telefono = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $correo = null;
#[ORM\ManyToOne(inversedBy: 'InformacionContacto')]
private ?ComProspecto $comProspectoInformacionContacto = 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\ManyToMany(targetEntity: ComClientesTarifas::class, mappedBy: 'contactoC170Cliente')]
private Collection $comClientesTarifas;
#[ORM\ManyToOne(inversedBy: 'iformacionContacto')]
private ?TerEmpresaCliente $terEmpresaCliente = null;
#[ORM\ManyToMany(targetEntity: ComDestinoNotificacionBienvenida::class, mappedBy: 'contactoNotificacionBienvenida')]
private Collection $comDestinoNotificacionBienvenidas;
#[ORM\ManyToMany(targetEntity: ComHojaVida::class, mappedBy: 'comInformacionContacto')]
private Collection $comHojaVidas;
#[ORM\OneToMany(mappedBy: 'comInformacionContacto', targetEntity: ComMatrizContactosHojaVida::class)]
private Collection $comMatrizContactosHojaVidas;
#[ORM\OneToMany(mappedBy: 'dirigidoA', targetEntity: ComMapaComunicaciones::class)]
private Collection $comMapaComunicaciones;
#[ORM\ManyToMany(targetEntity: ComComfirmarTarifa::class, mappedBy: 'comInformacionContactoNotificacion')]
private Collection $comComfirmarTarifas;
public function __construct()
{
$this->comClientesTarifas = new ArrayCollection();
$this->comDestinoNotificacionBienvenidas = new ArrayCollection();
$this->comHojaVidas = new ArrayCollection();
$this->comMatrizContactosHojaVidas = new ArrayCollection();
$this->comMapaComunicaciones = new ArrayCollection();
$this->comComfirmarTarifas = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNombre(): ?string
{
return $this->nombre;
}
public function setNombre(?string $nombre): static
{
$this->nombre = $nombre;
return $this;
}
public function getCargo(): ?string
{
return $this->cargo;
}
public function setCargo(?string $cargo): static
{
$this->cargo = $cargo;
return $this;
}
public function getTelefono(): ?string
{
return $this->telefono;
}
public function setTelefono(?string $telefono): static
{
$this->telefono = $telefono;
return $this;
}
public function getCorreo(): ?string
{
return $this->correo;
}
public function setCorreo(?string $correo): static
{
$this->correo = $correo;
return $this;
}
public function getComProspectoInformacionContacto(): ?ComProspecto
{
return $this->comProspectoInformacionContacto;
}
public function setComProspectoInformacionContacto(?ComProspecto $comProspectoInformacionContacto): static
{
$this->comProspectoInformacionContacto = $comProspectoInformacionContacto;
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;
}
// Funcion para mostrar nombre y cargo
public function __toString(): string
{
return $this->nombre . ' - ' . $this->cargo;
}
/**
* @return Collection<int, ComClientesTarifas>
*/
public function getComClientesTarifas(): Collection
{
return $this->comClientesTarifas;
}
public function addComClientesTarifa(ComClientesTarifas $comClientesTarifa): static
{
if (!$this->comClientesTarifas->contains($comClientesTarifa)) {
$this->comClientesTarifas->add($comClientesTarifa);
$comClientesTarifa->addContactoC170Cliente($this);
}
return $this;
}
public function removeComClientesTarifa(ComClientesTarifas $comClientesTarifa): static
{
if ($this->comClientesTarifas->removeElement($comClientesTarifa)) {
$comClientesTarifa->removeContactoC170Cliente($this);
}
return $this;
}
public function getTerEmpresaCliente(): ?TerEmpresaCliente
{
return $this->terEmpresaCliente;
}
public function setTerEmpresaCliente(?TerEmpresaCliente $terEmpresaCliente): static
{
$this->terEmpresaCliente = $terEmpresaCliente;
return $this;
}
/**
* @return Collection<int, ComDestinoNotificacionBienvenida>
*/
public function getComDestinoNotificacionBienvenidas(): Collection
{
return $this->comDestinoNotificacionBienvenidas;
}
public function addComDestinoNotificacionBienvenida(ComDestinoNotificacionBienvenida $comDestinoNotificacionBienvenida): static
{
if (!$this->comDestinoNotificacionBienvenidas->contains($comDestinoNotificacionBienvenida)) {
$this->comDestinoNotificacionBienvenidas->add($comDestinoNotificacionBienvenida);
$comDestinoNotificacionBienvenida->addContactoNotificacionBienvenida($this);
}
return $this;
}
public function removeComDestinoNotificacionBienvenida(ComDestinoNotificacionBienvenida $comDestinoNotificacionBienvenida): static
{
if ($this->comDestinoNotificacionBienvenidas->removeElement($comDestinoNotificacionBienvenida)) {
$comDestinoNotificacionBienvenida->removeContactoNotificacionBienvenida($this);
}
return $this;
}
/**
* @return Collection<int, ComHojaVida>
*/
public function getComHojaVidas(): Collection
{
return $this->comHojaVidas;
}
public function addComHojaVida(ComHojaVida $comHojaVida): static
{
if (!$this->comHojaVidas->contains($comHojaVida)) {
$this->comHojaVidas->add($comHojaVida);
$comHojaVida->addComInformacionContacto($this);
}
return $this;
}
public function removeComHojaVida(ComHojaVida $comHojaVida): static
{
if ($this->comHojaVidas->removeElement($comHojaVida)) {
$comHojaVida->removeComInformacionContacto($this);
}
return $this;
}
/**
* @return Collection<int, ComMatrizContactosHojaVida>
*/
public function getComMatrizContactosHojaVidas(): Collection
{
return $this->comMatrizContactosHojaVidas;
}
public function addComMatrizContactosHojaVida(ComMatrizContactosHojaVida $comMatrizContactosHojaVida): static
{
if (!$this->comMatrizContactosHojaVidas->contains($comMatrizContactosHojaVida)) {
$this->comMatrizContactosHojaVidas->add($comMatrizContactosHojaVida);
$comMatrizContactosHojaVida->setComInformacionContacto($this);
}
return $this;
}
public function removeComMatrizContactosHojaVida(ComMatrizContactosHojaVida $comMatrizContactosHojaVida): static
{
if ($this->comMatrizContactosHojaVidas->removeElement($comMatrizContactosHojaVida)) {
// set the owning side to null (unless already changed)
if ($comMatrizContactosHojaVida->getComInformacionContacto() === $this) {
$comMatrizContactosHojaVida->setComInformacionContacto(null);
}
}
return $this;
}
/**
* @return Collection<int, ComMapaComunicaciones>
*/
public function getComMapaComunicaciones(): Collection
{
return $this->comMapaComunicaciones;
}
public function addComMapaComunicacione(ComMapaComunicaciones $comMapaComunicacione): static
{
if (!$this->comMapaComunicaciones->contains($comMapaComunicacione)) {
$this->comMapaComunicaciones->add($comMapaComunicacione);
$comMapaComunicacione->setDirigidoA($this);
}
return $this;
}
public function removeComMapaComunicacione(ComMapaComunicaciones $comMapaComunicacione): static
{
if ($this->comMapaComunicaciones->removeElement($comMapaComunicacione)) {
// set the owning side to null (unless already changed)
if ($comMapaComunicacione->getDirigidoA() === $this) {
$comMapaComunicacione->setDirigidoA(null);
}
}
return $this;
}
/**
* @return Collection<int, ComComfirmarTarifa>
*/
public function getComComfirmarTarifas(): Collection
{
return $this->comComfirmarTarifas;
}
public function addComComfirmarTarifa(ComComfirmarTarifa $comComfirmarTarifa): static
{
if (!$this->comComfirmarTarifas->contains($comComfirmarTarifa)) {
$this->comComfirmarTarifas->add($comComfirmarTarifa);
$comComfirmarTarifa->addComInformacionContactoNotificacion($this);
}
return $this;
}
public function removeComComfirmarTarifa(ComComfirmarTarifa $comComfirmarTarifa): static
{
if ($this->comComfirmarTarifas->removeElement($comComfirmarTarifa)) {
$comComfirmarTarifa->removeComInformacionContactoNotificacion($this);
}
return $this;
}
}