SD_WebTagManager/python/ResponseCode.py

26 lines
834 B
Python

from enum import unique, Enum
@unique
class RequestMethod(Enum):
GET = 1
POST = 2
PUT = 3
@unique
class ResponseCode(Enum):
def __init__(self, code: int, message: str) -> None:
self.code: int = code
self.message: str = message
RESPONSE_100_CONTINUE = 100, "Continue"
RESPONSE_101_NOT_BUILD_MSG = 101, "Not Build Message"
RESPONSE_102_PARAM_ERROR = 102, "参数错误"
RESPONSE_103_MODEL_ERROR = 103, "不允许使用的模型"
RESPONSE_200_SUCCESS = 200, "Success"
RESPONSE_405_METHODS_NOT_ALLOWED = 405, "Method Not Allowed"
RESPONSE_500_SERVER_Exception = 500, "服务器逻辑处理异常"
RESPONSE_501_1_API_EXCEPTION = 501.1, "腾讯云API调用异常" # API调用异常
RESPONSE_501_2_API_EXCEPTION = 501.2, "百度云API调用异常" # API调用异常