<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;


class DesignationSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $now = Carbon::now();
        DB::table('designations')->insert([
            // Management
            ['code' => '1001', 'name' => 'Production Manager', 'description' => 'Oversees production process', 'created_at' => $now, 'updated_at' => $now],
            ['code' => '1002','name' => 'Warehouse Supervisor', 'description' => 'Manages warehouse operations', 'created_at' => $now, 'updated_at' => $now],
            ['code' => '1003','name' => 'HR Officer', 'description' => 'Manages employee records and payroll', 'created_at' => $now, 'updated_at' => $now],
            ['code' => '1004','name' => 'Sales Executive', 'description' => 'Handles customer orders and sales', 'created_at' => $now, 'updated_at' => $now],

            // Production & Quality
            ['code' => '2001','name' => 'Quality Control Officer', 'description' => 'Checks product quality', 'created_at' => $now, 'updated_at' => $now],
            ['code' => '2002','name' => 'Worker', 'description' => 'Performs manufacturing or factory floor tasks', 'created_at' => $now, 'updated_at' => $now],
            ['code' => '2003','name' => 'Machine Operator', 'description' => 'Operates production machinery', 'created_at' => $now, 'updated_at' => $now],
            ['code' => '2004','name' => 'Helper / Assistant', 'description' => 'Assists workers and operators', 'created_at' => $now, 'updated_at' => $now],

            // Support Staff
            ['code' => '3001','name' => 'Office Boy', 'description' => 'Performs office errands and support tasks', 'created_at' => $now, 'updated_at' => $now],
            ['code' => '3002','name' => 'Cleaner', 'description' => 'Maintains cleanliness in office and factory', 'created_at' => $now, 'updated_at' => $now],
            ['code' => '3003','name' => 'Driver', 'description' => 'Drives company vehicles for deliveries and staff transport', 'created_at' => $now, 'updated_at' => $now],
            ['code' => '3004','name' => 'Security Guard', 'description' => 'Ensures safety and security of premises', 'created_at' => $now, 'updated_at' => $now],
        ]);

    }
}
