refactoring

This commit is contained in:
Alexander Kalinovsky
2025-01-09 13:11:10 +01:00
parent 7793a0cb77
commit 3898a333fa
29 changed files with 1065 additions and 381 deletions

View File

@@ -16,15 +16,18 @@ class CallbackCommand(StrEnum):
SET_LANGUAGE = "ls"
DATE_PICKER_MONTH = "dm"
DATE_PICKER_YEAR = "dy"
STRING_EDITOR_LOCALE = "sl"
#STRING_EDITOR_LOCALE = "sl"
ENTITY_PICKER_PAGE = "ep"
ENTITY_PICKER_TOGGLE_ITEM = "et"
VIEW_FILTER_EDIT = "vf"
USER_COMMAND = "uc"
class CommandContext(StrEnum):
SETTING_EDIT = "se"
ENTITY_CREATE = "ec"
ENTITY_EDIT = "ee"
ENTITY_FIELD_EDIT = "ef"
class ContextData(BaseCallbackData, prefix = "cd"):
command: CallbackCommand
@@ -32,5 +35,6 @@ class ContextData(BaseCallbackData, prefix = "cd"):
entity_name: str | None = None
entity_id: int | None = None
field_name: str | None = None
user_command: str | None = None
data: str | None = None
back: bool = False