<?php

namespace Database\Factories\CRM;

use App\Models\CRM\Passport;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\CRM\Passport>
 */
class PassportFactory extends Factory
{
    protected $model = Passport::class;

    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'jmbg'                      => $this->faker->numerify('#############'),
            'reg_no'                    => $this->faker->bothify('REG-####'),
            'issued_at'                 => $this->faker->date('Y-m-d'),
            'expires_at'                => $this->faker->date('Y-m-d', '+10 years'),
            'issuer'                    => $this->faker->company,
            'date_of_birth'             => $this->faker->date('Y-m-d', '-30 years'),
            'place_of_birth_country_id' => 1, // This column exists per migration.
            // 'place_of_birth_city_id' is omitted.
            'country_code_country_id'   => 1,
            'nationality_country_id'    => 1,
            // 'place_of_issue_country_id' is omitted.
            'status'                    => 'active',
        ];
    }
}
