<?php

namespace Database\Seeders\Initial;

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

class UnitTypeSeeder extends Seeder
{
  public function run(): void
  {
    $units = [
      ['code' => 'pcs', 'name' => 'Pcs'],
      ['code' => 'btl', 'name' => 'Botol'],
      ['code' => 'klg', 'name' => 'Kaleng'],
      ['code' => 'lsn', 'name' => 'Lusin'],
      ['code' => 'koli', 'name' => 'Koli'],
      ['code' => 'bks', 'name' => 'Bungkus'],
      ['code' => 'roll', 'name' => 'Roll'],
      ['code' => 'unit', 'name' => 'Unit'],
      ['code' => 'set', 'name' => 'Set'],
      ['code' => 'pkg', 'name' => 'Pack'],
      ['code' => 'psg', 'name' => 'Pasang'],
      ['code' => 'ltr', 'name' => 'Liter'],
      ['code' => 'mtr', 'name' => 'Meter'],
      ['code' => 'org', 'name' => 'Orang'],
      ['code' => 'kmr', 'name' => 'Kamar'],
      ['code' => 'kali', 'name' => 'Kali'],
      ['code' => 'rim', 'name' => 'Rim'],
      ['code' => 'hr', 'name' => 'Hari'],
      ['code' => 'mgg', 'name' => 'Minggu'],
      ['code' => 'bln', 'name' => 'Bulan'],
      ['code' => 'thn', 'name' => 'Tahun'],
    ];

    foreach ($units as $unit) {
      UnitType::create($unit);
    }
  }
}
