Skip to content

Commit

Permalink
#22: refactor: rename base repository (BaseRepository -> `BaseRedis…
Browse files Browse the repository at this point in the history
…Repository`)
  • Loading branch information
ReznikovRoman committed Jul 3, 2022
1 parent 6f59db9 commit 88e8454
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ugc/domain/bookmarks/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
from aredis_om import NotFoundError as RedisNotFoundError

from ugc.common.exceptions import NotFoundError
from ugc.infrastructure.db.repositories import BaseRepository
from ugc.infrastructure.db.repositories import BaseRedisRepository

from . import types
from .factories import FilmBookmarkFactory
from .models import FilmBookmark


class BookmarkRepository(BaseRepository[FilmBookmark]):
class BookmarkRepository(BaseRedisRepository[FilmBookmark]):
"""Репозиторий для работы с данными закладок."""

model = FilmBookmark
Expand Down
4 changes: 2 additions & 2 deletions src/ugc/domain/progress/repositories.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from aredis_om import NotFoundError as RedisNotFoundError

from ugc.common.exceptions import NotFoundError
from ugc.infrastructure.db.repositories import BaseRepository
from ugc.infrastructure.db.repositories import BaseRedisRepository

from .factories import FilmProgressFactory
from .models import UserFilmProgress
from .types import FilmProgress


class FilmProgressRepository(BaseRepository[UserFilmProgress]):
class FilmProgressRepository(BaseRedisRepository[UserFilmProgress]):
"""Репозиторий для работы с данными прогресса фильма."""

model = UserFilmProgress
Expand Down
2 changes: 1 addition & 1 deletion src/ugc/infrastructure/db/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ModelInfo(NamedTuple):
created: bool


class BaseRepository(Generic[_RM]):
class BaseRedisRepository(Generic[_RM]):
"""Базовый репозиторий для работы с данными модели `RedisModel`."""

model: Type[_RM]
Expand Down

0 comments on commit 88e8454

Please sign in to comment.