package com.fzm.mall.pay.constant;

/**
 * 错误码分三大类
 * 1.客户端 -- 以A0001开头
 * 2.业务端 -- 以B0001开头
 * 3.第三方 -- 以C0001开头
 * <p>
 * 每大类下分小类
 * 小类范围A01** - A99**
 * 先到先得
 * <p>
 * 小类下在细分具体错误
 * 范围A0101 - A0199
 *
 * @author wangp
 * @date 2021/2/26 16:06
 * @description 错误码
 * @since JDK 1.8
 */
public class MallResponseError {

    /**
     * 客户端错误
     */
    public static final String CLIENT_ERROR = "A0001";

    // 管理员相关
    public static final String ADMIN_ERROR = "A0100";
    public static final String ACCOUNT_OR_PASSWORD_ERROR = "A0101";
    public static final String PASSWORD_FORMAT_ERROR = "A0102";
    public static final String PASSWORDS_ENTERED_TWICE_ARE_INCONSISTENT = "A0103";
    public static final String ADMIN_NOT_EXISTED = "A0104";
    public static final String OLD_PASSWORD_ERROR = "A0105";
    public static final String HAS_LOCKING_ERROR = "A0106";
    public static final String PASSWORD_INIT_ERROR = "A0107";

    //  参数相关
    public static final String PARAM_ERROR = "A0200";
    public static final String NULL_PARAM_ERROR = "A0201";
    public static final String PHONE_FORMAT__ERROR = "A0202";
    public static final String PHONE_CODE__ERROR = "A0203";
    public static final String PHONE_EXIST__ERROR = "A0204";
    public static final String PHONE_NOT_REGISTER__ERROR = "A0205";
    public static final String VALUE_LT_0_ERROR = "A0206";
    public static final String COIN_HAS_EXIST = "A0207";
    public static final String COIN_NOT_RMB = "A0208";
    public static final String GOODS_NAME_EXIST = "A0209";
    public static final String ID_CARD_FORMAT_ERROR = "A0210";

    //  TOKEN相关
    public static final String TOKEN_ERROR = "A0300";
    public static final String NULL_TOKEN_ERROR = "A0301";
    public static final String INVALID_TOKEN_ERROR = "A0302";

    // 权限相关
    public static final String AUTH_ERROR = "A0400";
    public static final String NO_AUTH_ERROR = "A0401";

    //  上传
    public static final String UPLOAD_ERROR = "A0500";
    public static final String UPLOAD_FORMAT_ERROR = "A0501";

    /**
     * 业务端错误
     */
    public static final String UPDATE_FAIL = "B0100";
    public static final String SAVE_DUPLICATE = "B0101";
    public static final String DELETE_FAIL = "B0102";
    public static final String MERCHANT_ERROR = "B0200";
    public static final String CANCEL_ERROR = "B0201";

    //快递模板相关
    public static final String EXPRESS_TEMPLATE_ERROR = "B0300";
    public static final String NULL_TEMPLATE = "B0301";


    /**
     * 第三方错误
     */
    public static final String THIRD_ERROR = "C0001";

    //mysql相关
    public static final String MYSQL_ERROR = "C0100";
    public static final String SAVE_ERROR = "C0101";
    public static final String UPDATE_ERROR = "C0102";
    public static final String DELETE_ERROR = "C0103";

    //区块链
    public static final String BLOCKCHAIN_ERROR = "C0200";
    public static final String ADDRESS_ERROR = "C0201";
    public static final String PRI_KEY_ERROR = "C0202";
}
