package com.hz.pm.api.common.model.constant;

import com.ningdatech.basic.model.ApiResponse;

import java.math.BigDecimal;

/**
 * <p>
 * 业务常量
 * </p>
 *
 * @author WendyYang
 * @since 13:42 2022/12/1
 */
public class BizConst {

    private BizConst() {
    }

    /**
     * SQL查询一条
     */
    public static final String LIMIT_1 = "limit 1";

    public static final String COOKIE_KEY = "HZPM_SESSION";

    /**
     * 一小时秒数
     **/
    public static final BigDecimal SECONDS_BY_HOUR = new BigDecimal(60 * 60);

    /**
     * 十分钟的毫秒数
     */
    public static final long MILLS_10_MIN = 1000L * 60 * 10;

    /**
     * 中国行政区划编码
     */
    public static final long ROOT_REGION_CODE = 100000L;

    public static final double D100 = 100.0;

    /**
     * 一级行政区划数量
     */
    public static final int NUM_PROVINCE = 34;

    /**
     * 默认的父id
     */
    public static final long PARENT_ID = 0L;

    /**
     * 默认树层级
     */
    public static final int TREE_GRADE = 0;

    /**
     * 默认的排序
     */
    public static final int SORT_VALUE = 0;

    /**
     * 浙江省的region_id
     */
    public static final long ZJ_REGION_CODE = 330000L;

    public static final String NINE_AREA_CODE_LAST = "000";

    /**
     * 省/直辖市 level
     */
    public static final int GOV_L1 = 1;

    /**
     * 市 level
     */
    public static final int GOV_L2 = 2;

    /**
     * 区/县 level
     */
    public static final int GOV_L3 = 3;

    /**
     * 密码正则：长度8-20位且至少包含大写字母、小写字母、数字或特殊符号中的任意三种
     */
    public static final String REGEX_PASS = "^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\\W_]+$)(?![a-z0-9]+$)(?![a-z\\W_]+$)(?![0-9\\W_]+$)[a-zA-Z0-9\\W_]{8,20}$";

    public static final ApiResponse<Void> UNAUTHENTICATED = ApiResponse.of(401, "用户未登录", null);

    public static final int MAX_EXPORT_COUNT = 5000;

    public static final String RESPONSE_KEY_DATA = "data";
    public static final String RESPONSE_KEY_ID = "id";
    public static final String RESPONSE_KEY_DING_CODE = "dingCode";
    public static final String RESPONSE_KEY_MATTER_NAME = "matterName";
    public static final String RESPONSE_KEY_ORG_NAME = "orgName";
    public static final String RESPONSE_KEY_USER_STATE = "userState";

    public static final String RESPONSE_KEY_AREA_NAME = "areaName";
    public static final String ORG_NAME = "organizationName";
    public static final String ORG_CODE = "organizationCode";

    public static final String DEV = "dev";
    public static final String PRE = "pre";
    public static final String PROD = "prod";

    public static final String SAVE_SUCCESS = "保存成功";
    public static final String OP_SUCCESS = "操作成功";
    public static final String OP_FAIL = "操作失败";
    public static final String SAVE_FAIL = "保存失败";
}
