<?php
/**
 * @link      http://www.u-bo.com
 * @copyright 南京友博网络科技有限公司 
 * @license   http://www.u-bo.com/license/
 */

namespace home\models;

use Yii;

/**
* This is the model class for table "qc_area".
*
* 地区模型   包含省/市/区
*
* @property integer $area_id  (地区id)
 * @property string $title  (地区名称)
 * @property integer $pid  (父级地区ID)
* @property integer $sort  (排序值)
*
* @author zealxd http://blog.u-bo.com
 * @since 0.1
 */
 class Area extends \yii\db\ActiveRecord
    {
    /**
    * @inheritdoc
    */
    public static function tableName()
    {
        return '{{%area}}';
    }

    /**
    * @inheritdoc
    */
    public function rules()
    {
        return [
            [['title', 'sort'], 'required'],
            [['pid', 'sort'], 'integer'],
            [['title'], 'string', 'max' => 100]
        ];
    }

    /**
    * @inheritdoc
    */
    public function attributeLabels()
    {
        return [
            'area_id' => 'Area ID',
            'title' => 'Title',
            'pid' => 'Pid',
            'sort' => 'Sort',
        ];
    }

}
