123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace common\models;
- use Yii;
- /**
- * This is the model class for table "base_menu".
- *
- * @property int $id id
- * @property string|null $name 菜单名称
- * @property int|null $type 类型 1菜单 2按钮
- * @property int|null $parentid 父ID
- * @property string|null $url 菜单url
- * @property string|null $icon 菜单图标
- * @property int|null $status 状态 0禁用 1启用
- * @property int|null $sort 排序
- */
- class BaseMenu extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'base_menu';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['type', 'parentid', 'status', 'sort'], 'integer'],
- [['name', 'icon'], 'string', 'max' => 50],
- [['url'], 'string', 'max' => 200],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '菜单名称',
- 'type' => '类型 1菜单 2按钮',
- 'parentid' => '父ID',
- 'url' => '菜单url',
- 'icon' => '菜单图标',
- 'status' => '状态 0禁用 1启用',
- 'sort' => '排序',
- ];
- }
- }
|