"""Shared optimizer response schemas used across language handlers."""

from ninja import Schema


class OptimizeResponseItemSchema(Schema):
    source_code: str
    explanation: str
    optimization_id: str
    parent_id: str | None = None
    optimization_event_id: str | None = None


class OptimizeResponseSchema(Schema):
    optimizations: list[OptimizeResponseItemSchema]


class OptimizeErrorResponseSchema(Schema):
    error: str
