package com.td.WaDa.game.complayersattri.repository;

import com.td.WaDa.common.repository.CommonRepository;
import com.td.WaDa.game.complayersattri.pojo.ComPlayersLucky;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface ComPlayersLuckyRepository extends CommonRepository<ComPlayersLucky, Integer> {
    List<ComPlayersLucky> findAllByUserId(String userId);

    Optional<ComPlayersLucky> findFirstByUserIdAndToolsIdOrderByCreateTimeDesc(String userId, Integer toolsId);
}
