User holds email (EmailAddress vo), passwordHash, isAdmin - tide keeps password and admin flag on the user row directly (no separate profile entity like youngstartup). UserRepository exposes find, findByEmail, create. CreateUserDto is readonly with explicit isAdmin (per shared.md no-default-args rule).
14 lines
248 B
PHP
14 lines
248 B
PHP
<?php
|
|
|
|
namespace App\User;
|
|
|
|
use App\Shared\ValueObject\EmailAddress;
|
|
|
|
readonly class CreateUserDto
|
|
{
|
|
public function __construct(
|
|
public EmailAddress $email,
|
|
public string $passwordHash,
|
|
public bool $isAdmin,
|
|
) {}
|
|
}
|