<?php

namespace Database\Factories\CRM;

use App\Models\CRM\Company;
use Illuminate\Database\Eloquent\Factories\Factory;

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

    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            // Generate a random company name for business_name.
            'business_name' => $this->faker->company,
            // Generate a short name using company suffix.
            'short_name' => $this->faker->companySuffix,
            // Generate random numbers for 'mb' and 'pib'. Adjust format as needed.
            'mb' => $this->faker->numerify('########'),
            'pib' => $this->faker->numerify('########'),
            // Generate a unique email address for the insurer.
            'email' => $this->faker->unique()->companyEmail,
            // Generate random phone numbers.
            'mobile' => $this->faker->phoneNumber,
            'phone' => $this->faker->phoneNumber,
            // Default status is set to 'active'.
            'status' => 'active',
        ];
    }
}
