<?php

namespace Database\Seeders;

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

class UserSeeder extends Seeder
{
    public function run(): void
    {
        User::updateOrCreate(
            ['email' => 'test@example.com'],
            [
                'firstname' => 'Test',
                'lastname' => 'User',
                'phone' => '+1234567899',
                'password' => bcrypt('password'),
                'status' => 'active',
                'user_type' => UserType::CUSTOMER->value,
            ]
        );

        User::updateOrCreate(
            ['email' => 'customer@4colors.com'],
            [
                'firstname' => 'Customer',
                'lastname' => 'User',
                'phone' => '+1234567898',
                'password' => bcrypt('password'),
                'status' => 'active',
                'user_type' => UserType::CUSTOMER->value,
            ]
        );
    }
}
