from __future__ import annotations

from dataclasses import asdict, dataclass


@dataclass(slots=True)
class EvidenceLink:
    type: str
    target_id: str
    path: str | None = None
    start_line: int | None = None
    end_line: int | None = None
    note: str | None = None

    def to_dict(self) -> dict:
        return asdict(self)
