<?php

namespace Database\Seeders;

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

class DepartmentSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $departments = [
            ['name' => 'Engineering', 'description' => 'Software development and technical operations'],
            ['name' => 'Marketing', 'description' => 'Brand growth, demand generation, and communications'],
            ['name' => 'Product', 'description' => 'Product management and user experience design'],
            ['name' => 'Business', 'description' => 'Business and Operations department'],
        ];

        foreach ($departments as $dept) {
            \App\Models\Department::updateOrCreate(
                ['name' => $dept['name']],
                [
                    'description' => $dept['description'],
                    'status' => true,
                ]
            );
        }
    }
}
