42 lines
9.3 KiB
PHP
42 lines
9.3 KiB
PHP
<?php
|
|
|
|
use think\migration\Seeder;
|
|
|
|
class BaseData extends Seeder
|
|
{
|
|
/**
|
|
* Run Method.
|
|
*
|
|
* Write your database seeder using this method.
|
|
*
|
|
* More information on writing seeders is available here:
|
|
* http://docs.phinx.org/en/latest/seeding.html
|
|
*/
|
|
public function run(){
|
|
$permissions = array(
|
|
array('id' => '1','creator_id' => '1','parent_id' => '0','name' => 'systems','title' => '系统','type' => 'menu','icon' => 'el-icon-tools','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '/system','redirect' => '','component' => '','api_list' => '[]','sort' => '2','status' => '1','create_time' => '1647866389','update_time' => '1647831105','fullpage' => '0'),
|
|
array('id' => '2','creator_id' => '0','parent_id' => '1','name' => 'system','title' => '配置管理','type' => 'menu','icon' => 'el-icon-set-up','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '/system/setting','redirect' => '','component' => 'system/setting','api_list' => '[]','sort' => '21','status' => '1','create_time' => '1647866389','update_time' => '1653363608','fullpage' => '0'),
|
|
array('id' => '3','creator_id' => '0','parent_id' => '15','name' => 'user','title' => '用户管理','type' => 'menu','icon' => 'el-icon-avatar','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '/auth/user','redirect' => '','component' => 'auth/user','api_list' => '[]','sort' => '22','status' => '1','create_time' => '1647866389','update_time' => '1653363713','fullpage' => '0'),
|
|
array('id' => '4','creator_id' => '0','parent_id' => '15','name' => 'role','title' => '角色管理','type' => 'menu','icon' => 'el-icon-medal','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '/auth/role','redirect' => '','component' => 'auth/role','api_list' => '[]','sort' => '23','status' => '1','create_time' => '1647866389','update_time' => '1653363781','fullpage' => '0'),
|
|
array('id' => '5','creator_id' => '0','parent_id' => '1','name' => 'dic','title' => '字典管理','type' => 'menu','icon' => 'el-icon-checked','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '/system/dic','redirect' => '','component' => 'system/dic','api_list' => '[]','sort' => '24','status' => '1','create_time' => '1634565766','update_time' => '1653363627','fullpage' => '0'),
|
|
array('id' => '6','creator_id' => '0','parent_id' => '15','name' => 'department','title' => '部门管理','type' => 'menu','icon' => 'el-icon-tools','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '/auth/department','redirect' => '','component' => 'auth/department','api_list' => '[]','sort' => '25','status' => '1','create_time' => '1647866389','update_time' => '1647830185','fullpage' => '0'),
|
|
array('id' => '7','creator_id' => '0','parent_id' => '15','name' => 'settingMenu','title' => '权限管理','type' => 'menu','icon' => 'el-icon-key','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '/auth/menu','redirect' => '','component' => 'auth/menu','api_list' => '[]','sort' => '26','status' => '1','create_time' => '1647866389','update_time' => '1653363800','fullpage' => '0'),
|
|
array('id' => '8','creator_id' => '0','parent_id' => '1','name' => 'task','title' => '任务管理','type' => 'menu','icon' => 'el-icon-alarm-clock','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '/system/task','redirect' => '','component' => 'system/task','api_list' => '[]','sort' => '27','status' => '1','create_time' => '1634565766','update_time' => '1653363635','fullpage' => '0'),
|
|
array('id' => '9','creator_id' => '0','parent_id' => '1','name' => 'client','title' => '客户端','type' => 'menu','icon' => 'el-icon-menu','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '/system/client','redirect' => '','component' => 'system/client','api_list' => '[]','sort' => '28','status' => '1','create_time' => '1647866389','update_time' => '1653363681','fullpage' => '0'),
|
|
array('id' => '10','creator_id' => '0','parent_id' => '1','name' => 'log','title' => '日志管理','type' => 'menu','icon' => 'el-icon-management','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '/system/log','redirect' => '','component' => 'system/log','api_list' => '[]','sort' => '29','status' => '1','create_time' => '1647866389','update_time' => '1653363706','fullpage' => '0'),
|
|
array('id' => '11','creator_id' => '1','parent_id' => '0','name' => 'home','title' => '首页','type' => 'menu','icon' => 'el-icon-home-filled','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '/home','redirect' => '','component' => '','api_list' => '[]','sort' => '0','status' => '1','create_time' => '1647866389','update_time' => '1666057629','fullpage' => '0'),
|
|
array('id' => '12','creator_id' => '1','parent_id' => '11','name' => 'dashboard','title' => '仪表盘','type' => 'menu','icon' => 'el-icon-odometer','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '1','path' => '/dashboard','redirect' => '','component' => 'home/index','api_list' => '[]','sort' => '11','status' => '1','create_time' => '1647866389','update_time' => '1653363766','fullpage' => '0'),
|
|
array('id' => '14','creator_id' => '1','parent_id' => '11','name' => 'ucenter','title' => '个人设置','type' => 'menu','icon' => 'el-icon-operation','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '/usercenter','redirect' => '','component' => 'ucenter','api_list' => '[]','sort' => '12','status' => '1','create_time' => '1647866389','update_time' => '1653363592','fullpage' => '0'),
|
|
array('id' => '15','creator_id' => '1','parent_id' => '0','name' => 'auth','title' => '权限','type' => 'menu','icon' => 'el-icon-lock','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '/auth','redirect' => NULL,'component' => '','api_list' => '[]','sort' => '3','status' => '1','create_time' => '1647866389','update_time' => '1653363498','fullpage' => '0'),
|
|
array('id' => '16','creator_id' => '1','parent_id' => '0','name' => 'customer','title' => '客户','type' => 'menu','icon' => 'el-icon-stamp','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '','redirect' => NULL,'component' => '','api_list' => '[]','sort' => '1','status' => '1','create_time' => '1665135189','update_time' => '1666057618','fullpage' => '0'),
|
|
array('id' => '17','creator_id' => '1','parent_id' => '16','name' => 'companyList','title' => '企业数据','type' => 'menu','icon' => 'el-icon-apple','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '/company/list','redirect' => NULL,'component' => 'customer/company/list','api_list' => '[]','sort' => '1','status' => '1','create_time' => '1665135252','update_time' => '1666104518','fullpage' => '0'),
|
|
array('id' => '18','creator_id' => '1','parent_id' => '17','name' => 'insertCompany','title' => '导入数据','type' => 'button','icon' => '','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '','redirect' => NULL,'component' => '','api_list' => NULL,'sort' => '1','status' => '1','create_time' => '1666104522','update_time' => '1666104564','fullpage' => '0'),
|
|
array('id' => '19','creator_id' => '1','parent_id' => '17','name' => 'addCompany','title' => '添加企业','type' => 'button','icon' => NULL,'color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '','redirect' => NULL,'component' => '','api_list' => '[]','sort' => '1','status' => '1','create_time' => '1666524705','update_time' => '1666524963','fullpage' => '0'),
|
|
array('id' => '20','creator_id' => '1','parent_id' => '17','name' => 'deleteCompany','title' => '删除企业','type' => 'button','icon' => '','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '','redirect' => NULL,'component' => '','api_list' => NULL,'sort' => '1','status' => '1','create_time' => '1666524749','update_time' => '1666524825','fullpage' => '0'),
|
|
array('id' => '21','creator_id' => '1','parent_id' => '17','name' => 'showDetail','title' => '查看企业详情','type' => 'button','icon' => '','color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '','redirect' => NULL,'component' => '','api_list' => NULL,'sort' => '1','status' => '1','create_time' => '1666524836','update_time' => '1666524855','fullpage' => '0'),
|
|
array('id' => '22','creator_id' => '1','parent_id' => '17','name' => 'editCompany','title' => '编辑企业','type' => 'button','icon' => NULL,'color' => NULL,'hidden' => '0','hiddenbreadcrumb' => '0','affix' => '0','path' => '','redirect' => NULL,'component' => '','api_list' => '[]','sort' => '1','status' => '1','create_time' => '1666524859','update_time' => '1666524958','fullpage' => '0'),
|
|
array('id' => '23','creator_id' => '1','parent_id' => '16','name' => 'companyDetail','title' => '企业详情','type' => 'm-menu','icon' => 'el-icon-brush-filled','color' => NULL,'hidden' => '1','hiddenbreadcrumb' => '0','affix' => '0','path' => '/company/detail','redirect' => NULL,'component' => 'customer/company/detail','api_list' => '[]','sort' => '0','status' => '1','create_time' => '1666525508','update_time' => '1666579701','fullpage' => '0')
|
|
);
|
|
$this->table('permissions')->insert($permissions)->save();
|
|
}
|
|
} |