Files
xk-api-yii/common/modelsgii/oldDb/AuthRule.php

60 lines
1.4 KiB
PHP

<?php
namespace common\modelsgii\oldDb;
/**
* This is the model class for table "yii_auth_rule".
*
* @property int $id 权限id
* @property int $pid 权限父id
* @property string $title 权限名称
* @property string $path 权限对应路由
* @property string|null $component 组件地址
* @property string|null $redirect 跳转路由
* @property string|null $icon 菜单图标
* @property string|null $api_url 接口地址
* @property int $status 权限状态 1启用 0 禁用
*/
class AuthRule extends \common\core\BaseActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'yii_auth_rule';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['pid', 'status'], 'integer'],
[['title', 'path'], 'required'],
[['title','path'], 'unique'],
[['title'], 'string', 'max' => 30],
[['path', 'component', 'redirect', 'icon', 'api_url'], 'string', 'max' => 255],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'pid' => 'Pid',
'title' => 'Title',
'path' => 'Path',
'component' => 'Component',
'redirect' => 'Redirect',
'icon' => 'Icon',
'api_url' => 'Api Url',
'status' => 'Status',
];
}
}