<?php

namespace Database\Factories\LeadSource;

use App\Models\LeadSource\LeadSource;
use App\Models\Solicitor\Solicitor;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Model>
 */
class LeadSourceEndpointFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'lead_source_id' => LeadSource::inRandomOrder()->first()->id,
            'solicitor_id' => Solicitor::inRandomOrder()->first()->id,
            'slug' => $this->faker->unique()->uuid(),
            'status' => $this->faker->randomElement(['test', 'active', 'inactive', 'draft']),
            'display_name' => $this->faker->sentence(2),
            'key' => Str::random(40)
        ];
    }
}
