package com.zjty.tynotes.pas.dao;

import com.zjty.tynotes.pas.entity.Authority;
import com.zjty.tynotes.pas.entity.RoleAuthority;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * @Author gwj
 * @create 2020/2/28 14:14
 */
public interface RoleAuthorityDao extends MongoRepository<RoleAuthority,String> {
    void deleteAllByAuthorityId(String id);

    void deleteAllByRoleId(String id);

    List<RoleAuthority> findAllByRoleIdIn(List<String> roleIds);

    List<RoleAuthority> findAllByRoleId(String roleId);
}
