from pydantic import BaseModel
from typing import List, Optional


class HelpdeskMessage(BaseModel):
    """Helpdesk message as stored in Firestore."""
    id: str
    sender_id: str = ""
    sender_name: str = ""
    type: str = ""  # Problem, Suggestion, Question, Other
    date_sent: str = ""
    subject: str = ""
    message: str = ""
    phone: str = ""
    device_id: str = ""
    device_name: str = ""
    acknowledged: bool = False
    acknowledged_by: str = ""
    acknowledged_at: str = ""


class HelpdeskListResponse(BaseModel):
    messages: List[HelpdeskMessage]
    total: int
