zend-blog-3-backend

Форк
0
/
TelegramUpdate.php 
142 строки · 2.5 Кб
1
<?php
2

3
namespace App\Entity;
4

5
use App\Entity\Traits\ModifyEntityTrait;
6
use Doctrine\ORM\Mapping as ORM;
7

8
/**
9
 * @ORM\Table(name="telegram_updates")
10
 * @ORM\Entity(repositoryClass="App\Repository\TelegramUpdateRepository")
11
 * @ORM\HasLifecycleCallbacks()
12
 */
13
class TelegramUpdate
14
{
15
    use ModifyEntityTrait;
16

17
    /**
18
     * @var int
19
     *
20
     * @ORM\Id
21
     * @ORM\Column(type="integer")
22
     * @ORM\GeneratedValue(strategy="AUTO")
23
     */
24
    private $id;
25

26
    /**
27
     * @var TelegramUser|null
28
     *
29
     * @ORM\ManyToOne(targetEntity="TelegramUser")
30
     * @ORM\JoinColumn(onDelete="SET NULL")
31
     */
32
    private $telegramUser;
33

34
    /**
35
     * @var int|null
36
     *
37
     * @ORM\Column(type="bigint", nullable=true)
38
     */
39
    private $chatId;
40

41
    /**
42
     * @var string
43
     *
44
     * @ORM\Column(type="text", length=65535, nullable=true)
45
     */
46
    private $textMessage;
47

48
    /**
49
     * @var string
50
     *
51
     * @ORM\Column(type="text", length=65535)
52
     */
53
    private $rawMessage;
54

55
    /**
56
     * @return int
57
     */
58
    public function getId(): ?int
59
    {
60
        return $this->id;
61
    }
62

63
    /**
64
     * @return TelegramUser|null
65
     */
66
    public function getTelegramUser(): ?TelegramUser
67
    {
68
        return $this->telegramUser;
69
    }
70

71
    /**
72
     * @param TelegramUser|null $telegramUser
73
     *
74
     * @return TelegramUpdate
75
     */
76
    public function setTelegramUser(?TelegramUser $telegramUser): self
77
    {
78
        $this->telegramUser = $telegramUser;
79

80
        return $this;
81
    }
82

83
    /**
84
     * @return int|null
85
     */
86
    public function getChatId(): ?int
87
    {
88
        return $this->chatId;
89
    }
90

91
    /**
92
     * @param int|null $chatId
93
     *
94
     * @return TelegramUpdate
95
     */
96
    public function setChatId(?int $chatId): self
97
    {
98
        $this->chatId = $chatId;
99

100
        return $this;
101
    }
102

103
    /**
104
     * @return string
105
     */
106
    public function getRawMessage(): string
107
    {
108
        return $this->rawMessage;
109
    }
110

111
    /**
112
     * @param string $rawMessage
113
     *
114
     * @return TelegramUpdate
115
     */
116
    public function setRawMessage(string $rawMessage): self
117
    {
118
        $this->rawMessage = $rawMessage;
119

120
        return $this;
121
    }
122

123
    /**
124
     * @return string|null
125
     */
126
    public function getTextMessage(): ?string
127
    {
128
        return $this->textMessage;
129
    }
130

131
    /**
132
     * @param string|null $textMessage
133
     *
134
     * @return TelegramUpdate
135
     */
136
    public function setTextMessage(string $textMessage = null): self
137
    {
138
        $this->textMessage = $textMessage;
139

140
        return $this;
141
    }
142
}
143

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.