<?php

namespace Database\Seeders;

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

class SettingRuleSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $rules = [
            ['rule_name' => 'sales_return_days', 'value' => '7'],
        ];

        foreach ($rules as $rule) {
            SettingRule::firstOrCreate(
                ['rule_name' => $rule['rule_name']],
                ['value' => $rule['value']]
            );
        }
    }
}
