package com.malk.server.common;

import lombok.Getter;

/**
 * 定义返回值和对应状态的信息
 */
public enum McREnum {

    SUCCESS(true, "200", "SUCCESS"),
    IGNORE_EXECUTE(true, "200", "IGNORE THE CURRENT EXECUTE RESULT"),
    VALIDATED_PARAM(false, "4001", "PARAMETER VERIFICATION FAILS"),
    TOKEN_INVALID(false, "4002", "TOKEN INVALID"),
    NOT_AUTHORIZED(false, "4003", "ERROR INVALID AUTH STATE"),
    VALIDATED_ACCESS(false, "4004", "VALIDATE IS DISSATISFY THE CONDITION"),
    METHOD_EXECUTE(false, "5001", "ENCOUNTER AN ERROR WHEN EXECUTE METHOD"),
    NULL_POINTER(false, "5002", "ENCOUNTER AN ERROR NULL POINTER EXCEPTION"),
    VENDOR_ERROR(false, "5004", "VENDOR PLATFORM ERROR EXCEPTION"),
    UNKNOWN_EXCEPTION(false, "6001", "THIS IS AN UNKNOWN EXCEPTION");

    @Getter
    private String code;
    @Getter
    boolean suc;
    @Getter
    private String msg;

    McREnum(boolean suc, String code, String msg) {
        this.suc = suc;
        this.code = code;
        this.msg = msg;
    }
}
