You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
simple-yewu/common/models/Region.php

49 lines
863 B

5 years ago
<?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',
];
}
}