from uuid import UUID

from pydantic import BaseModel

from huesoporro.models import Chatbot
from huesoporro.svc.chatbot_svcs import GetChatbotByUserIdSvc


class GetChatbotByUserIdAction(BaseModel):
    get_chatbot_by_user_id_svc: GetChatbotByUserIdSvc

    async def run(
        self,
        user_id: UUID,
    ) -> Chatbot | None:
        return await self.get_chatbot_by_user_id_svc.run(user_id=user_id)
