import { SetMetadata } from '@nestjs/common';
import { Role } from '../generated/prisma/enums.js';

export const ROLES_KEY = 'roles';

/**
 * 角色装饰器：给路由声明允许访问的角色集合。
 */
export const Roles = (...roles: Role[]) => SetMetadata(ROLES_KEY, roles);
