src/Entity/TelegramMessage.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TelegramMessageRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=TelegramMessageRepository::class)
  7.  */
  8. class TelegramMessage
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="text")
  18.      */
  19.     private $data;
  20.     /**
  21.      * @ORM\Column(type="boolean", nullable=true)
  22.      */
  23.     private $isBot false;
  24.     /**
  25.      * @ORM\Column(type="string")
  26.      */
  27.     private $chatId;
  28.     /**
  29.      * @ORM\Column(type="integer")
  30.      */
  31.     private $messageId;
  32.     /**
  33.      * @ORM\Column(type="boolean", nullable=true)
  34.      */
  35.     private $isDeleted;
  36.     /**
  37.      * @ORM\Column(type="text", nullable=true)
  38.      */
  39.     private $text;
  40.     /**
  41.      * @ORM\Column(type="string", nullable=true)
  42.      */
  43.     private $userId;
  44.     /**
  45.      * @ORM\Column(type="string", length=255, nullable=true)
  46.      */
  47.     private $username;
  48.     /**
  49.      * @ORM\Column(type="string", length=255, nullable=true)
  50.      */
  51.     private $name;
  52.     /**
  53.      * @ORM\Column(type="datetime")
  54.      */
  55.     private $dateTime;
  56.     public function getId(): int
  57.     {
  58.         return $this->id;
  59.     }
  60.     public function getData(): ?array
  61.     {
  62.         if (!$this->data) {
  63.             return null;
  64.         }
  65.         return json_decode($this->datatrue);
  66.     }
  67.     public function setData(string $data): self
  68.     {
  69.         $this->data $data;
  70.         return $this;
  71.     }
  72.     public function isIsBot(): ?bool
  73.     {
  74.         return $this->isBot;
  75.     }
  76.     public function setIsBot(?bool $isBot): self
  77.     {
  78.         $this->isBot $isBot;
  79.         return $this;
  80.     }
  81.     public function getChatId(): ?string
  82.     {
  83.         return $this->chatId;
  84.     }
  85.     public function setChatId(string $chatId): self
  86.     {
  87.         $this->chatId $chatId;
  88.         return $this;
  89.     }
  90.     public function getMessageId(): ?int
  91.     {
  92.         return $this->messageId;
  93.     }
  94.     public function setMessageId(int $messageId): self
  95.     {
  96.         $this->messageId $messageId;
  97.         return $this;
  98.     }
  99.     public function isIsDeleted(): ?bool
  100.     {
  101.         return $this->isDeleted;
  102.     }
  103.     public function setIsDeleted(?bool $isDeleted): self
  104.     {
  105.         $this->isDeleted $isDeleted;
  106.         return $this;
  107.     }
  108.     public function getText(): ?string
  109.     {
  110.         return $this->text;
  111.     }
  112.     public function setText(?string $text): self
  113.     {
  114.         $this->text $text;
  115.         return $this;
  116.     }
  117.     public function getUserId(): ?string
  118.     {
  119.         return $this->userId;
  120.     }
  121.     public function setUserId(?string $userId): self
  122.     {
  123.         $this->userId $userId;
  124.         return $this;
  125.     }
  126.     public function getUsername(): ?string
  127.     {
  128.         return $this->username;
  129.     }
  130.     public function setUsername(?string $username): self
  131.     {
  132.         $this->username $username;
  133.         return $this;
  134.     }
  135.     public function getName(): ?string
  136.     {
  137.         return $this->name;
  138.     }
  139.     public function setName(?string $name): self
  140.     {
  141.         $this->name $name;
  142.         return $this;
  143.     }
  144.     public function getDateTime(): ?\DateTimeInterface
  145.     {
  146.         return $this->dateTime;
  147.     }
  148.     public function setDateTime(\DateTimeInterface $dateTime): self
  149.     {
  150.         $this->dateTime $dateTime;
  151.         return $this;
  152.     }
  153. }