import { SetMetadata } from '@nestjs/common';

export const PERMISSION_KEY = 'permission';

/**
 * 权限装饰器
 * @param permissions 单个权限或多个权限（多个权限为 OR 逻辑，满足其一即可）
 */
export const RequirePermission = (...permissions: string[]) =>
  SetMetadata(PERMISSION_KEY, permissions);
