<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;

class SyncQuestionsFromQuestionBank extends Command
{
    protected $signature = 'question:sync-from-question-bank
        {--dry-run : Preview only, do not write to MySQL}';

    protected $description = 'Sync AI-generated questions from QuestionBankService into MySQL questions table';

    public function handle(): int
    {
        $dryRun = (bool) $this->option('dry-run');

        $this->info(sprintf(
            '题库已完全迁移到本地数据库，question:sync-from-question-bank 已停用。dry_run=%s',
            $dryRun ? 'true' : 'false'
        ));

        return self::SUCCESS;
    }
}
