rating
This commit is contained in:
68
core/identity/application/dtos/EvaluationResultDto.ts
Normal file
68
core/identity/application/dtos/EvaluationResultDto.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* 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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user