from pydantic import BaseModel

from huesoporro.models import Quote
from huesoporro.svc.quotes_svcs import GetRandomQuoteSvc


class GetRandomQuoteAction(BaseModel):
    get_random_quote_svc: GetRandomQuoteSvc

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