from pydantic import BaseModel

from src.huesoporro.models import Quote
from src.huesoporro.svc.get_random_quote import RandomQuoteGetterSvc


class GetRandomQuoteAction(BaseModel):
    quote_getter_svc: RandomQuoteGetterSvc

    async def run(self, channel_name: str) -> Quote | None:
        return await self.quote_getter_svc.run(channel_name=channel_name)
