<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "middle_scale_hour".
 *
 * @property integer $id
 * @property integer $scale_id
 * @property integer $hour_id
 * @property string $work_hour
 */
class MiddleScaleHour extends \common\models\Base
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'middle_scale_hour';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['scale_id', 'min_price', 'work_hour'], 'required'],
            [['scale_id', 'min_price'], 'integer'],
            [['work_hour'], 'number'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'scale_id' => 'Scale ID',
            'min_price' => 'Min Price',
            'work_hour' => 'Work Hour',
        ];
    }
    /**
     * @
     */
    public function getItemScale(){
        return $this->hasOne(FixCarCategory::className(),['id'=>'scale_id']);
    }
}
