/**
 * DTO: EvaluationResultDto
 * 
 * Result of DSL eligibility evaluation with explainable reasons.
 */

export interface EvaluationReason {
  /**
   * What was evaluated
   */
  target: string; // e.g., 'platform.driving', 'external.iracing.iRating'
  
  /**
   * Operator used
   */
  operator: string; // e.g., '>=', 'between'
  
  /**
   * Expected threshold/range
   */
  expected: number | [number, number];
  
  /**
   * Actual value found
   */
  actual: number;
  
  /**
   * Whether this condition failed
   */
  failed: boolean;
  
  /**
   * Human-readable explanation
   */
  message?: string;
}

export interface EvaluationResultDto {
  /**
   * Overall eligibility status
   */
  eligible: boolean;
  
  /**
   * Individual condition results
   */
  reasons: EvaluationReason[];
  
  /**
   * Summary message
   */
  summary: string;
  
  /**
   * Timestamp of evaluation
   */
  evaluatedAt: string; // ISO date string
  
  /**
   * Optional metadata
   */
  metadata?: {
    userId?: string;
    filter?: string;
    [key: string]: unknown;
  };
}
