]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
модель для таблицы
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Wed, 25 Dec 2024 12:51:58 +0000 (15:51 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Wed, 25 Dec 2024 12:51:58 +0000 (15:51 +0300)
erp24/records/UsersTelegramChatId.php [new file with mode: 0644]

diff --git a/erp24/records/UsersTelegramChatId.php b/erp24/records/UsersTelegramChatId.php
new file mode 100644 (file)
index 0000000..43740d4
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+
+namespace yii_app\records;
+
+use Yii;
+
+/**
+ * This is the model class for table "users_telegram_chat_id".
+ *
+ * @property string $chat_id Chat ID
+ * @property string|null $phone Телефон
+ * @property string|null $username Имя пользователя в Телеграм
+ * @property string|null $first_name Имя пользователя
+ * @property int $is_blocked Заблокирован: 0 - нет, 1 - да
+ * @property int $is_registered Зарегистрирован: 0 - нет, 1 - да
+ */
+class UsersTelegramChatId extends \yii\db\ActiveRecord
+{
+    /**
+     * {@inheritdoc}
+     */
+    public static function tableName()
+    {
+        return 'users_telegram_chat_id';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function rules()
+    {
+        return [
+            [['chat_id'], 'required'],
+            [['is_blocked', 'is_registered'], 'default', 'value' => null],
+            [['is_blocked', 'is_registered'], 'integer'],
+            [['chat_id', 'phone', 'username', 'first_name'], 'string', 'max' => 255],
+        ];
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function attributeLabels()
+    {
+        return [
+            'chat_id' => 'Chat ID',
+            'phone' => 'Телефон',
+            'username' => 'Имя пользователя в Телеграм',
+            'first_name' => 'Имя пользователя',
+            'is_blocked' => 'Заблокирован: 0 - нет, 1 - да',
+            'is_registered' => 'Зарегистрирован: 0 - нет, 1 - да',
+        ];
+    }
+}