from server.modules.descriptions.domain import Breed
from server.modules.descriptions.repository import ACharactersRepository


class CharactersService:
    __slots__ = ("_repository",)

    def __init__(self, repository: ACharactersRepository):
        self._repository = repository

    async def get_characters(self, kind: str) -> list[Breed]:
        return await self._repository.get_characters(kind)

    async def get_character(self, alias: str) -> Breed | None:
        return await self._repository.get_character(alias)
