<?php

namespace Database\Seeders;

use App\Models\Client;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class ClientSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        if (Client::count() == 0) {
            Client::create([
                'client_id' => 'CLT_1001',
                'name' => 'Riyad Traders',
                'phone' => '+8801XXXXXXXXX',
                'fb_page' => 'https://fb.com/riyadtraders',
                'status' => 'Active',
                'deposited' => 50.00,
                'spent' => 10.00,
                'scopes' => ['Facebook Marketing', 'Landing Page'],
                'portal_key' => \Illuminate\Support\Str::random(32)
            ]);
            
            Client::create([
                'client_id' => 'CLT_1002',
                'name' => 'Mira Foods',
                'phone' => '+8801YYYYYYYYY',
                'fb_page' => 'https://fb.com/mirafoods',
                'status' => 'Active',
                'deposited' => 120.00,
                'spent' => 92.00,
                'scopes' => ['Facebook Marketing', 'Consultancy'],
                'portal_key' => \Illuminate\Support\Str::random(32)
            ]);
        }
    }
}
