package com.storlead.framework.common.enums;

import lombok.Getter;


/**
 * 定义ResultCode
 */
@Getter
public enum ResultCode {
    /**
     * 操作成功
     */
    SUCCESS(200, "操作成功"),

    FAILED(-1, "处理失败"),

    ERROR_500(500, "500"),

    LOGIN_FAIL(401, "未登录"),

    FORBIDDEN(403, "权限不足"),

    RULES_FAILED(1002, "规则校验失败"),

    VALIDATE_FAILED(1003, "参数校验失败"),

    PARAM_IS_NEEDED(1004, "缺少必传参数"),

    SMS_CHECK_IS_NEEDED(1005, "验证码失效或不存在,请先验证短信验证码"),

    ERROR(5000, "未知错误")
    ;

    public int code;
    public String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
