from enum import IntEnum


class BaseResultErrorType(IntEnum):
    RES_OK = 0

    RES_ERR_BAD_FORMAT = 1000
    RES_ERR_SERVER_ERROR = 1001
    RES_ERR_NO_VALID_TOKEN = 1002
    RES_ERR_NOT_AUTHORIZED = 1003
    RES_ERR_DB_OPERATION = 1004
    RES_ERR_NAME_IN_USE = 1005
    RES_ERR_INVALID_STATE = 1007
    RES_ERR_TIMEOUT = 1008
    RES_ERR_CONNECTION_END = 1009
    RES_ERR_INVALID = 1011
    RES_ERR_TOO_FREQUENT = 1012
    RES_ERR_CANCELLED = 1013

    RES_ERR_RESOURCE_NOT_EXIST = 1020
    RES_ERR_RESOURCE_NOT_AVAILABLE = 1021
    RES_ERR_RESOURCE_NOT_ENOUGH = 1022
    RES_ERR_INVALID_CONFIG = 1030

    # auth
    RES_ERR_WRONG_PASSWORD = 2000
    RES_ERR_WRONG_ACTIVATION_CODE = 2001

    # users
    RES_ERR_USER_NOT_EXIST = 3000
    RES_ERR_EMAIL_IN_USE = 3001
    RES_ERR_USER_IN_USE = 3002
    RES_ERR_USER_OFFLINE = 3003

    # frontend

