<?php

namespace Database\Seeders;

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

class ReferensiAlternatifSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $data = [
            // tanaman padi
            [
                'id' => '1',
                'plant_id' => '1',
                'criteria_id' => '1',
                'value_alternatif' => '325'
            ],
            [
                'id' => '2',
                'plant_id' => '1',
                'criteria_id' => '2',
                'value_alternatif' => '20'
            ],
            [
                'id' => '3',
                'plant_id' => '1',
                'criteria_id' => '3',
                'value_alternatif' => '6'
            ],
            [
                'id' => '4',
                'plant_id' => '1',
                'criteria_id' => '4',
                'value_alternatif' => '77.5'
            ],
            [
                'id' => '5',
                'plant_id' => '1',
                'criteria_id' => '5',
                'value_alternatif' => '26'
            ],
            [
                'id' => '6',
                'plant_id' => '1',
                'criteria_id' => '6',
                'value_alternatif' => '1.5'
            ],
            [
                'id' => '7',
                'plant_id' => '1',
                'criteria_id' => '7',
                'value_alternatif' => '5.75'
            ],

            // tanaman jagung
            [
                'id' => '8',
                'plant_id' => '2',
                'criteria_id' => '1',
                'value_alternatif' => '750'
            ],
            [
                'id' => '9',
                'plant_id' => '2',
                'criteria_id' => '2',
                'value_alternatif' => '25'
            ],
            [
                'id' => '10',
                'plant_id' => '2',
                'criteria_id' => '3',
                'value_alternatif' => '4.5'
            ],
            [
                'id' => '11',
                'plant_id' => '2',
                'criteria_id' => '4',
                'value_alternatif' => '70'
            ],
            [
                'id' => '12',
                'plant_id' => '2',
                'criteria_id' => '5',
                'value_alternatif' => '26.5'
            ],
            [
                'id' => '13',
                'plant_id' => '2',
                'criteria_id' => '6',
                'value_alternatif' => '2'
            ],
            [
                'id' => '14',
                'plant_id' => '2',
                'criteria_id' => '7',
                'value_alternatif' => '6.25'
            ],

            // tanaman ubi kayu
            [
                'id' => '15',
                'plant_id' => '3',
                'criteria_id' => '1',
                'value_alternatif' => '750'
            ],
            [
                'id' => '16',
                'plant_id' => '3',
                'criteria_id' => '2',
                'value_alternatif' => '22'
            ],
            [
                'id' => '17',
                'plant_id' => '3',
                'criteria_id' => '3',
                'value_alternatif' => '3.5'
            ],
            [
                'id' => '18',
                'plant_id' => '3',
                'criteria_id' => '4',
                'value_alternatif' => '62.5'
            ],
            [
                'id' => '19',
                'plant_id' => '3',
                'criteria_id' => '5',
                'value_alternatif' => '27.5'
            ],
            [
                'id' => '20',
                'plant_id' => '3',
                'criteria_id' => '6',
                'value_alternatif' => '2.5'
            ],
            [
                'id' => '21',
                'plant_id' => '3',
                'criteria_id' => '7',
                'value_alternatif' => '5.75'
            ],
        ];

        foreach ($data as $key => $value) {
            ReferensiAlternatif::create([
                'id' => $value['id'],
                'plant_id' => $value['plant_id'],
                'criteria_id' => $value['criteria_id'],
                'value_alternatif' => $value['value_alternatif']
            ]);
        }
    }
}
