<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "shop_region".
 *
 * @property int $id 表id
 * @property string $name 地区名称
 * @property int $level 地区等级 分省市县区
 * @property int $parent_id 父id
 */
class Region extends \common\models\Base
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'region';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['level', 'parent_id'], 'integer'],
            [['name'], 'string', 'max' => 32],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'level' => 'Level',
            'parent_id' => 'Parent ID',
        ];
    }
}