package dev.dinauer.maven.maven.token;

import dev.dinauer.maven.maven.token.dto.Token;
import io.quarkus.hibernate.orm.panache.PanacheRepositoryBase;
import io.quarkus.panache.common.Parameters;
import jakarta.enterprise.context.ApplicationScoped;

import java.util.List;

@ApplicationScoped
public class TokenRepo implements PanacheRepositoryBase<TokenEntity, String>
{
    public List<TokenEntity> findByUserId(String userId)
    {
        return list("userId = :userId", Parameters.with("userId", userId));
    }
}
