<?php

namespace Database\Seeders;

use App\Models\Group;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class GroupSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $group = array(
            array(
                "code" => "18",
                "name" => "CORPORATE COMM & MARKETING GROUP",
            ),
            array(
                "code" => "17",
                "name" => "CORPLAN",
            ),
            array(
                "code" => "20",
                "name" => "CONSULTANCY",
            ),
            array(
                "code" => "21",
                "name" => "HUMAN RESOURCE, OD & LEGAL GROUP",
            ),
            array(
                "code" => "MIS",
                "name" => "MANAGEMENT INFORMATION SERVICE GROUP",
            ),
            array(
                "code" => "PLAG",
                "name" => "PROCUREMENT, LOGISTIC AND ADMINISTRATIVE GROUP",
            ),
            array(
                "code" => "UM",
                "name" => "UNIVERSAL MOTORS",
            ),
            array(
                "code" => "16",
                "name" => "ADMIN GROUP",
            ),
            array(
                "code" => "1",
                "name" => "SUPPORT GROUP",
            ),
            array(
                "code" => "10",
                "name" => "EXECUTIVE OFFICE",
            ),
            array(
                "code" => "11",
                "name" => "SERVICE GROUP",
            ),
            array(
                "code" => "12",
                "name" => "DMS GROUP",
            ),
            array(
                "code" => "13",
                "name" => "DCRC",
            ),
            array(
                "code" => "14",
                "name" => "FINANCING GROUP",
            ),
            array(
                "code" => "15",
                "name" => "PDI GROUP",
            ),
            array(
                "code" => "2",
                "name" => "SALES AND MARKETING GROUP",
            ),
            array(
                "code" => "3",
                "name" => "AFTERSALES GROUP",
            ),
            array(
                "code" => "4",
                "name" => "ACCOUNTING GROUP",
            ),
            array(
                "code" => "5",
                "name" => "AUDIT GROUP",
            ),
            array(
                "code" => "6",
                "name" => "MANAGEMENT INFORMATION SYSTEM",
            ),
            array(
                "code" => "7",
                "name" => "CREDIT AND COLLECTION",
            ),
            array(
                "code" => "8",
                "name" => "HUMAN RESOURCE, OD,LEGAL & ADMIN GROUP",
            ),
            array(
                "code" => "9",
                "name" => "PROCUREMENT GROUP",
            ),
        );
        
        Group::insert($group);
    }

    public function reset()
    {
        Group::truncate();
    }
}
