package com.ruoyi.bst.credit.service;

import java.util.Collections;
import java.util.List;

import com.ruoyi.bst.areaJoin.domain.enums.AreaJoinPermission;

public interface CreditValidator {

    /**
     * 判断是否有权限
     * @param id
     * @return
     */
    default boolean hasPermission(Long id, AreaJoinPermission permission) {
        return hasPermission(Collections.singletonList(id), permission);
    }

    /**
     * 判断是否有权限
     * @param ids
     * @param permission
     * @return
     */
    boolean hasPermission(List<Long> ids, AreaJoinPermission permission);

}
