package kr.co.accura.wbx.spring.auth;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.transaction.annotation.Transactional;

import java.util.Optional;

public interface TotpSecretRepository extends JpaRepository<WbxTotpSecret, Long> {
    Optional<WbxTotpSecret> findByUserId(Long userId);

    @Modifying
    @Transactional
    void deleteByUserId(Long userId);
}
