from __future__ import annotations

from dataclasses import dataclass

from app.models.user import User


@dataclass(frozen=True)
class ChatAccessScope:
    source_type: str = "direct"
    source_client_id: int | None = None

    @classmethod
    def direct(cls) -> "ChatAccessScope":
        return cls()


@dataclass(frozen=True)
class UserAuthContext:
    user: User
    chat_scope: ChatAccessScope
