<?php
// database/seeders/TarifPekerjaanSeeder.php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Carbon\Carbon;

class TarifPekerjaanSeeder extends Seeder
{
    public function run(): void
    {
        $now = Carbon::now();

        DB::table('tarif_pekerjaans')->insert([

            // ==========================================
            // 1. SR - Sambungan Rumah (Meteran Air)
            // ==========================================
            [
                'jenis_pekerjaan'       => 'sr',
                'nama_item'             => 'Sambungan Rumah (SR) - Meteran Air',
                'kode_item'             => 'SR-METERAN',
                'dimensi_pipa'          => null,
                'tarif_per_unit'        => 150000,
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => true,
                'durasi_garansi_bulan'  => 3,
                'deskripsi'             => 'Pemasangan meteran air (SR) Rp 150.000 per unit, garansi 3 bulan',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],

            // ==========================================
            // 2. Pengembangan Jaringan Pipa (per meter, per dimensi)
            // ==========================================
            [
                'jenis_pekerjaan'       => 'pengembangan_jaringan_pipa',
                'nama_item'             => 'Pengembangan Jaringan Pipa Dim 2',
                'kode_item'             => 'PJP-DIM2',
                'dimensi_pipa'          => '1-2',
                'tarif_per_unit'        => null,
                'tarif_per_meter'       => 15000,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Pemasangan pipa baru diameter 2 dim, Rp 15.000/meter',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'pengembangan_jaringan_pipa',
                'nama_item'             => 'Pengembangan Jaringan Pipa Dim 3',
                'kode_item'             => 'PJP-DIM3',
                'dimensi_pipa'          => '3',
                'tarif_per_unit'        => null,
                'tarif_per_meter'       => 18000,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Pemasangan pipa baru diameter 3 dim, Rp 18.000/meter',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'pengembangan_jaringan_pipa',
                'nama_item'             => 'Pengembangan Jaringan Pipa Dim 4',
                'kode_item'             => 'PJP-DIM4',
                'dimensi_pipa'          => '4',
                'tarif_per_unit'        => null,
                'tarif_per_meter'       => 20000,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Pemasangan pipa baru diameter 4 dim, Rp 20.000/meter',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'pengembangan_jaringan_pipa',
                'nama_item'             => 'Pengembangan Jaringan Pipa Dim 6',
                'kode_item'             => 'PJP-DIM6',
                'dimensi_pipa'          => '6',
                'tarif_per_unit'        => null,
                'tarif_per_meter'       => 25000,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Pemasangan pipa baru diameter 6 dim, Rp 25.000/meter',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'pengembangan_jaringan_pipa',
                'nama_item'             => 'Pengembangan Jaringan Pipa Dim 8',
                'kode_item'             => 'PJP-DIM8',
                'dimensi_pipa'          => '8',
                'tarif_per_unit'        => null,
                'tarif_per_meter'       => 40000,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Pemasangan pipa baru diameter 8 dim, Rp 40.000/meter',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'pengembangan_jaringan_pipa',
                'nama_item'             => 'Pengembangan Jaringan Pipa Dim 10',
                'kode_item'             => 'PJP-DIM10',
                'dimensi_pipa'          => '10',
                'tarif_per_unit'        => null,
                'tarif_per_meter'       => 60000,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Pemasangan pipa baru diameter 10 dim, Rp 60.000/meter',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],

            // ==========================================
            // 3. Pengangkatan (meteran atau gate valve)
            // ==========================================
            [
                'jenis_pekerjaan'       => 'pengangkatan',
                'nama_item'             => 'Pengangkatan Meteran / Gate Valve',
                'kode_item'             => 'ANGKAT-MGV',
                'dimensi_pipa'          => null,
                'tarif_per_unit'        => 200000,
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Pengangkatan meteran air atau gate valve terpendam, Rp 200.000 per unit',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],

            // ==========================================
            // 4. Pemasangan Gate Valve + Pressure
            // ==========================================
            [
                'jenis_pekerjaan'       => 'pemasangan_gate_valve',
                'nama_item'             => 'Pemasangan Gate Valve + Pressure (Dengan Pipa Besi)',
                'kode_item'             => 'GV-PAKAI-PIPA',
                'dimensi_pipa'          => null,
                'tarif_per_unit'        => 200000,
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => true,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Pemasangan gate valve + pressure dengan pipa besi, Rp 200.000',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'pemasangan_gate_valve',
                'nama_item'             => 'Pemasangan Gate Valve + Pressure (Tanpa Pipa Besi)',
                'kode_item'             => 'GV-TANPA-PIPA',
                'dimensi_pipa'          => null,
                'tarif_per_unit'        => 0,
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => false,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Pemasangan gate valve + pressure tanpa pipa besi, GRATIS (Rp 0)',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],

            // ==========================================
            // 5. Gali Urug
            // ==========================================
            [
                'jenis_pekerjaan'       => 'gali_urug',
                'nama_item'             => 'Gali Urug',
                'kode_item'             => 'GALI-URUG',
                'dimensi_pipa'          => null,
                'tarif_per_unit'        => 200000,
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Gali urug per titik, Rp 200.000/titik',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],

            // ==========================================
            // 6. Perbaikan Jaringan Pipa Bocor (per dimensi)
            // ==========================================
            [
                'jenis_pekerjaan'       => 'perbaikan_jaringan_pipa',
                'nama_item'             => 'Perbaikan Pipa Bocor Dim 1-2',
                'kode_item'             => 'PJP-BOR-DIM1-2',
                'dimensi_pipa'          => '1-2',
                'tarif_per_unit'        => 200000,
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Perbaikan pipa bocor diameter 1-2 dim, Rp 200.000/titik',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'perbaikan_jaringan_pipa',
                'nama_item'             => 'Perbaikan Pipa Bocor Dim 3',
                'kode_item'             => 'PJP-BOR-DIM3',
                'dimensi_pipa'          => '3',
                'tarif_per_unit'        => 400000,
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Perbaikan pipa bocor diameter 3 dim, Rp 400.000/titik',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'perbaikan_jaringan_pipa',
                'nama_item'             => 'Perbaikan Pipa Bocor Dim 4',
                'kode_item'             => 'PJP-BOR-DIM4',
                'dimensi_pipa'          => '4',
                'tarif_per_unit'        => 400000,
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Perbaikan pipa bocor diameter 4 dim, Rp 400.000/titik',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'perbaikan_jaringan_pipa',
                'nama_item'             => 'Perbaikan Pipa Bocor Dim 6',
                'kode_item'             => 'PJP-BOR-DIM6',
                'dimensi_pipa'          => '6',
                'tarif_per_unit'        => 400000,
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Perbaikan pipa bocor diameter 6 dim, Rp 400.000/titik',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'perbaikan_jaringan_pipa',
                'nama_item'             => 'Perbaikan Pipa Bocor Dim 8',
                'kode_item'             => 'PJP-BOR-DIM8',
                'dimensi_pipa'          => '8',
                'tarif_per_unit'        => 750000,
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Perbaikan pipa bocor diameter 8 dim, Rp 750.000/titik',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'perbaikan_jaringan_pipa',
                'nama_item'             => 'Perbaikan Pipa Bocor Dim 10',
                'kode_item'             => 'PJP-BOR-DIM10',
                'dimensi_pipa'          => '10',
                'tarif_per_unit'        => 900000,
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Perbaikan pipa bocor diameter 10 dim, Rp 900.000/titik',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],

            // ==========================================
            // 7. Pengecatan Pipa Besi (2x tarif perbaikan per dimensi)
            // ==========================================
            [
                'jenis_pekerjaan'       => 'pengecatan_pipa_besi',
                'nama_item'             => 'Pengecatan Pipa Besi Dim 1-2',
                'kode_item'             => 'CAT-DIM1-2',
                'dimensi_pipa'          => '1-2',
                'tarif_per_unit'        => 400000, // 2x 200.000
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Pengecatan pipa besi dim 1-2, Rp 400.000 (2x tarif perbaikan)',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'pengecatan_pipa_besi',
                'nama_item'             => 'Pengecatan Pipa Besi Dim 3',
                'kode_item'             => 'CAT-DIM3',
                'dimensi_pipa'          => '3',
                'tarif_per_unit'        => 800000, // 2x 400.000
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Pengecatan pipa besi dim 3, Rp 800.000 (2x tarif perbaikan)',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'pengecatan_pipa_besi',
                'nama_item'             => 'Pengecatan Pipa Besi Dim 4',
                'kode_item'             => 'CAT-DIM4',
                'dimensi_pipa'          => '4',
                'tarif_per_unit'        => 800000, // 2x 400.000
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Pengecatan pipa besi dim 4, Rp 800.000 (2x tarif perbaikan)',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'pengecatan_pipa_besi',
                'nama_item'             => 'Pengecatan Pipa Besi Dim 6',
                'kode_item'             => 'CAT-DIM6',
                'dimensi_pipa'          => '6',
                'tarif_per_unit'        => 800000, // 2x 400.000
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Pengecatan pipa besi dim 6, Rp 800.000 (2x tarif perbaikan)',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'pengecatan_pipa_besi',
                'nama_item'             => 'Pengecatan Pipa Besi Dim 8',
                'kode_item'             => 'CAT-DIM8',
                'dimensi_pipa'          => '8',
                'tarif_per_unit'        => 1500000, // 2x 750.000
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Pengecatan pipa besi dim 8, Rp 1.500.000 (2x tarif perbaikan)',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'pengecatan_pipa_besi',
                'nama_item'             => 'Pengecatan Pipa Besi Dim 10',
                'kode_item'             => 'CAT-DIM10',
                'dimensi_pipa'          => '10',
                'tarif_per_unit'        => 1800000, // 2x 900.000
                'tarif_per_meter'       => null,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Pengecatan pipa besi dim 10, Rp 1.800.000 (2x tarif perbaikan)',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],

            // ==========================================
            // 8. Penyempurnaan Jaringan Pipa (sama seperti pengembangan)
            // ==========================================
            [
                'jenis_pekerjaan'       => 'penyempurnaan_jaringan_pipa',
                'nama_item'             => 'Penyempurnaan Jaringan Pipa Dim 2',
                'kode_item'             => 'SEMPURNA-DIM2',
                'dimensi_pipa'          => '1-2',
                'tarif_per_unit'        => null,
                'tarif_per_meter'       => 15000,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Penyempurnaan jaringan pipa dim 2 (pipa kecil ke besar), Rp 15.000/meter',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'penyempurnaan_jaringan_pipa',
                'nama_item'             => 'Penyempurnaan Jaringan Pipa Dim 3',
                'kode_item'             => 'SEMPURNA-DIM3',
                'dimensi_pipa'          => '3',
                'tarif_per_unit'        => null,
                'tarif_per_meter'       => 18000,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Penyempurnaan jaringan pipa dim 3, Rp 18.000/meter',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'penyempurnaan_jaringan_pipa',
                'nama_item'             => 'Penyempurnaan Jaringan Pipa Dim 4',
                'kode_item'             => 'SEMPURNA-DIM4',
                'dimensi_pipa'          => '4',
                'tarif_per_unit'        => null,
                'tarif_per_meter'       => 20000,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Penyempurnaan jaringan pipa dim 4, Rp 20.000/meter',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'penyempurnaan_jaringan_pipa',
                'nama_item'             => 'Penyempurnaan Jaringan Pipa Dim 6',
                'kode_item'             => 'SEMPURNA-DIM6',
                'dimensi_pipa'          => '6',
                'tarif_per_unit'        => null,
                'tarif_per_meter'       => 25000,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Penyempurnaan jaringan pipa dim 6, Rp 25.000/meter',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'penyempurnaan_jaringan_pipa',
                'nama_item'             => 'Penyempurnaan Jaringan Pipa Dim 8',
                'kode_item'             => 'SEMPURNA-DIM8',
                'dimensi_pipa'          => '8',
                'tarif_per_unit'        => null,
                'tarif_per_meter'       => 40000,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Penyempurnaan jaringan pipa dim 8, Rp 40.000/meter',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
            [
                'jenis_pekerjaan'       => 'penyempurnaan_jaringan_pipa',
                'nama_item'             => 'Penyempurnaan Jaringan Pipa Dim 10',
                'kode_item'             => 'SEMPURNA-DIM10',
                'dimensi_pipa'          => '10',
                'tarif_per_unit'        => null,
                'tarif_per_meter'       => 60000,
                'pakai_pipa_besi'       => null,
                'ada_garansi'           => false,
                'durasi_garansi_bulan'  => null,
                'deskripsi'             => 'Penyempurnaan jaringan pipa dim 10, Rp 60.000/meter',
                'is_active'             => true,
                'created_at'            => $now,
                'updated_at'            => $now,
            ],
        ]);
    }
}