NewOptions.php 1.1 KB
<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "new_options".
 *
 * @property integer $id
 * @property string $model
 * @property integer $model_id
 * @property string $name
 * @property string $template
 * @property integer $parent_id
 */
class NewOptions extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'new_options';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['model_id', 'parent_id'], 'integer'],
            [['name', 'template'], 'required'],
            [['model', 'name', 'template'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'model' => Yii::t('app', 'Model'),
            'model_id' => Yii::t('app', 'Model ID'),
            'name' => Yii::t('app', 'Name'),
            'template' => Yii::t('app', 'Template'),
            'parent_id' => Yii::t('app', 'Parent ID'),
        ];
    }
}