<?php

namespace Database\Seeders;

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

class UnitSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $units = array(
            array(
                "name" => "ADMIN",
            ),
            array(
                "name" => "EXECUTIVE",
            ),
            array(
                "name" => "ACCOUNTING",
            ),
            array(
                "name" => "ACCOUNTS RECEIVABLES",
            ),
            array(
                "name" => "FINANCE",
            ),
            array(
                "name" => "HUMAN RESOURCE",
            ),
            array(
                "name" => "LABORATORY",
            ),
            array(
                "name" => "NURSING",
            ),
            array(
                "name" => "TECHNICAL",
            ),
            array(
                "name" => "TRAINING",
            ),
            array(
                "name" => "WAREHOUSE",
            ),
            array(
                "name" => "AUDIT",
            ),
            array(
                "name" => "ACCESSORIES",
            ),
            array(
                "name" => "PEOPLE_OD",
            ),
            array(
                "name" => "EXECUTIVE OFFICE",
            ),
            array(
                "name" => "ADD",
            ),
            array(
                "name" => "IT",
            ),
        );
        
        Unit::insert($units);
    }

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