<?php

namespace Database\Factories;

use App\Models\Branch;
use App\Models\Customer;
use Illuminate\Database\Eloquent\Factories\Factory;

/** @extends Factory<Customer> */
class CustomerFactory extends Factory
{
    protected $model = Customer::class;

    public function definition(): array
    {
        return [
            'branch_id' => Branch::factory(),
            'customer_number' => 'CUS-TEST-'.$this->faker->unique()->numerify('######'),
            'identity_mode' => 'without_nin',
            'first_name' => $this->faker->firstName(),
            'last_name' => $this->faker->lastName(),
            'phone' => $this->faker->unique()->numerify('7########'),
            'email' => $this->faker->unique()->safeEmail(),
            'status' => 'active',
        ];
    }
}
