/
v.bolshakov
/
AIEcosystem-Testing
Обзор
Документация
Войти
/
v.bolshakov
/
AIEcosystem-Testing
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
common/models/ResponseBatchError.php
87 строк
2 KB
Developer
Initial commit
03 авг 2026, 17:43
03 авг 2026, 17:43
7433917
Код
Авторство
О чём код?
<?php namespace common\models; use common\behaviors\UserRecordBehavior; use common\helpers\UuidHelper; use common\kdf\KLanguage; use common\validators\UidValidator; use Yii; use yii\db\ActiveQuery; use yii\db\Expression; use yii\helpers\ArrayHelper; use yii\helpers\VarDumper; /** * Таблица - ответы * * @property integer $response_batch_id * @property string $error * * @author Dmitry E. Semenov <sde.tomsk@gmail.com> * @copyright Self (c) 2024 */ class ResponseBatchError extends \common\models\base\BaseModel { /** * {@inheritdoc} */ public static function tableName() { return 'response_batch_error'; } /** * {@inheritdoc} */ public function rules() { return ArrayHelper::merge(parent::rules(), [ [ [ 'response_batch_id', 'error', ], 'required' ], [ [ 'response_batch_id', ], 'number' ], [ [ 'error' ], 'string' ], [ ['response_batch_id'], 'exist', 'skipOnError' => true, 'targetClass' => ResponseBatch::class, 'targetAttribute' => ['response_batch_id' => 'id'] ], ]); } /** * {@inheritdoc} */ public function attributeLabels() { return ArrayHelper::merge(parent::attributeLabels(), [ 'response_batch_id' => Yii::t('app', 'Response batch'), 'error' => Yii::t('app', 'Error'), ]); } /** * @return ActiveQuery */ public function getResponseBatch() { return $this->hasOne(ResponseBatch::class, ['id' => 'response_batch_id']); } }