<?php

namespace Database\Factories\CRM;

use App\Models\CRM\City;
use App\Models\CRM\IdCard;
use Illuminate\Database\Eloquent\Factories\Factory;

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

    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'jmbg'                   => $this->faker->numerify('#############'),
            'date_of_birth'          => $this->faker->date(),
            'reg_no'                 => $this->faker->bothify('REG-####'),
            'issuer'                 => $this->faker->company,
            'issued_at'              => $this->faker->date(),
            'expires_at'             => $this->faker->date(),
            'place_of_birth_city_id' => null, // override when needed
            'documentable_id'        => 1,
            'documentable_type'      => 'App\Models\CRM\Individual',
            'status'                 => 'active',
        ];
    }
}
