package com.td.boss.game.complayers.repository;

import com.td.boss.common.repository.*;
import com.td.boss.game.complayers.pojo.ComPlayers;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

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

@Repository
public interface ComPlayersRepository extends CommonRepository<ComPlayers, Integer> {

    Optional<ComPlayers> findByUserId(String userId);

    @Query(value = "select user_id from com_users", nativeQuery = true)
    List<String> findUserIds();
}
