option('evaluations'); $minUsers = (int) $this->option('users'); $this->info("开始生成课程内容评价测试数据..."); $this->info("计划生成 {$evaluationCount} 个评价问卷,确保至少 {$minUsers} 个用户"); $generator = new CourseContentEvaluationTestDataGenerator(); $startTime = microtime(true); try { $generator->generate($evaluationCount, $minUsers, function (string $message) { $this->line(" → {$message}"); }); $duration = round(microtime(true) - $startTime, 2); $this->info("✅ 数据生成完成!耗时 {$duration} 秒"); return Command::SUCCESS; } catch (\Exception $e) { $this->error("❌ 数据生成失败:" . $e->getMessage()); return Command::FAILURE; } } }