/
pashko
/
siec
Обзор
Документация
Войти
/
pashko
/
siec
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
common/models/Worker.php
69 строк
1 KB
Kokorin Pavel
copy past sta files
22 апр 2020, 11:01
22 апр 2020, 11:01
6fdb817
Код
Авторство
О чём код?
<?php namespace common\models; use Yii; /** * This is the model class for table "worker". * * @property int $id * @property string $name * @property string $lastname * @property string $name3 * @property string $active * @property string $post * @property string $path_to_img * @property string $comment */ class Worker extends \yii\db\ActiveRecord { function behaviors() { return [ 'images' => [ 'class' => 'dvizh\gallery\behaviors\AttachImages', 'mode' => 'gallery', ], ]; } /** * {@inheritdoc} */ public static function tableName() { return 'worker'; } /** * {@inheritdoc} */ public function rules() { return [ [['name'], 'required'], [['active', 'comment'], 'string'], [['sort'], 'integer'], [['name', 'lastname', 'name3', 'post', 'path_to_img'], 'string', 'max' => 255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'name' => 'Name', 'lastname' => 'Lastname', 'name3' => 'Name3', 'active' => 'Active', 'post' => 'Post', 'path_to_img' => 'Path To Img', 'comment' => 'Comment', 'sort' => 'Сортировка' ]; } }