<?php

namespace Database\Factories\INSURANCE;

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

class CommissionDefaultFactory extends Factory
{
    protected $model = CommissionDefault::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition(): array
    {
        return [
            'insurer_id' => Insurer::factory(),
            'insurance_type_id' => InsuranceType::factory(),
            // Generates a random commission rate between 0 and 100.
            'commission_rate' => $this->faker->randomFloat(2, 0, 100),
        ];
    }
}
