/
v.bolshakov
/
AIEcosystem-Testing
Обзор
Документация
Войти
/
v.bolshakov
/
AIEcosystem-Testing
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
common/models/stat/ProviderCheck.php
74 строки
2 KB
Developer
Initial commit
03 авг 2026, 17:43
03 авг 2026, 17:43
7433917
Код
Авторство
О чём код?
<?php namespace common\models\stat; use common\behaviors\DefaultBehavior; use Yii; use yii\helpers\ArrayHelper; /** * Таблица - Провайдеры * * @property string $provider_id * @property string $status * @property string $timeout * @property string $error * @property string $is_last * * @author Dmitry E. Semenov <sde.tomsk@gmail.com> * @copyright Self (c) 2026 */ class ProviderCheck extends \common\models\base\BaseModel { /** * {@inheritdoc} */ public static function tableName() { return 'provider_check'; } /** * {@inheritdoc} */ public function rules() { return ArrayHelper::merge(parent::rules(), [ ['is_last', 'default', 'value' => 1], [['provider_id', 'status', 'timeout', 'is_last'], 'number'], [['provider_id', 'status', 'timeout', 'is_last'], 'required'], ['error', 'trim'], [['error'], 'string', 'max' => 255], ]); } /** * {@inheritdoc} */ public function attributeLabels() { return ArrayHelper::merge(parent::attributeLabels(), [ 'error' => Yii::t('app', 'Error'), 'is_last' => Yii::t('app', 'Is Last'), 'provider_id' => Yii::t('app', 'Provider'), 'status' => Yii::t('app', 'Status'), 'timeout' => Yii::t('app', 'Timeout'), ]); } /** * {@inheritdoc} */ public function behaviors() { return ArrayHelper::merge(parent::behaviors(), [ 'DefaultBehavior' => [ 'class' => DefaultBehavior::className(), 'defaultAttribute' => 'is_last', 'scope' => [ 'provider_id' ] ], ]); } }