<?php

namespace Database\Factories;

use App\Enums\DataChangeStatus;
use App\Models\Company;
use App\Models\DataChangeRequest;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends Factory<DataChangeRequest>
 */
class DataChangeRequestFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'user_id' => User::factory(),
            'entity_type' => Company::class,
            'entity_id' => Company::factory(),
            'status' => DataChangeStatus::PENDING,
            'old_data' => [],
            'new_data' => ['name' => 'New Company Name'],
            'change_reason' => fake()->sentence(),
        ];
    }
}
