<?php

namespace Database\Factories;

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

/**
 * @extends Factory<Project>
 */
class ProjectFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        $projectName        = fake()->name(4);
        $projectCode        = Str::of($projectName)->lower()->slug();

        $status             = fake()->randomElement([0, 1]);

        return [
            'project_code' => $projectCode,
            'project_name' => $projectName,
            'status' => $status,
            'description'   => fake()->text(200)
        ];
    }
}
