<?php

namespace Database\Seeders;

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

class DatabaseSeeder extends Seeder
{
    public function run(): void
    {
        // AdminSeeder চালাও
        $this->call([
            AdminSeeder::class,
            DefaultPlanSeeder::class,
        ]);

        // Default Test User
        User::factory()->create([
            'name' => 'Test User',
            'username' => 'testuser',               // NOT NULL
            'email' => 'test@example.com',
            'uid' => strtoupper(Str::random(6)),    // NOT NULL
            'phone' => '01234567890',               // NOT NULL, must add
            'password' => bcrypt('password123'),
        ]);
    }
}