<?php

namespace Database\Seeders;

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

class AppSettingSeeder extends Seeder
{
    public function run(): void
    {
        $defaults = [
            ['key' => 'dimension_unit',    'value' => 'm',  'label' => 'Dimension Measurement Unit'],
            ['key' => 'feed_quantity_unit', 'value' => 'kg', 'label' => 'Feed Quantity Unit'],
        ];

        foreach ($defaults as $setting) {
            AppSetting::firstOrCreate(['key' => $setting['key']], $setting);
        }
    }
}
