"""admin 埋点日志列表响应。"""
from __future__ import annotations

from datetime import datetime

from pydantic import BaseModel, ConfigDict


class AnalyticsEventOut(BaseModel):
    model_config = ConfigDict(from_attributes=True)

    id: int
    event: str
    # Who
    device_id: str
    user_id: int | None
    # When
    session_id: str | None
    client_ts: int
    sent_at: int | None
    created_at: datetime  # 服务端接收时间(server_at)
    # Where
    page: str | None
    client_ip: str | None
    # How
    oem: str | None
    os: str | None
    model: str | None
    app_ver: str | None
    network: str | None
    channel: str | None
    # What 专属
    props: dict | None
