feat: 创建工厂类和种子数据
- SystemSettingFactory: 系统设置工厂 - TerminalFactory: 终端工厂 - SopTemplateFactory: SOP模板工厂 - SystemSettingSeeder: 系统设置种子数据 - TerminalSeeder: 终端种子数据 - SopTemplateSeeder: SOP模板种子数据 - 更新 DatabaseSeeder 注册新的种子类
This commit is contained in:
@@ -20,6 +20,9 @@ class DatabaseSeeder extends Seeder
|
||||
{
|
||||
$this->command->info('开始生成演示数据...');
|
||||
|
||||
// 0. 创建系统设置
|
||||
$this->call(SystemSettingSeeder::class);
|
||||
|
||||
// 1. 创建管理员用户
|
||||
$this->command->info('创建管理员用户...');
|
||||
$admin = User::factory()->create([
|
||||
@@ -200,6 +203,13 @@ class DatabaseSeeder extends Seeder
|
||||
]);
|
||||
|
||||
$this->command->info('演示数据生成完成!');
|
||||
|
||||
// 9. 创建终端数据
|
||||
$this->call(TerminalSeeder::class);
|
||||
|
||||
// 10. 创建SOP模板数据
|
||||
$this->call(SopTemplateSeeder::class);
|
||||
|
||||
$this->command->newLine();
|
||||
$this->command->info('=== 生成的数据摘要 ===');
|
||||
$this->command->info('用户数量: ' . User::count());
|
||||
|
||||
Reference in New Issue
Block a user