51 lines
1.1 KiB
PHP
Raw Normal View History

2025-01-03 02:11:09 +03:00
<?php
namespace kernel\app_modules\tgbot\models;
use Illuminate\Database\Eloquent\Model;
/**
* @property integer $id
* @property integer $bot_id
* @property integer $dialog_id
* @property integer $user_id
* @property string $username
* @property string $first_name
* @property string $last_name
* @property integer $status
*/
class Tgbot extends Model
{
const DISABLE_STATUS = 0;
const ACTIVE_STATUS = 1;
protected $table = 'tgbot';
protected $fillable = ['bot_id', 'dialog_id', 'user_id', 'username', 'first_name', 'last_name', 'status'];
public static function labels(): array
{
return [
'bot_id' => 'Bot ID',
'dialog_id' => 'Dialog ID',
'user_id' => 'User ID',
'username' => 'Username',
'first_name' => 'First name',
'last_name' => 'Last name',
'status' => 'Статус',
];
}
/**
* @return string[]
*/
public static function getStatus(): array
{
return [
self::DISABLE_STATUS => "Не активный",
self::ACTIVE_STATUS => "Активный",
];
}
}