/
v.bolshakov
/
AIEcosystem-Testing
Обзор
Документация
Войти
/
v.bolshakov
/
AIEcosystem-Testing
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
common/models/Owner.php
61 строка
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; /** * Таблица - пользователи GPT * * @property string $title Заголовок * @property string $key ИД * * @author Dmitry E. Semenov <sde.tomsk@gmail.com> * @copyright Self (c) 2025 */ class Owner extends \common\models\base\BaseModel implements TitleInterface { use TitleRecordTrait; /** * {@inheritdoc} */ public static function tableName() { return 'owner'; } /** * {@inheritdoc} */ public function rules() { return ArrayHelper::merge(parent::rules(), [ ['title', 'trim'], [['key'], 'required'], [['title', 'key'], 'string', 'max' => 255], [['title', 'key'], 'unique'] ]); } /** * {@inheritdoc} */ public function attributeLabels() { return ArrayHelper::merge(parent::attributeLabels(), [ 'title' => Yii::t('app', 'Title'), ]); } /** * @inheritdoc */ public static function getTitleFields() { return ['title']; } }