package com.ruoyi.bst.creditUser.service;

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

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

public interface CreditUserValidator {

    /**
     * 校验权限
     */
    default boolean hasPermission(Long id, AreaJoinPermission permission) {
        return hasPermission(Collections.singletonList(id), permission);
    }

    /**
     * 校验权限
     */
    boolean hasPermission(List<Long> ids, AreaJoinPermission permission);

    /**
     * 校验挂账用户
     * @param id
     */
    void validate(Long id);
}
