"""
Compliance Pipeline Data Models.

Dataclasses for checkpoints, controls, and measures.
"""

from typing import Optional, List
from dataclasses import dataclass


@dataclass
class Checkpoint:
    """A requirement/checkpoint extracted from legal text."""
    id: str
    regulation_code: str
    regulation_name: str
    article: Optional[str]
    title: str
    description: str
    original_text: str
    chunk_id: str
    source_url: str


@dataclass
class Control:
    """A control derived from checkpoints."""
    id: str
    domain: str
    title: str
    description: str
    checkpoints: List[str]  # List of checkpoint IDs
    pass_criteria: str
    implementation_guidance: str
    is_automated: bool
    automation_tool: Optional[str]
    priority: str


@dataclass
class Measure:
    """A remediation measure for a control."""
    id: str
    control_id: str
    title: str
    description: str
    responsible: str
    deadline_days: int
    status: str
