<?php

namespace Database\Seeders;

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

class KriteriaSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $kriteria = [
            ['nama' => 'Karbohidrat', 'kode' => 'C1' , 'tipe_kriteria_id' => 1, 'bobot' => 0.3],
            ['nama' => 'Lemak', 'kode' => 'C2' ,  'tipe_kriteria_id' => 2, 'bobot' => 0.25],
            ['nama' => 'Protein', 'kode' => 'C3' ,  'tipe_kriteria_id' => 1, 'bobot' => 0.25],
            ['nama' => 'Serat', 'kode' => 'C4' , 'tipe_kriteria_id' => 1, 'bobot' => 0.1],
        ];

        foreach ($kriteria as $value) {
            Kriteria::create($value);
        }

    }
}
