package com.td.Dawa.game.comcharacters.repository;

import com.td.Dawa.common.repository.*;
import com.td.Dawa.game.comcharacters.pojo.ComCharacters;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Repository;

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

@Repository
public interface ComCharactersRepository extends CommonRepository<ComCharacters, Integer>  {

    Optional<ComCharacters> findByRoleId(Integer roleId);

    List<ComCharacters> findByUserIdAndProfessional(String userId,Integer professional, Sort sort);

    List<ComCharacters> findAllByUserId(String userId, Sort sort);

    List<ComCharacters> findByIdIn(Integer[] ids, Sort sort);

}
