<?php

namespace Database\Factories\PensionCase;

use App\Models\Client\Client;
use Illuminate\Database\Eloquent\Factories\Factory;

class PensionCaseFactory extends Factory {
    public function definition(): array {
        return [
            'client_id' => Client::factory(),
            'sf_case_id' => 'SF' . $this->faker->unique()->numerify('######'),
            'case_number' => 'PC-' . $this->faker->unique()->numerify('####'),
            'case_owner' => $this->faker->name(),
            'claims_writer' => $this->faker->name(),
            'file_investigator' => $this->faker->name(),
            'is_open' => true,
            'is_closed' => false,
            'claim_subject' => $this->faker->sentence(4),
            'claim_basis' => 'Pension mis-selling',
            'priority' => $this->faker->randomElement(['High', 'Medium', 'Low']),
            'settlement_status' => $this->faker->randomElement(['Pending', 'In Progress', 'Settled', 'Rejected']),
            'vulnerable_client_flag' => false,
            'do_not_contact' => false,
            'sms_opt_out' => false,
            'ifa_referred' => false,
            'fee_capping_flag' => false,
            'atc_received' => false,
            'national_insurance' => strtoupper($this->faker->bothify('??######?')),
        ];
    }
}
