import { createParamDecorator, ExecutionContext } from '@nestjs/common';
import { TenantContextService } from '../utils/tenant-context.service';

export const CurrentTenant = createParamDecorator(
  (data: unknown, ctx: ExecutionContext) => {
    return TenantContextService.getTenant();
  },
);

export const TenantId = createParamDecorator(
  (data: unknown, ctx: ExecutionContext) => {
    return TenantContextService.getTenantId();
  },
);
