package com.izouma.awesomeAdmin.repo;

import com.izouma.awesomeAdmin.domain.User;
import com.izouma.awesomeAdmin.security.Authority;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface UserRepo extends JpaRepository<User, Long>, JpaSpecificationExecutor<User> {
    User findByUsername(String username);

    List<User> findAllByAuthoritiesContains(Authority authority);

    User findByOpenId(String openId);

    User findByPhone(String phone);
}
