<?php
namespace Database\Factories;

use App\Enums\OpportunityStatus;
use App\Models\Opportunity;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

class OpportunityFactory extends Factory
{
    protected $model = Opportunity::class;

    public function definition(): array
    {
        $title = fake()->unique()->sentence(4);
        return [
            'title' => $title,
            'slug' => Str::slug($title),
            'excerpt' => fake()->paragraph(),
            'content' => '<p>' . implode('</p><p>', fake()->paragraphs(3)) . '</p>',
            'image' => null,
            'published_at' => now(),
            'status' => OpportunityStatus::Published->value,
        ];
    }
}
