2020-06-25 08:36:29 +08:00
|
|
|
|
<?php
|
2020-09-11 18:19:06 +08:00
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | CatchAdmin [Just Like ~ ]
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | Copyright (c) 2017~{$year} http://catchadmin.com All rights reserved.
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | Author: JaguarJack [ njphper@gmail.com ]
|
|
|
|
|
// +----------------------------------------------------------------------
|
2020-06-25 08:36:29 +08:00
|
|
|
|
|
|
|
|
|
use think\migration\Seeder;
|
|
|
|
|
|
2020-09-05 17:18:31 +08:00
|
|
|
|
class {CLASS} extends Seeder
|
2020-06-25 08:36:29 +08:00
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* 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()
|
|
|
|
|
{
|
|
|
|
|
\catcher\Utils::importTreeData($this->getPermissions(), 'permissions', 'parent_id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function getPermissions()
|
|
|
|
|
{
|
|
|
|
|
{DATA}
|
|
|
|
|
}
|
|
|
|
|
}
|