- Add single-line class docblocks to all 59 repository classes and interfaces describing scope and responsibility - Add multi-line docblocks to key services documenting business rules: AuthService (6-step login cascade), ImportService (3-phase CSV workflow), TenantScopeService (strict/permissive modes), PermissionService (RBAC resolution + two-tier caching), UserAccountService (atomicity + audit) - Add transaction(callable) wrapper to DatabaseSessionRepository to DRY up begin/commit/rollback boilerplate Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
42 lines
1.3 KiB
PHP
42 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace MintyPHP\Repository\User;
|
|
|
|
/** Contract for user creation, updates, activation, tenant assignment, and preference changes. */
|
|
interface UserWriteRepositoryInterface
|
|
{
|
|
public function updateLastLogin(int $userId, string $provider = 'local'): void;
|
|
|
|
public function bumpAuthzVersion(int $userId): bool;
|
|
|
|
public function bumpAuthzVersionByUserIds(array $userIds): int;
|
|
|
|
public function create(array $data): int|false;
|
|
|
|
public function update(int $id, array $data): bool;
|
|
|
|
public function setActive(int $id, bool $active, ?int $changedBy = null): bool;
|
|
|
|
public function setCurrentTenant(int $id, int $tenantId): bool;
|
|
|
|
public function setActiveByUuids(array $uuids, bool $active, ?int $modifiedBy = null): bool;
|
|
|
|
public function setInactiveByIds(array $userIds, ?int $changedBy = null): int;
|
|
|
|
public function deleteByIds(array $userIds): int;
|
|
|
|
public function setLocale(int $id, string $locale): bool;
|
|
|
|
public function setTheme(int $id, string $theme): bool;
|
|
|
|
public function updateProfileFieldsFromSso(int $id, array $fields): bool;
|
|
|
|
public function setPassword(int $id, string $password): bool;
|
|
|
|
public function setEmailVerified(int $id): bool;
|
|
|
|
public function delete(int $id): bool;
|
|
|
|
public function deleteByUuids(array $uuids): bool;
|
|
}
|