修改权限

This commit is contained in:
wuyanwen 2020-01-08 22:02:16 +08:00
parent a03f3c3699
commit ce0eb575e9
4 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,7 @@ class Roles extends Migrator
$table->addColumn('role_name', 'string',['limit' => 15,'default'=>'','comment'=>'角色名']) $table->addColumn('role_name', 'string',['limit' => 15,'default'=>'','comment'=>'角色名'])
->addColumn('parent_id', 'integer',['default'=>0,'comment'=>'父级ID', 'signed' => false]) ->addColumn('parent_id', 'integer',['default'=>0,'comment'=>'父级ID', 'signed' => false])
->addColumn('description', 'string',['default'=> '','comment'=>'角色备注']) ->addColumn('description', 'string',['default'=> '','comment'=>'角色备注'])
->addColumn('creator_id', 'integer',['default' => 0, 'comment'=>'创建人ID'])
->addColumn('created_at', 'integer', array('default'=>0,'comment'=>'创建时间', 'signed' => false )) ->addColumn('created_at', 'integer', array('default'=>0,'comment'=>'创建时间', 'signed' => false ))
->addColumn('updated_at', 'integer', array('default'=>0,'comment'=>'更新时间', 'signed' => false)) ->addColumn('updated_at', 'integer', array('default'=>0,'comment'=>'更新时间', 'signed' => false))
->addColumn('deleted_at', 'integer', array('default'=>0,'comment'=>'删除状态0未删除 >0 已删除', 'signed' => false)) ->addColumn('deleted_at', 'integer', array('default'=>0,'comment'=>'删除状态0未删除 >0 已删除', 'signed' => false))

View File

@ -34,6 +34,7 @@ class Permissions extends Migrator
->addColumn('route', 'string', ['default' => '', 'comment' => '路由', 'limit' => 50]) ->addColumn('route', 'string', ['default' => '', 'comment' => '路由', 'limit' => 50])
->addColumn('icon', 'string', ['default' => '', 'comment' => '菜单图标', 'limit' => 50]) ->addColumn('icon', 'string', ['default' => '', 'comment' => '菜单图标', 'limit' => 50])
->addColumn('module', 'string', ['default' => '', 'comment' => '模块', 'limit' => 20]) ->addColumn('module', 'string', ['default' => '', 'comment' => '模块', 'limit' => 20])
->addColumn('creator_id', 'integer',['default' => 0, 'comment'=>'创建人ID'])
->addColumn('method', 'string', ['default' => 'get', 'comment' => '路由请求方法', 'limit' => 15]) ->addColumn('method', 'string', ['default' => 'get', 'comment' => '路由请求方法', 'limit' => 15])
->addColumn('permission_mark', 'string', ['null' => false, 'comment' => '权限标识', 'limit' => 50]) ->addColumn('permission_mark', 'string', ['null' => false, 'comment' => '权限标识', 'limit' => 50])
->addColumn('type', 'integer',['limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY,'default'=> 1,'comment'=>'1 菜单 2 按钮']) ->addColumn('type', 'integer',['limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY,'default'=> 1,'comment'=>'1 菜单 2 按钮'])

View File

@ -12,6 +12,7 @@ class Permissions extends CatchModel
'permission_name', // 菜单名称 'permission_name', // 菜单名称
'parent_id', // 父级ID 'parent_id', // 父级ID
'icon', 'icon',
'creator_id',
'module', // 模块 'module', // 模块
'route', // 路由 'route', // 路由
'method', // 请求方法 'method', // 请求方法

View File

@ -12,6 +12,7 @@ class Roles extends CatchModel
'id', // 'id', //
'role_name', // 角色名 'role_name', // 角色名
'parent_id', // 父级ID 'parent_id', // 父级ID
'creator_id',
'description', // 角色备注 'description', // 角色备注
'created_at', // 创建时间 'created_at', // 创建时间
'updated_at', // 更新时间 'updated_at', // 更新时间