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

export const QUOTA_METRIC_KEY = 'quota_metric';

/**
 * Decorator to enforce quota check before executing a route handler.
 * Usage: @RequireQuota('listings_created')
 */
export const RequireQuota = (metric: string) =>
  SetMetadata(QUOTA_METRIC_KEY, metric);
