<?php

namespace Database\Factories\INSURANCE;

use App\Models\INSURANCE\InsuranceType;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\INSURANCE\Insurer>
 */
class InsuranceTypeFactory extends Factory
{
    // Specify the model that this factory is for.
    protected $model = InsuranceType::class;

    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            // Generate a unique code using both letters and numbers.
            'code' => $this->faker->unique()->bothify('??##'),
            // Generate a brief description.
            'description' => $this->faker->sentence(3),
            // For simplicity, set parent_id to null by default.
            // You can create nested types by overriding this in your tests or using state methods.
            'parent_id' => null,
            // Default status is 'active'.
            'status' => 'active',
        ];
    }
}
