using Domain.Entities.Forum.Boards;
using Domain.Entities.Members;

namespace Application.Abstractions.Forum;

public interface IBoardPermissionService
{
    /// <summary>
    /// 회원의 유효 권한 레벨 계산
    /// - IsAdmin → 1000, BoardManager → 99, 그 외 → memberGrade.Order (기본 0)
    /// </summary>
    Task<short> GetMemberPermissionLevelAsync(Member member, int boardID, CancellationToken ct);

    /// <summary>
    /// 특정 권한 레벨에 대해 회원이 접근 가능한지 확인
    /// </summary>
    Task<bool> HasPermissionAsync(Member member, int boardID, short requiredPermission, CancellationToken ct);

    /// <summary>
    /// 게시판 매니저 정보 조회 (CanEdit/CanDelete 확인용)
    /// </summary>
    Task<BoardManager?> GetBoardManagerAsync(int boardID, int memberID, CancellationToken ct);
}