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

export const ROLES_KEY = 'roles';

/**
 * Decorator to specify which roles are allowed to access a route
 * @param roles - Array of role names that are allowed
 * @example
 * ```typescript
 * @Roles('admin', 'hr-manager')
 * @Get('employees')
 * getEmployees() {
 *   return this.employeeService.findAll();
 * }
 * ```
 */
export const Roles = (...roles: string[]) => SetMetadata(ROLES_KEY, roles);
