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

export const AUDIT_ACTION_KEY = 'audit:action';
export const AUDIT_SKIP_KEY = 'audit:skip';

/** Overrides the action name the AuditInterceptor would otherwise derive. */
export const AuditAction = (action: string) => SetMetadata(AUDIT_ACTION_KEY, action);

/** Excludes a mutating admin route from the audit trail. */
export const SkipAudit = () => SetMetadata(AUDIT_SKIP_KEY, true);
