<?php

namespace Database\Factories;

use App\Models\SuperAdminActionLog;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\SuperAdminActionLog>
 */
class SuperAdminActionLogFactory extends Factory
{
    protected $model = SuperAdminActionLog::class;

    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'actor_id' => User::factory(),
            'action' => $this->faker->randomElement([
                'tenant.updated',
                'photo.approved',
                'user.created',
            ]),
            'subject_type' => User::class,
            'subject_id' => User::factory(),
            'source' => $this->faker->randomElement([
                'App\\Filament\\Resources\\TenantResource',
                'App\\Filament\\Clusters\\DailyOps\\Resources\\Photos\\PhotoResource',
            ]),
            'metadata' => [
                'fields' => ['status', 'moderated_at'],
            ],
            'occurred_at' => now(),
        ];
    }
}
