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