Skip to content

Commit

Permalink
Add missing sorting by name
Browse files Browse the repository at this point in the history
  • Loading branch information
koldakov committed Jan 2, 2024
1 parent c1ab0d4 commit 2f82c9b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/repositories/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,15 @@ class EpisodeDoesNotExist(Exception):
"""Episode does not exist."""


class CharacterOrderBy(Enum):
ID = "id"
NAME = "name"
CREATED_AT = "createdAt"


class Character(Base):
__tablename__ = "characters"
order_by = CharacterOrderBy

id: Mapped[int] = mapped_column(primary_key=True)

Expand Down

0 comments on commit 2f82c9b

Please sign in to comment.