<?php

namespace Database\Factories;

use App\Domain\Organization\Models\Company;
use App\Domain\Workflow\Enums\AppointmentStatus;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

class AppointmentFactory extends Factory
{
    public function definition(): array
    {
        return [
            'appointment_no' => 'APT-2026-'.Str::padLeft((string) $this->faker->unique()->numberBetween(1, 99999), 5, '0'),
            'company_id' => Company::factory(),
            'type' => 'medical',
            'title' => 'Medical examination',
            'scheduled_at' => now()->addWeek(),
            'status' => AppointmentStatus::Scheduled->value,
            'is_visible_to_applicant' => true,
        ];
    }
}
