<?php

namespace Database\Factories;

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 [
            'name' => $this->faker->company(),
            // Large unique space — safeEmail()'s pool can collide late in a full
            // suite run (process-wide unique() state), tripping customers.email.
            'email' => 'customer-'.$this->faker->unique()->numerify('########').'@example.test',
            'locale' => 'de',
            'status' => 'active',
        ];
    }
}
