--- /dev/null
+<?php
+
+namespace yii_app\records;
+
+use Yii;
+
+/**
+ * This is the model class for table "users_telegram_message".
+ *
+ * @property int $id ID
+ * @property string $chat_id Chat ID
+ * @property string $phone Телефон
+ * @property string $message Текст сообщения в Телеграм
+ * @property string $kogort_date Дата когорты
+ * @property string $target_date Целевая дата
+ * @property int $type Номер рассылки
+ * @property string $created_at Дата создания записи
+ */
+class UsersTelegramMessage extends \yii\db\ActiveRecord
+{
+ public const TYPE_FIRST_MESSAGE = 1;
+ public const TYPE_SECOND_MESSAGE = 2;
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function tableName()
+ {
+ return 'users_telegram_message';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function rules()
+ {
+ return [
+ [['chat_id', 'phone', 'message', 'kogort_date', 'target_date'], 'required'],
+ [['kogort_date', 'target_date', 'created_at'], 'safe'],
+ [['type'], 'default', 'value' => null],
+ [['type'], 'integer'],
+ [['chat_id', 'phone', 'message'], 'string', 'max' => 255],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'ID',
+ 'chat_id' => 'Chat ID',
+ 'phone' => 'Телефон',
+ 'message' => 'Текст сообщения в Телеграм',
+ 'kogort_date' => 'Дата когорты',
+ 'target_date' => 'Целевая дата',
+ 'type' => 'Номер рассылки',
+ 'created_at' => 'Дата создания записи',
+ ];
+ }
+}