<?php

namespace Database\Seeders;

use App\Models\Service;
use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;

class DatabaseSeeder extends Seeder
{
    public function run(): void
    {
        User::create([
            'name' => 'مدير النظام',
            'email' => 'admin@example.com',
            'password' => Hash::make('password'),
            'role' => 'admin',
            'balance_usd' => 0,
            'balance_syr' => 0,
        ]);

        User::create([
            'name' => 'مستخدم تجريبي',
            'email' => 'user@example.com',
            'password' => Hash::make('password'),
            'role' => 'user',
            'balance_usd' => 1000.00,
            'balance_syr' => 5000000,
        ]);

        $services = [
            ['name' => 'حوالات شام كاش', 'code' => 'sham_cash', 'type' => 'sham_cash'],
            ['name' => 'حوالات يوزرات', 'code' => 'users', 'type' => 'users'],
            ['name' => 'إيداعات شركات', 'code' => 'companies', 'type' => 'companies'],
            ['name' => 'صناديق', 'code' => 'funds', 'type' => 'funds'],
            ['name' => 'حوالات شركات داخلية', 'code' => 'internal_companies', 'type' => 'internal_companies'],
        ];

        foreach ($services as $service) {
            Service::create($service);
        }
    }
}
