<?php

namespace Database\Seeders;

use App\Models\DeviceLocation;
use Illuminate\Database\Seeder;

class LiveTrackingSeeder extends Seeder
{
    public function run(): void
    {
        $count = max(0, (int) config('database.seeders.location_count', 0));

        if ($count > 0 && DeviceLocation::query()->doesntExist()) {
            DeviceLocation::factory()->count($count)->create();
        }
    }
}
