first commit

This commit is contained in:
2025-09-12 15:23:08 +08:00
commit a80c237bbb
117 changed files with 15628 additions and 0 deletions

View File

@@ -0,0 +1,125 @@
<?php
declare(strict_types=1);
use Hyperf\Database\Seeders\Seeder;
class AdminMenuUpdate01 extends Seeder
{
public const array BASE_DATA = [
'name' => '',
'path' => '',
'component' => '',
'redirect' => '',
'created_by' => 0,
'updated_by' => 0,
'remark' => '',
];
/**
* Run the database seeds.
*
* @return void
*/
public function run(): void
{
// AdminMenu::truncate();
// if (env('DB_DRIVER') === 'odbc-sql-server') {
// Db::unprepared('SET IDENTITY_INSERT [' . AdminMenu::getModel()->getTable() . '] ON;');
// }
// $this->create($this->data());
// if (env('DB_DRIVER') === 'odbc-sql-server') {
// Db::unprepared('SET IDENTITY_INSERT [' . AdminMenu::getModel()->getTable() . '] OFF;');
// }
}
//
// /**
// * @param array $data
// * @param int $parentId
// * @return void
// */
// private function create(array $data, int $parentId = 0): void
// {
// foreach ($data as $item) {
// $_item = $item;
//
// if (isset($v['children'])) unset($_item['children']);
//
// $_item['parent_id'] = $parentId;
//
// $insert = AdminMenu::create(array_merge(self::BASE_DATA, $_item));
//
// if (isset($item['children']) && count($item['children'])) $this->create($item['children'], $insert->id);
// }
// }
//
// private function data(): array
// {
// return [
// [
// 'name' => 'dataCenter',
// 'path' => '/dataCenter',
// 'meta' => new AdminUserMeta([
// 'title' => '数据中心',
// 'i18n' => 'baseMenu.dataCenter.index',
// 'icon' => 'ri:database-line',
// 'type' => 'M',
// 'hidden' => 0,
// 'componentPath' => 'modules/',
// 'componentSuffix' => '.vue',
// 'breadcrumbEnable' => 1,
// 'copyright' => 1,
// 'cache' => 1,
// 'affix' => 0,
// ]),
// 'children' => [
// [
// 'name' => 'dataCenter:attachment',
// 'path' => '/dataCenter/attachment',
// 'component' => 'base/views/dataCenter/attachment/index',
// 'meta' => new AdminUserMeta([
// 'title' => '附件管理',
// 'type' => 'M',
// 'hidden' => 0,
// 'icon' => 'ri:attachment-line',
// 'i18n' => 'baseMenu.dataCenter.attachment',
// 'componentPath' => 'modules/',
// 'componentSuffix' => '.vue',
// 'breadcrumbEnable' => 1,
// 'copyright' => 1,
// 'cache' => 1,
// 'affix' => 0,
// ]),
// 'children' => [
// [
// 'name' => 'dataCenter:attachment:list',
// 'meta' => new Meta([
// 'title' => '附件列表',
// 'i18n' => 'baseMenu.dataCenter.attachmentList',
// 'type' => 'B',
// ]),
// ],
// [
// 'name' => 'dataCenter:attachment:upload',
// 'meta' => new Meta([
// 'title' => '上传附件',
// 'i18n' => 'baseMenu.dataCenter.attachmentUpload',
// 'type' => 'B',
// ]),
// ],
// [
// 'name' => 'dataCenter:attachment:delete',
// 'meta' => new Meta([
// 'title' => '删除附件',
// 'i18n' => 'baseMenu.dataCenter.attachmentDelete',
// 'type' => 'B',
// ]),
// ],
// ],
// ],
// ],
// ],
// ];
// }
}