from pydantic import BaseModel

from src.huesoporro.infra.repos import QuoteRepo
from src.huesoporro.models import Quote


class RandomQuoteGetterSvc(BaseModel):
    quote_repo: QuoteRepo

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