"""Pydantic models for schema comparison and self-assessment scorecard."""

from pydantic import BaseModel


# --- Comparison models (two schemas) ---

class CriterionScore(BaseModel):
    criterion: str          # e.g., "Domain Coverage"
    v1_score: float         # 0.0-10.0
    v2_score: float         # 0.0-10.0
    notes: str              # Why scores differ


class SchemaProfile(BaseModel):
    label: str              # "V1" or user-defined
    strengths: list[str]    # 3-5 bullets
    weaknesses: list[str]   # 3-5 bullets
    best_for: str           # One-sentence summary


class ComparisonResult(BaseModel):
    summary: str            # 1-2 sentence overview
    criteria: list[CriterionScore]  # Exactly 10
    v1_overall: float       # 0.0-10.0
    v2_overall: float       # 0.0-10.0
    v1_profile: SchemaProfile
    v2_profile: SchemaProfile
    verdict: str            # Recommendation paragraph


# --- Self-assessment models (single schema) ---

class SingleCriterionScore(BaseModel):
    criterion: str          # e.g., "Domain Coverage"
    score: float            # 0.0-10.0
    notes: str              # Justification for this score
    improvement: str        # Specific fix to raise the score


class SelfAssessmentResult(BaseModel):
    summary: str            # 1-2 sentence quality overview
    criteria: list[SingleCriterionScore]  # Exactly 10
    overall: float          # 0.0-10.0 arithmetic mean
    grade: str              # A+, A, B+, B, C+, C, D, F
    strengths: list[str]    # 3-5 bullets
    weaknesses: list[str]   # 3-5 bullets
    verdict: str            # Overall quality assessment paragraph
