/
pashko
/
siec
Обзор
Документация
Войти
/
pashko
/
siec
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
common/models/Vacancy.php
74 строки
2 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 "vacancy". * * @property int $id * @property string $title * @property string $short_text * @property string $text * @property string $active * @property int $sort * @property int $date_create * @property string $slug */ class Vacancy extends \yii\db\ActiveRecord { function behaviors() { return [ 'images' => [ 'class' => 'dvizh\gallery\behaviors\AttachImages', 'mode' => 'single', 'quality' => 60, 'galleryId' => 'picture' ], 'seo' => [ 'class' => 'dvizh\seo\behaviors\SeoFields', ] ]; } /** * {@inheritdoc} */ public static function tableName() { return 'vacancy'; } /** * {@inheritdoc} */ public function rules() { return [ [['title', 'slug'], 'required'], [['short_text', 'text', 'active'], 'string'], [['sort', 'date_create'], 'integer'], [['title', 'slug'], 'string', 'max' => 255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'title' => 'Title', 'short_text' => 'Short Text', 'text' => 'Text', 'active' => 'Active', 'sort' => 'Sort', 'date_create' => 'Date Create', 'slug' => 'Slug', ]; } }