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

/**
 * @author lyz
 * @mail lyz@disanbo.com
 * @create 018/7/12 11:03
 * @description BJ项目全局常量定义
 */

public class MALLGlobalConfig {

    /**
     * 项目前缀
     */
    public static final String PROJECT_PREFIX = "ly";

    /**
     * 认证TOKEN
     */
    //管理员登陆token
    public static final String MALL_TOKEN_REDIS_KEY_SUFFIX = "_" + PROJECT_PREFIX + "_mall_admin_token";
    //手机验证码
    public static final String PHONE_CODE_REDIS_KEY_SUFFIX = "_" + PROJECT_PREFIX + "_phone_code";
    //  商户注册
    public static final String PHONE_CODE_MERCHANT_REGISTER_REDIS_KEY_SUFFIX = "_" + PROJECT_PREFIX + "_phone_code_merchant_register";
    //  注册进度
    public static final String PHONE_CODE_REGISTER_STATUS_REDIS_KEY_SUFFIX = "_" + PROJECT_PREFIX + "_phone_code_register_status";
    //  修改密码
    public static final String PHONE_CODE_REPAIR_PWD_REDIS_KEY_SUFFIX = "_" + PROJECT_PREFIX + "_phone_code_repair_pwd";
    //  身份验证
    public static final String PHONE_CODE_IDENTITY_REDIS_KEY_SUFFIX = "_" + PROJECT_PREFIX + "_phone_code_identity";
    //  身份验证临时token
    public static final String IDENTITY_AUTH_REDIS_KEY_SUFFIX = "_" + PROJECT_PREFIX + "_identity_auth_token";
    //商城用户登陆token
    public static final String MALL_LOGIN_SUFFIX = "_" + PROJECT_PREFIX + "_mall_login";
    //商户注册token
    public static final String MERCHANT_REGISTER_SUFFIX = "_" + PROJECT_PREFIX + "_merchant_register_token";


    /**
     * 校验规则
     */
    //管理员密码校验规则
    public static final String ADMIN_PASSWORD_REGEX = "^[0-9a-zA-Z!@#$%^&*?_.]{6,16}$";

    /**
     * 默认账号
     */
    //平台商户号
    public static final String PLATFORM_MERCHANT_ID = "e3ac4b4a4e65460dbd9f1ec6cbd7a900";
    //平台商户-商户号
    public static final String PLATFORM_ADMIN_MERCHANT_ID = "30dfdc0977e343a5919b527448a7123f";
    //平台管理员
    public static final String PLATFORM_ADMIN = "admin";
    //平台商户管理员
    public static final String PLATFORM_ADMIN_MERCH = "admin_merch";
    //平台基础积分
    public static final String PLATFORM_BASE_INTEGRAL = "BASE";
    //平台商户前缀和名称
    public static final String PLATFORM_MERCHANT_PREFIX = "ZY";
    public static final String PLATFORM_MERCHANT_NAME = "自营";

    /**
     * 区块链相关
     */
    //TOKEN发行和回收地址后缀
    public static final String ADDR_ISSUE_SUFFIX = "_" + PROJECT_PREFIX + "_issue_" + System.currentTimeMillis() / 1000;
    public static final String ADDR_RECOVER_SUFFIX = "_" + PROJECT_PREFIX + "_recover_" + System.currentTimeMillis() / 1000;
    public static final String ADDR_EXTERN_SUFFIX = "_" + PROJECT_PREFIX + "_extern_" + System.currentTimeMillis() / 1000;
    public static final String ADDR_NFT_SUFFIX = "_" + PROJECT_PREFIX + "_nft_" + System.currentTimeMillis() / 1000;

    //

    /**
     * 状态类别参数 类别
     */
    public static final int REPAIR_PWD = 1;
    public static final int ENTERPRISE_TYPE = 2;
    public static final int GOODS_TYPE = 3;
    public static final int RETURN_TYPE = 4;
    public static final int GOODS_STATUS = 5;
    public static final int GOODS_CHECK_STATUS = 6;
    public static final int USER_LOCK = 7;
    public static final int MEMBER_SHIP = 8;
    public static final int MERCHANT_SHIP = 9;
    public static final int MERCHANT_LOCK = 10;
    public static final int MERCHANT_CHECK = 11;
    public static final int ON_OFF = 12;
    public static final int PAY_MODE = 13;
    public static final int INTEGRAL_CHECK = 14;
    public static final int INTEGRAL_DISABLE = 15;
    public static final int SEND_TYPE = 16;
    public static final int ADDRESSEE_TYPE = 17;
    public static final int INTEGRAL_TYPE = 18;
    public static final int TRAN_OBJECT = 19;
    public static final int ROLE_TYPE = 20;

    /**
     * 密码
     */
    //初始密码
    public static final String INIT_PASSWORD = "123456";

    public static final String SENSITIVE_WORDS_REDIS_KEY = PROJECT_PREFIX + "_sensitive_words";

    /**
     * 管理员默认权限
     */
    //平台默认权限
    public static final Integer[] PLAT_DEFAULT_AUTH = {
            1101, 1103, 1104, 1102, 1105, 1006,
            1001, 1007, 1008, 2001, 2002, 2003,
            2004, 5001, 5013, 5008, 5007, 5002,
            5014, 5009, 5006, 3010, 3009, 3011,
            3013, 3012, 3005, 1301, 1304, 1302,
            1303, 8001, 8002, 1201, 1203, 1202,
            9001, 9002
    };
    //商户默认权限
    public static final Integer[] MERCHANT_DEFAULT_AUTH = {
            1001, 1002, 1005, 1009, 1008, 2001,
            2002, 3004, 3002, 3001, 5001, 5002,
            5003, 5006, 7002, 7001, 7003, 7004,
            4001, 4002, 8001, 8002, 1201, 9001,
            9002
    };
    //平台商户默认权限
    public static final Integer[] PLATFORM_MERCHANT_DEFAULT_AUTH = {
            1001, 1002, 1005, 1009, 1008, 1003,
            1004, 2001, 2002, 3004, 3002, 3001,
            5001, 5002, 5003, 5006, 7002, 7001,
            7003, 7004, 4001, 4002, 8001, 8002,
            1201, 9001, 9002
    };

    //[1001,1002,1003,1004,1005,1009,1008,2001,2002,3001,3002,3003,3004,4001,4002,5001,5002,5003,5004,5005,5006,6001,6002,6003,7001,7002,7003,7004,8001,8002,9001,9002,1201]
    //[1001,1002,1005,1009,1008,2001,2002,3001,3002,3003,3004,4001,4002,5001,5002,5003,5004,5005,5006,6001,6002,6003,7001,7002,7003,7004,8001,8002,9001,9002,1201]
    //[1101,1102,1103,1104,1105,1006,1007,1001,1008,2001,2002,2003,2004,3005, 3007, 3009, 3010, 3011, 3012, 3013, 5001,5007,5008,5009,5010,5011,5002,5014,5012,5013,5005,1201,1202,1203,6004,6005,6001,6002,1301,1304,1302,1303,8001,8002,9001,9002]

    //NFT 前缀
    public static final String NFT_PREFIX = "NFT-";
}
