<?php

namespace MintyPHP\Repository\User;

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;
}
