<?php

namespace Database\Factories;

use App\Models\AppointmentCategory;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Appointment>
 */
class AppointmentFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        $urgency_degree_list = ['weak', 'medium', 'important', 'urgent', 'critical'];

        return [
            'category_id' => rand(1, 3),  // Create and associate a random category
            'title' => $this->faker->sentence(3),             // Random title for the appointment
            'description' => $this->faker->paragraph(),       // Random description for the appointment
            'date' => $this->faker->dateTimeBetween('2024-10-01', '2024-10-31')->format('Y-m-d'),                   // Random date
            'time' => $this->faker->time('H:i'),             // Random time in HH:MM format
            'urgency_degree' => $urgency_degree_list[$this->faker->numberBetween(0, 4)],
        ];
    }
}
