"""系统使用统计服务接口。"""

from __future__ import annotations

from abc import ABC, abstractmethod
from typing import Any

from fastapi_modules.fastapi_leaudit.domian.vo.usageStatsVo import (
    UsageStatsAreaPageVO,
    UsageStatsDepartmentPageVO,
    UsageStatsDetailPageVO,
    UsageStatsOverviewVO,
    UsageStatsTrendVO,
    UsageStatsUserPageVO,
)


class IUsageStatsService(ABC):
    """系统使用统计服务接口。"""

    @abstractmethod
    async def RecordLoginEvent(
        self,
        *,
        UserInfo: dict[str, Any] | None,
        Sub: str | None,
        LoginResult: str,
        LoginType: str,
        IpAddress: str | None,
        UserAgent: str | None,
        FailureReason: str | None = None,
        TokenJti: str | None = None,
    ) -> None:
        ...

    @abstractmethod
    async def GetOverview(self, CurrentUserId: int, Filters: dict[str, Any]) -> UsageStatsOverviewVO:
        ...

    @abstractmethod
    async def GetTrends(self, CurrentUserId: int, Filters: dict[str, Any]) -> UsageStatsTrendVO:
        ...

    @abstractmethod
    async def GetUsers(self, CurrentUserId: int, Filters: dict[str, Any]) -> UsageStatsUserPageVO:
        ...

    @abstractmethod
    async def GetDepartments(self, CurrentUserId: int, Filters: dict[str, Any]) -> UsageStatsDepartmentPageVO:
        ...

    @abstractmethod
    async def GetAreas(self, CurrentUserId: int, Filters: dict[str, Any]) -> UsageStatsAreaPageVO:
        ...

    @abstractmethod
    async def GetDetails(self, CurrentUserId: int, Filters: dict[str, Any]) -> UsageStatsDetailPageVO:
        ...
