Initial FastAPI admin auth scaffold
This commit is contained in:
1
app/constants/model/__init__.py
Normal file
1
app/constants/model/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Model constants."""
|
||||
1
app/constants/model/admin_user/__init__.py
Normal file
1
app/constants/model/admin_user/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Admin user constants."""
|
||||
12
app/constants/model/admin_user/admin_user_status_code.py
Normal file
12
app/constants/model/admin_user/admin_user_status_code.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from enum import IntEnum
|
||||
|
||||
|
||||
class AdminUserStatusCode(IntEnum):
|
||||
NORMAL = 1
|
||||
DISABLE = 2
|
||||
|
||||
def is_normal(self) -> bool:
|
||||
return self is AdminUserStatusCode.NORMAL
|
||||
|
||||
def is_disable(self) -> bool:
|
||||
return self is AdminUserStatusCode.DISABLE
|
||||
Reference in New Issue
Block a user