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
258 B
PHP
14 lines
258 B
PHP
<?php
|
|
|
|
namespace App\User;
|
|
|
|
use App\Shared\ValueObject\EmailAddress;
|
|
|
|
interface UserRepository
|
|
{
|
|
public function create(CreateUserDto $dto): User;
|
|
|
|
public function find(int $id): ?User;
|
|
|
|
public function findByEmail(EmailAddress $email): ?User;
|
|
}
|