<?php

namespace Database\Seeders;

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

class AccountSeeder extends Seeder
{
    public function run(): void
    {
        $accounts = [
            [
                'name'        => 'Banco Nacional (USD)',
                'currency'    => 'USD',
                'fee_type'    => 'none',
                'fee_percent' => 0,
                'fee_fixed'   => 0,
            ],
            [
                'name'        => 'Banco Nacional (BOB)',
                'currency'    => 'BOB',
                'fee_type'    => 'none',
                'fee_percent' => 0,
                'fee_fixed'   => 0,
            ],
            [
                'name'        => 'Takenos USD',
                'currency'    => 'USD',
                'fee_type'    => 'takenos',
                'fee_percent' => 5.00,
                'fee_fixed'   => 0.50,
            ],
            [
                'name'        => 'Efectivo USD',
                'currency'    => 'USD',
                'fee_type'    => 'none',
                'fee_percent' => 0,
                'fee_fixed'   => 0,
            ],
            [
                'name'        => 'Efectivo BOB',
                'currency'    => 'BOB',
                'fee_type'    => 'none',
                'fee_percent' => 0,
                'fee_fixed'   => 0,
            ],
        ];

        foreach ($accounts as $data) {
            Account::updateOrCreate(['name' => $data['name']], $data);
        }
    }
}
