<?phpnamespace App\Entity;use App\Repository\RegistroWhatsappRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=RegistroWhatsappRepository::class) */class RegistroWhatsapp{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=100) */ private $fromId; /** * @ORM\Column(type="datetime") */ private $fechaCreacion; /** * @ORM\Column(type="datetime") */ private $fechaUltimaActualizacion; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $urlReserva; /** * @ORM\Column(type="string", length=255) */ private $estado; const ESTADO_ADMINISTRACION = "administracion"; const ESTADO_SOLICITADA = "solicitada"; const ESTADO_CONSULTA = "consulta"; const ESTADO_STOCK = "stock"; const ESTADO_RESERVA = "reserva"; const ESTADO_CANCELADA = "cancelada"; /** * @ORM\OneToMany(targetEntity=RegistroWhatsappNumero::class, mappedBy="registroWhatsapp", orphanRemoval=true) */ private $numeros; public function __construct() { $this->numeros = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getFromId(): ?string { return $this->fromId; } public function setFromId(string $fromId): self { $this->fromId = $fromId; return $this; } public function getFechaCreacion(): ?\DateTimeInterface { return $this->fechaCreacion; } public function setFechaCreacion(\DateTimeInterface $fechaCreacion): self { $this->fechaCreacion = $fechaCreacion; return $this; } public function getFechaUltimaActualizacion(): ?\DateTimeInterface { return $this->fechaUltimaActualizacion; } public function setFechaUltimaActualizacion(\DateTimeInterface $fechaUltimaActualizacion): self { $this->fechaUltimaActualizacion = $fechaUltimaActualizacion; return $this; } public function getUrlReserva(): ?string { return $this->urlReserva; } public function setUrlReserva(?string $urlReserva): self { $this->urlReserva = $urlReserva; return $this; } public function getEstado(): ?string { return $this->estado; } public function setEstado(string $estado): self { $this->estado = $estado; return $this; } /** * @return Collection<int, RegistroWhatsappNumero> */ public function getNumeros(): Collection { return $this->numeros; } public function addNumero(RegistroWhatsappNumero $numero): self { if (!$this->numeros->contains($numero)) { $this->numeros[] = $numero; $numero->setRegistroWhatsapp($this); } return $this; } public function removeNumero(RegistroWhatsappNumero $numero): self { if ($this->numeros->removeElement($numero)) { // set the owning side to null (unless already changed) if ($numero->getRegistroWhatsapp() === $this) { $numero->setRegistroWhatsapp(null); } } return $this; }}