<?php

declare(strict_types=1);

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

final class CategorySeeder extends Seeder
{
    /**
     * Seed the 6 fixed assessment categories.
     */
    public function run(): void
    {
        $categories = [
            ['name' => 'Audit', 'sort_order' => 1],
            ['name' => 'Outsource', 'sort_order' => 2],
            ['name' => 'Solution', 'sort_order' => 3],
            ['name' => 'Digital Solutions', 'sort_order' => 4],
            ['name' => 'Legal', 'sort_order' => 5],
            ['name' => 'Tax', 'sort_order' => 6],
        ];

        foreach ($categories as $category) {
            DB::table('categories')->insert([
                'name' => $category['name'],
                'sort_order' => $category['sort_order'],
                'created_at' => now(),
                'updated_at' => now(),
            ]);
        }
    }
}
