/
v.bolshakov
/
AIEcosystem-Testing
Обзор
Документация
Войти
/
v.bolshakov
/
AIEcosystem-Testing
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
common/models/RequestToken.php
78 строк
2 KB
Developer
Initial commit
03 авг 2026, 17:43
03 авг 2026, 17:43
7433917
Код
Авторство
О чём код?
<?php namespace common\models; use common\models\base\BaseModel; use Yii; use yii\db\ActiveQuery; use yii\helpers\ArrayHelper; /** * This is the model class for table "request_token". * * @property integer $token_id * @property integer $request_batch_id * * @author Dmitry E. Semenov <sde.tomsk@gmail.com> * @copyright Self (c) 2019-2026 */ class RequestToken extends BaseModel { /** * {@inheritdoc} */ public static function tableName() { return 'request_token'; } /** * {@inheritdoc} */ public function rules() { return ArrayHelper::merge(parent::rules(), [ [ [ 'token_id', 'request_batch_id', ], 'required' ], [ [ 'token_id', 'request_batch_id', ], 'number' ] ]); } /** * {@inheritdoc} */ public function attributeLabels() { return ArrayHelper::merge(parent::attributeLabels(), [ 'token_id' => Yii::t('app', 'Token'), 'request_batch_id' => Yii::t('app', 'Request Batch'), ]); } /** * @return ActiveQuery */ public function getToken() { return $this->hasOne(Token::class, ['id' => 'token_id']); } /** * @return ActiveQuery */ public function getRequestBatch() { return $this->hasOne(RequestBatch::class, ['id' => 'request_batch_id']); } }