<?php

namespace Database\Seeders;

use App\Enums\UserRoleEnum;
use App\Models\User;
use Illuminate\Database\Seeder;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        // Create admin user
        User::factory()->create([
            'name' => 'Admin User',
            'email' => 'admin@dinero.local',
            'password' => 'password123', // Will be hashed automatically
            'role' => UserRoleEnum::ADMIN,
        ]);

        // Create regular user
        User::factory()->create([
            'name' => 'Regular User',
            'email' => 'user@dinero.local',
            'password' => 'password123', // Will be hashed automatically
            'role' => UserRoleEnum::USER,
        ]);

        // Keep original demo user for backward compatibility
        User::factory()->create([
            'name' => 'Shipu Ahamed',
            'email' => 'demo@dinero.app',
            'role' => UserRoleEnum::ADMIN, // Original user gets admin role
        ]);
    }
}

