package com.skr.mdm.constant;

/**
 * 正则表达式
 *
 * @author nfq
 * @date 2021/4/6 14:28
 */
public class RegexConstants {

    /**
     * 用户名正则（中文、英文、数字）
     */
    public static final String USER_NAME_REGEX = "^[\\u4E00-\\u9FA5A-Za-z0-9]{2,20}$";

    /**
     * 设备名正则（中文、英文、数字）
     */
    public static final String EQUIPMENT_NAME_REGEX = "^[\\u4E00-\\u9FA5A-Za-z0-9]{2,20}$";

    /**
     * 手机号正则
     */
    public static final String PHONE_NUMBER_REGEX = "^(?:(?:\\+|00)86)?1\\d{10}$";

    /**
     * 部门名称
     */
    public static final String DEPT_NAME_REGEX = "^[a-zA-Z0-9\\u4e00-\\u9fa5]([a-zA-Z0-9\\u4e00-\\u9fa5_-]{0,48}[a-zA-Z0-9\\u4e00-\\u9fa5])?$";


    /**
     * 密码正则
     */
    public static final String PASSWORD_REGEX = "^(?![0-9]+$)(?![a-zA-Z]+$)(?!([^(0-9a-zA-Z)]|[()])+$)([^(0-9a-zA-Z)]|[()]|[a-zA-Z]|[0-9]){6,20}$";

    /**
     * IMEI正则
     */
    public static final String IMEI_REGEX = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{15,17}$";

    public static final String IMEI_NUMBER_REGEX = "^\\d{15,17}$";

    public static final String PACKAGE_NAME_REGEX = "^([A-Za-z]{1}[A-Za-z\\d_]*\\.)+[A-Za-z][A-Za-z\\d_]*$";
}
