# -*- coding:utf-8 -*-
"""
@author: yq
@time: 2023/9/18
@desc: 结果状态枚举值
"""

from enum import Enum


class ResultCodesEnum(Enum):

    SUCCESS = {"code": "200", "message": "success"}
    SYSTEM_ERROR = {"code": "1001", "message": "system error"}
    TIME_OUT = {"code": "1002", "message": "time out"}
    ILLEGAL_PARAMS = {"code": "1003", "message": "illegal params"}
    NOT_FOUND = {"code": "1004", "message": "not found"}

    @property
    def message(self):
        return self.value['message']

    @property
    def code(self):
        return self.value['code']
