This commit is contained in:
巴掌 committed 2018-10-26 13:00:05 +08:00
1 parent 8107c0e6ba
commit 565a6eb2d1
13 files changed
+236 -102

No files matched your search

@@ -36,7 +36,7 @@ class Category extends Migrator
->addColumn('title','string',['limit'=>15,'null'=>false,'comment'=>'类型标题'])
->addColumn('pid','integer',['limit'=>4,'default'=>'0','null'=>false,'comment'=>'父级ID'])
->addColumn('status','boolean',['limit'=>1,'default'=>'1','null'=>false,'comment'=>'0=禁用,1=正常'])
->addColumn('paixu','integer',['limit'=>4,'default'=>'99','null'=>false,'comment'=>'排序'])
->addColumn('paixu','integer',['limit'=>4,'default'=>'999','null'=>false,'comment'=>'排序'])
->addColumn('delete_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间'])
->addColumn('beizhu','string',['limit'=>80,'null'=>true,'comment'=>'备注'])
->addIndex(array('title'), array('unique' => true))
@@ -0,0 +1,33 @@
<?php
use think\migration\Migrator;
use think\migration\db\Column;
class School extends Migrator
{
/**
* Change Method.
*
* Write your reversible migrations using this method.
*
* More information on writing migrations is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
*
* The following commands can be used in this method and Phinx will
* automatically reverse them when rolling back:
*
* createTable
* renameTable
* addColumn
* renameColumn
* addIndex
* addForeignKey
*
* Remember to call "create()" or "update()" and NOT "save()" when working
* with the Table class.
*/
public function change()
{
}
}
+22 -3
View File
@@ -17,15 +17,34 @@ class Rule extends Seeder
// 初始化超级管理员
$rows= [
// 一级菜单 1
['id'=>1,'title'=>'系统管理','name' =>'system','paixu' =>5,'ismenu'=>true,'font' =>'ui-iconfont-system'],
['id'=>2,'title' =>'管理员管理','name'=>'admin','paixu' =>4,'ismenu' =>true,'font'=>'.Hui-iconfont-root'],
['id'=>1,'title'=>'系统管理','name' =>'system','paixu' =>5,'ismenu'=>true,'font' =>'Hui-iconfont-system'],
['id'=>2,'title' =>'管理员管理','name'=>'admin','paixu' =>4,'ismenu' =>true,'font'=>'Hui-iconfont-root'],
// 二级菜单
// 系统设置
['id'=>11,'title'=>'系统设置','name'=>'system/SystemBase/index','paixu'=>1,'ismenu' =>true,'pid' =>1,'url'=>'/sysbase',],
['id'=>11,'title'=>'类别管理','name'=>'system/Category/index','paixu'=>1,'ismenu' =>true,'pid' =>1,'url'=>'/category',],
['id'=>12,'title'=>'单位管理','name'=>'system/School/index','paixu'=>2,'ismenu' =>true,'pid' =>1,'url'=>'/school',],
['id'=>13,'title'=>'系统设置','name'=>'system/SystemBase/index','paixu'=>3,'ismenu' =>true,'pid' =>1,'url'=>'/sysbase',],
// 管理员管理
['id'=>21,'title'=>'管理员列表','name'=>'admin/Index/index','paixu'=>1,'ismenu' =>true,'pid' =>2,'url'=>'/admin',],
['id'=>22,'title'=>'权限列表','name'=>'admin/AuthRule/index','paixu'=>2,'ismenu' =>true,'pid' =>2,'url'=>'/authrule',],
['id'=>23,'title'=>'角色列表','name'=>'admin/AuthGroup/index','paixu'=>3,'ismenu' =>true,'pid' =>2,'url'=>'/authgroup',],
// 系统设置
// 类别管理权限
['title'=>'添加','name'=>'system/Category/create','paixu' =>1,'pid'=>11],
['title'=>'删除','name'=>'system/Category/delete','paixu'=>2,'pid'=>11],
['title'=>'编辑','name'=>'system/Category/edit','paixu'=>3,'pid'=>11,],
['title'=>'查看','name'=>'system/Category/read','paixu'=>4,'pid'=>11,],
['title'=>'状态','name'=>'system/Category/status','paixu'=>5,'pid'=>11],
// 类别管理权限
['title'=>'添加','name'=>'system/School/create','paixu' =>1,'pid'=>12],
['title'=>'删除','name'=>'system/School/delete','paixu'=>2,'pid'=>12],
['title'=>'编辑','name'=>'system/School/edit','paixu'=>3,'pid'=>12,],
['title'=>'查看','name'=>'system/School/read','paixu'=>4,'pid'=>12,],
['title'=>'状态','name'=>'system/School/status','paixu'=>5,'pid'=>12],
//管理员管理
// 管理员列表权限
['title'=>'添加','name'=>'admin/Index/create','paixu' =>1,'pid'=>21],
['title'=>'删除','name'=>'admin/Index/delete','paixu'=>2,'pid'=>21],
Loaded 3 of 13 files, more files were not shown because too many files have changed in this diff. Show more