from pydantic import BaseModel

from src.huesoporro.infra.db import Database
from src.huesoporro.models import ChatbotSettings, User


class ChatbotSettingsStorerSvc(BaseModel):
    db: Database

    async def run(self, user: User, bot_settings: ChatbotSettings):
        return await self.db.save_chatbot_settings(
            user=user, chatbot_settings=bot_settings
        )
