login route
This commit is contained in:
19
backend/sitemanagement/constants/account_types.py
Normal file
19
backend/sitemanagement/constants/account_types.py
Normal 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()
|
||||
Reference in New Issue
Block a user