gold eggs backend
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s
This commit is contained in:
1
core/enums/__init__.py
Executable file
1
core/enums/__init__.py
Executable file
@@ -0,0 +1 @@
|
||||
from .core import *
|
||||
42
core/enums/core.py
Executable file
42
core/enums/core.py
Executable file
@@ -0,0 +1,42 @@
|
||||
class Codes:
|
||||
# Database errors
|
||||
DB_CONNECTION_ERROR = 1001
|
||||
DB_SQL_EXECUTION_ERROR = 1002
|
||||
DB_READ_ERROR = 1003
|
||||
DB_WRITE_ERROR = 1004
|
||||
|
||||
# Filesystem errors
|
||||
FILE_OPEN_ERROR = 2001
|
||||
FILE_WRITE_ERROR = 2002
|
||||
FILE_READ_ERROR = 2003
|
||||
FILE_DELETE_ERROR = 2004
|
||||
|
||||
# Connection errors
|
||||
NETWORK_CONNECTION_ERROR = 3001
|
||||
NETWORK_HTTP_REQUEST_ERROR = 3002
|
||||
NETWORK_WEBSOCKET_ERROR = 3003
|
||||
|
||||
# Programming errors
|
||||
INVALID_PARAMETER_VALUE = 4001
|
||||
REQUIRED_PARAMETER_MISSING = 4002
|
||||
CONSTRAINT_VIOLATION = 4003
|
||||
INVALID_PARAMETERS = 4006
|
||||
NOT_FOUND_ERROR = 4004
|
||||
USER_ALREADY_EXISTS_ERROR = 4005
|
||||
USER_NOT_FOUND_ERROR = 4006
|
||||
BOCKED_ERROR = 4007
|
||||
INVALID_OTP_ERROR = 4008
|
||||
|
||||
# Security errors
|
||||
AUTHENTICATION_ERROR = 5001
|
||||
UNAUTHORIZED_ACCESS = 5002
|
||||
CSRF_DETECTED = 5003
|
||||
INVALID_CREDENTIALS = 5005
|
||||
|
||||
|
||||
class Messages:
|
||||
SEND_MESSAGE = "Sms %(phone)s raqamiga yuborildi"
|
||||
USER_ALREADY_EXISTS = "User already exists"
|
||||
OTP_CONFIRMED = "Tasdiqlash ko'di qabul qilindi"
|
||||
INVALID_OTP = "Tasdiqlash ko'di xato"
|
||||
CHANGED_PASSWORD = "Parol o'zgartirildi"
|
||||
Reference in New Issue
Block a user