<?php

namespace Database\Seeders;

use App\Auth\PasswordHasher;
use App\Shared\ValueObject\EmailAddress;
use App\User\CreateUserDto;
use App\User\UserRepository;
use Illuminate\Database\Seeder;

class UserSeeder extends Seeder
{
    public function run(): void
    {
        $userRepository = app(UserRepository::class);
        $passwordHasher = app(PasswordHasher::class);
        $userRepository->create(new CreateUserDto(
            email: new EmailAddress('admin@rabbigerzi.test'),
            passwordHash: $passwordHasher->hash('password123!@#'),
        ));
    }
}
