<?php

namespace Database\Factories;

use App\Models\Quartier;
use App\Models\Ville;
use Illuminate\Database\Eloquent\Factories\Factory;

class QuartierFactory extends Factory
{
    public function definition(): array
    {
        $ville = Ville::inRandomOrder()->first() ?? Ville::factory();

        return [
            'ville_id' => $ville->id,
            'nom' => fake()->streetName(),
            'code' => fake()->optional()->bothify('???'),
            'actif' => true,
        ];
    }
}
