<?php
namespace App\Entity;
use App\Repository\TgBotTransportResponseRepository;
use Doctrine\ORM\Mapping as ORM;
/** Хранит ответ туннельного Telegram-бота для запроса PyTg.
*
* @ORM\Entity(repositoryClass=TgBotTransportResponseRepository::class)
*/
class TgBotTransportResponse
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=32)
*/
private $requestId;
/**
* @ORM\Column(type="json")
*/
private $response = [];
/**
* @ORM\Column(type="datetime_immutable")
*/
private $createdAt;
public function __construct()
{
$this->createdAt = new \DateTimeImmutable();
}
public function getId(): ?int
{
return $this->id;
}
public function getRequestId(): ?string
{
return $this->requestId;
}
public function setRequestId(string $requestId): self
{
$this->requestId = $requestId;
return $this;
}
public function getResponse(): ?array
{
return $this->response;
}
public function setResponse(array $response): self
{
$this->response = $response;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
}