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

export enum UserRole {
  TRAINER = 'trainer',
  COORDINATOR = 'coordinator',
  MANAGER = 'manager',
  RECEPTIONIST = 'receptionist',
  CLUB_ADMIN = 'club_admin',
  SUPER_ADMIN = 'super_admin',
}

export const ROLES_KEY = 'roles';

/**
 * Restrict access to specific user roles.
 *
 * @example
 * @Roles(UserRole.TRAINER, UserRole.COORDINATOR)
 * @UseGuards(JwtAuthGuard, RolesGuard)
 * async getTrainers() { ... }
 */
export const Roles = (...roles: UserRole[]) => SetMetadata(ROLES_KEY, roles);
