import { SetMetadata } from '@nestjs/common';
import { UserRole } from '../interfaces/jwt-payload.interface';

export const ROLES_KEY = 'roles';

/**
 * Decorator to restrict endpoint access by user role.
 * Usage: @Roles(UserRole.ADMIN, UserRole.ISSUER)
 */
export const Roles = (...roles: UserRole[]) => SetMetadata(ROLES_KEY, roles);
