/
v.bolshakov
/
AIEcosystem-Testing
Обзор
Документация
Войти
/
v.bolshakov
/
AIEcosystem-Testing
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
common/models/SystemTool.php
70 строк
1 KB
Developer
Initial commit
03 авг 2026, 17:43
03 авг 2026, 17:43
7433917
Код
Авторство
О чём код?
<?php namespace common\models; use common\interfaces\TitleInterface; use common\traits\TitleRecordTrait; use Yii; use yii\helpers\ArrayHelper; /** * Таблица - Провайдеры * * @property string $title Заголовок * @property string $is_active * @property string $last_check * * @author Dmitry E. Semenov <sde.tomsk@gmail.com> * @copyright Self (c) 2025 */ class SystemTool extends \common\models\base\BaseModel implements TitleInterface { use TitleRecordTrait; const EWS = 1; const CAT_MEMO_Q = 2; const SYSTEM_QUEUE = 3; /** * {@inheritdoc} */ public static function tableName() { return 'system_tool'; } /** * {@inheritdoc} */ public function rules() { return ArrayHelper::merge(parent::rules(), [ ['title', 'trim'], ['is_active', 'default', 'value' => 1], ['is_active', 'number'], [['title', 'is_active'], 'required'], [['title', 'last_check'], 'string', 'max' => 255], ]); } /** * {@inheritdoc} */ public function attributeLabels() { return ArrayHelper::merge(parent::attributeLabels(), [ 'title' => Yii::t('app', 'Title'), 'is_active' => Yii::t('app', 'Is Active'), ]); } /** * {@inheritdoc} */ public function fields() { return [ 'title' ]; } }