add Telegram bot id dialogs table and API methods

This commit is contained in:
iIronside
2023-10-25 14:37:29 +03:00
parent da08bcf1b2
commit 5df755ff8b
16 changed files with 450 additions and 33 deletions

View File

@ -2,7 +2,9 @@
namespace common\models;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveQuery;
use yii\db\Expression;
/**
* This is the model class for table "user_tg_bot_token".
@ -26,6 +28,18 @@ class UserTgBotToken extends \yii\db\ActiveRecord
return 'user_tg_bot_token';
}
public function behaviors()
{
return [
[
'class' => TimestampBehavior::class,
'createdAtAttribute' => 'created_at',
'updatedAtAttribute' => 'updated_at',
'value' => new Expression('NOW()'),
],
];
}
/**
* {@inheritdoc}
*/