<?php

namespace Database\Factories;

use App\Models\InventoryLink;
use App\Models\ManagedEnvironment;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends Factory<InventoryLink>
 */
class InventoryLinkFactory extends Factory
{
    protected $model = InventoryLink::class;

    public function definition(): array
    {
        return [
            'managed_environment_id' => ManagedEnvironment::factory(),
            'source_type' => 'inventory_item',
            'source_id' => $this->faker->uuid(),
            'target_type' => 'foundation_object',
            'target_id' => $this->faker->uuid(),
            'relationship_type' => 'assigned_to',
            'metadata' => [
                'last_known_name' => $this->faker->words(3, true),
            ],
        ];
    }
}
