<?php

namespace Database\Factories;

use App\Models\Business;
use App\Models\LoanProduct;
use Illuminate\Database\Eloquent\Factories\Factory;

/** @extends Factory<LoanProduct> */
class LoanProductFactory extends Factory
{
    protected $model = LoanProduct::class;
    public function definition(): array
    {
        return [
            'business_id'=>Business::factory(),'name'=>'Loan '.$this->faker->unique()->numerify('####'),
            'minimum_amount'=>'10000.00','maximum_amount'=>'5000000.00','duration'=>1,'duration_unit'=>'months',
            'interest_rate'=>'10.000000','interest_calculation_method'=>'flat','repayment_frequency'=>'monthly',
            'grace_period_days'=>0,'late_payment_penalty_type'=>'none','late_payment_penalty_value'=>'0.000000',
            'processing_fee_type'=>'fixed','processing_fee_value'=>'0.000000','insurance_fee_type'=>'fixed',
            'insurance_fee_value'=>'0.000000','other_charges'=>'0.00','collateral_required'=>false,'guarantor_required'=>false,'status'=>'active',
        ];
    }
}
