TenantAtlas/database/factories/InventoryLinkFactory.php

31 lines
761 B
PHP

<?php
namespace Database\Factories;
use App\Models\InventoryLink;
use App\Models\Tenant;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<InventoryLink>
*/
class InventoryLinkFactory extends Factory
{
protected $model = InventoryLink::class;
public function definition(): array
{
return [
'tenant_id' => Tenant::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),
],
];
}
}