<?php

declare(strict_types=1);

namespace Database\Factories;

use App\Enums\ImportStatus;
use App\Models\Branch;
use App\Models\ImportJob;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends Factory<ImportJob>
 */
class ImportJobFactory extends Factory
{
    public function definition(): array
    {
        return [
            'user_id' => User::factory(),
            'branch_id' => Branch::factory(),
            'status' => ImportStatus::Pending,
            'source_path' => 'imports/'.fake()->uuid().'/source.csv',
            'error_report_path' => null,
            'total_rows' => null,
            'processed_rows' => 0,
            'created_rows' => 0,
            'failed_rows' => 0,
            'options' => ['dedupe' => 'phone_or_email', 'default_status' => 'member'],
            'error_message' => null,
        ];
    }
}
