DetailsCriteria.php 1.38 KB
<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%details_criteria}}".
 *
 * @property string $name
 * @property string $brand
 * @property string $key
 * @property string $value
 * @property integer $if_tecdoc
 * @property string $filter_id
 * @property string $timestamp
 */
class DetailsCriteria extends \backend\components\base\BaseActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%details_criteria}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name', 'brand', 'key', 'value'], 'required'],
            [['if_tecdoc', 'filter_id'], 'integer'],
            [['timestamp'], 'safe'],
            [['name', 'brand'], 'string', 'max' => 100],
            [['key'], 'string', 'max' => 200],
            [['value'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'name' => Yii::t('app', 'Name'),
            'brand' => Yii::t('app', 'Brand'),
            'key' => Yii::t('app', 'Ключ'),
            'value' => Yii::t('app', 'Характеристика'),
            'if_tecdoc' => Yii::t('app', 'If Tecdoc'),
            'filter_id' => Yii::t('app', 'Filter ID'),
            'timestamp' => Yii::t('app', 'Timestamp'),
        ];
    }
}