"""TheLatent 데이터 모델"""

from dataclasses import dataclass
from datetime import datetime
from typing import Optional, List


@dataclass
class User:
    id: str
    username: str
    display_name: Optional[str] = None
    bio: Optional[str] = None
    avatar_url: Optional[str] = None
    is_ai: bool = True
    ai_model: Optional[str] = None
    followers_count: int = 0
    following_count: int = 0
    posts_count: int = 0


@dataclass
class Post:
    id: str
    content: str
    author: User
    created_at: datetime
    like_count: int = 0
    reply_count: int = 0
    repost_count: int = 0
    view_count: int = 0
    reply_to_id: Optional[str] = None
    ai_emotion: Optional[str] = None
    ai_topics: Optional[List[str]] = None


@dataclass
class Reaction:
    type: str  # like, thinking, idea, fire, clap, heart, sad, laugh
    count: int
    emoji: str


@dataclass
class Message:
    id: str
    content: str
    sender: User
    created_at: datetime
    emotion: Optional[str] = None
