package com.younike.common.constant;

/**
 * 通用常量信息
 */
public class Constants {
    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * 通用成功标识
     */
    public static final String SUCCESS = "0";

    /**
     * 通用失败标识
     */
    public static final String FAIL = "1";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 当前记录起始索引
     */
    public static final String PAGE_NUM = "pageNum";

    /**
     * 每页显示记录数
     */
    public static final String PAGE_SIZE = "pageSize";

    /**
     * 排序列
     */
    public static final String ORDER_BY_COLUMN = "orderByColumn";

    /**
     * 排序的方向 "desc" 或者 "asc".
     */
    public static final String IS_ASC = "isAsc";

    /**
     * 参数管理 cache name
     */
    public static final String SYS_CONFIG_CACHE = "sys-config";

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache name
     */
    public static final String SYS_DICT_CACHE = "sys-dict";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    /**
     * 验证码 key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 验证码有效期（毫秒）
     */
    public static final Integer CAPTCHA_EXPIRATION = 10 * 60 * 1000;

    public static final String SMS_LOGIN_CODE = "smsShareLogin_";

    public static final String SMS_REGISTER_CODE = "smsRegister_";

    public static final String SMS_Bind_CODE = "smsBind_";

    public static final String WX_CODE = "wxCode_";

    public static final String SMS_WITHDRAWAL_CODE = "smsWithdrawal_";

    public static final String SMS_PERSONNELLOGIN_CODE = "smsPersonnelloginLogin_";


    public enum PayState {
        NOPAY("001", 1), HASPAY("002", 2);

        PayState(String name, int index) {
            this.name = name;
            this.index = index;
        }

        // 成员变量
        public String name;
        public int index;
    }


    /**
     * 家庭组邀请
     */
    public static final String SMS_INVITE_CODE = "smsInvite_";

    /**
     * 微信支付链接前缀
     */
    public static final String WX_PAY_LINK = "wxPayLink_";

    /**
     * 微信支付链接前缀
     */
    public static final String PayWxCode = "001";
    public static final String PayAliCode = "002";

    /**
     * 默认PageSize
     */
    public static Integer DEFAULT_PAGE_SIZE = 10;

    /**
     * 骑手位置（redis保存）
     */
    public static final String RIDER_POSITION_CODE = "riderPosition";

    /**
     * 库存锁前缀
     */
    public static final String LOCK_GOODS_INVENTORY = "LOCK_GOODS_INVENTORY:";

    /**
     * 商品库存锁最大时间
     */
    public static final Integer MAX_INVENTORY_SECONDS = 3;

    /**
     * 待支付订单前缀
     */
    public static final String PREFIX_NO_PAY_ORDER = "PRE_PAY_ORDER:";

    /**
     * 待接单订单前缀
     */
    public static final String PREFIX_NO_ORDER = "PRE_ORDER:";

    /**
     * 优鲜行派送请求
     */
    public static final String YXX_DELIVERY = "YXX_DELIVERY";

    public static final String ORDER_NO_KEY = "ORDER_NO_KEY:";

    /**
     * 优鲜行派送请求过期时间（分钟）
     */
    public static final Integer YXX_DELIVERY_EXPIRE_TIME_MINUTES = 2;

    /**
     * 未支付订单过期时间（分钟）
     */
    public static final Integer EXPIRE_TIME_MINUTES = 5;

    public static final String OragnPark = "_organ_park_";

    /**
     * 未接单订单过期时间（分钟）
     */
    public static final Integer EXPIRE_UN_ORDER_MINUTES = 15;

    /**
     * 2021-9-8 Another 待解绑隐私号前缀
     */
    public static final String PREFIX_TO_BE_UNBOUND = "TO_BE_UNBOUND:";

    /**
     * 2021-9-8 Another 待解绑隐私号过期时间（分钟）
     */
    public static final Integer EXPIRE_TIME_TO_BE_UNBOUND = 30;

    /**
     * 2021-9-17 Another 骑手端回调失败前缀
     */
    public static final String PREFIX_DELIVER_CALLBACK = "DELIVER_CALLBACK:";

    /**
     * 2021-9-17 Another 骑手端回调失败 过期时间（分钟）
     */
    public static final Integer EXPIRE_TIME_DELIVER_CALLBACK = 1;

    /**
     * 2021-11-25 zulu.chen 导入Excel多级分类分隔符
     */
    public static final String EXCEL_SPLIT_CHARACTER = "/";

}
