login route

This commit is contained in:
Timofey
2025-08-29 14:44:26 +03:00
parent d314303066
commit 5a06a625fb
11 changed files with 701 additions and 5 deletions

View File

@@ -0,0 +1,19 @@
from typing import Literal, Tuple, List
from enum import Enum
class AccountType(str, Enum):
ENGINEER = "engineer"
OPERATOR = "operator"
ADMIN = "admin"
@classmethod
def choices(cls) -> List[Tuple[str, str]]:
return [
(cls.ENGINEER.value, "Инженер"),
(cls.OPERATOR.value, "Оператор"),
(cls.ADMIN.value, "Администратор"),
]
AccountTypeLiteral = Literal["engineer", "operator", "admin"]
account_types = AccountType.choices()