from dataclasses import dataclass
from datetime import datetime


@dataclass(frozen=True, slots=True)
class MaterialRecognition:
    id: str
    user_id: str
    policy_id: str
    material_type: str
    source_name: str
    media_type: str
    fields: dict[str, str]
    confidence: float
    warnings: tuple[str, ...]
    status: str
    created_at: datetime
    confirmed_at: datetime | None = None


@dataclass(frozen=True, slots=True)
class ServiceRequest:
    id: str
    request_no: str
    user_id: str
    policy_id: str
    request_type: str
    recognition_id: str
    confirmed_fields: dict[str, str]
    status: str
    submitted_at: datetime
    reviewed_by: str | None = None
    review_note: str | None = None
    reviewed_at: datetime | None = None
