Skip to content

Commit

Permalink
✨ add link_to method
Browse files Browse the repository at this point in the history
  • Loading branch information
barabum0 committed Aug 3, 2023
1 parent 2880d71 commit 0e29bbf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion aiogram_translation/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@
class BaseTranslationBuilder(BaseModel):
key: str
linked_to_key: Optional[str] = None
name: str
name: str

@classmethod
def link_to(cls, key: str) -> "BaseTranslationBuilder":
return cls(
linked_to_key=key
)

0 comments on commit 0e29bbf

Please sign in to comment.