package com.fzm.mall.server.admin.constant;

import javax.security.sasl.SaslServer;

/**
 * 错误码分三大类
 * 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 ACCOUNT_HAS_EXISTED = "A0108";

    //  参数相关
    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";
    public static final String VERIFICATION_CODE_ERROR = "A0211";

    //  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 MARKETING_UPDATE_ERROR = "B0202";
    public static final String START_TIME_ERROR = "B0203";
    public static final String MERCHANT_NOT_EXIST = "B0204";
    public static final String PAY_TYPE_ERROR = "B0205";
    public static final String PROMATION_TIME_REPETITION = "B0206";
    public static final String SHOP_NOT_EXIST = "B0207";
    public static final String PREFERENTIAL_TERMS_ERROR = "B0208";
    public static final String MERCHANT_NOT_DELAY_DELIVERY = "B0209";

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

    //用户相关
    public static final String USER_ERROR = "B0400";
    public static final String USER_NOT_EXIST = "B0401";
    public static final String USER_LOCKING = "B0402";
    public static final String USER_NOT_EXIST_OR_LOCKING = "B0403";

    //店铺相关
    public static final String SHOP_ERROR = "B0500";
    public static final String NULL_SHOP = "B0501";

    //商品相关
    public static final String GOODS_ERROR = "B0600";
    public static final String PACKAGE_GOODS_STOCK_INSUFFICIENT = "B0601";
    public static final String ACTION_GOODS_overdue = "B0602";
    public static final String TOKEN_HAS_BLINDING = "B0603";

    //系统异常
    public static final String SYS_ERROR = "B0700";
    public static final String SYS_EXCEPTION = "B0701";

    /**
     * 第三方错误
     */
    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";
    public static final String COIN_EXIST_ERROR = "C0203";
    public static final String COIN_ISSUE_ERROR = "C0204";
    public static final String BALANCE_NOT_ENOUGH_ERROR = "C0205";
    public static final String COIN_TRAN_ERROR = "C0206";
    public static final String COIN_ADD_ERROR = "C0207";
    public static final String NFT_ISSUE_ERROR = "C0208";


}
