2026-01-12 16:37:41 +03:00

32 lines
1.0 KiB
PHP

<?php
namespace Database\Factories;
use App\Models\Client;
use Illuminate\Database\Eloquent\Factories\Factory;
class ClientFactory extends Factory
{
protected $model = Client::class;
public function definition(): array
{
return [
'name' => $this->faker->company(),
'vat_number' => 'FR' . $this->faker->numerify('###########'),
'siret' => $this->faker->numerify('##############'),
'email' => $this->faker->unique()->companyEmail(),
'phone' => $this->faker->phoneNumber(),
'billing_address_line1' => $this->faker->streetAddress(),
'billing_city' => $this->faker->city(),
'billing_postal_code' => $this->faker->postcode(),
'billing_country_code' => 'FR',
// Assumes categories 1-5 exist from migration
'client_category_id' => $this->faker->numberBetween(1, 5),
'is_active' => true,
'is_parent' => false,
'notes' => $this->faker->optional()->sentence(),
];
}
}