<?php

namespace Database\Seeders;

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

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     */
    public function run(): void
    {
        // Create admin user
        $admin = User::factory()->admin()->create();

        // Create test user
        $test = User::factory()->test()->create();

        // Create 10 random users
        User::factory(10)->create();

        // Create personal access tokens for admin
        $admin->createToken('admin-token', ['*'])->plainTextToken;

        // Create personal access token for test user
        $test->createToken('test-token', ['*'])->plainTextToken;

        $this->command->info('Database seeded successfully!');
        $this->command->info('Admin: admin@example.com / password');
        $this->command->info('Test: test@example.com / password');
    }
}
