<?php

namespace common\modules\rubrication\models;

use common\modules\relation\models\Relation;
use Yii;

/**
 * This is the model class for table "tax_option_to_option".
 *
 * @property integer $tax_option1_id
 * @property integer $tax_option2_id
 * @property string $alias
 * @property integer $sort
 */
class TaxOptionRelation extends Relation
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'tax_option_to_option';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['tax_option1_id', 'tax_option2_id', 'alias'], 'required'],
            [['tax_option1_id', 'tax_option2_id', 'sort'], 'integer'],
            [['alias'], 'string', 'max' => 50]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'tax_option1_id' => Yii::t('product', 'Tax Option1 ID'),
            'tax_option2_id' => Yii::t('product', 'Tax Option2 ID'),
            'alias' => Yii::t('product', 'Alias'),
            'sort' => Yii::t('product', 'Sort'),
        ];
    }
}
