first commit
This commit is contained in:
@ -0,0 +1,18 @@
|
||||
package com.greenorange.promotion.constant;
|
||||
|
||||
/**
|
||||
* 通用常量
|
||||
*/
|
||||
public interface CommonConstant {
|
||||
|
||||
/**
|
||||
* 升序
|
||||
*/
|
||||
String SORT_ORDER_ASC = "ascend";
|
||||
|
||||
/**
|
||||
* 降序
|
||||
*/
|
||||
String SORT_ORDER_DESC = " descend";
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.greenorange.promotion.constant;
|
||||
|
||||
/**
|
||||
* 正则表达式常量
|
||||
*
|
||||
* @author <a href="https://xuande-hk.gitee.io">玄德</a>
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public interface RegexConstant {
|
||||
/**
|
||||
* 手机号正则
|
||||
*/
|
||||
String PHONE_REGEX = "^1[3-9]\\d{9}$";
|
||||
|
||||
/**
|
||||
* 邮箱正则
|
||||
*/
|
||||
String EMAIL_REGEX = "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$";
|
||||
|
||||
/**
|
||||
* 18位身份证号正则
|
||||
*/
|
||||
String ID_CARD_REGEX = "^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9xX]$";
|
||||
|
||||
/**
|
||||
* 验证码正则, 6位数字或字母
|
||||
*/
|
||||
String VERIFY_CODE_REGEX = "^[a-zA-Z\\d]{6}$";
|
||||
|
||||
/**
|
||||
* 密码正则。4~32位的字母、数字、下划线
|
||||
*/
|
||||
String PASSWORD_REGEX = "^\\w{4,32}$";
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.greenorange.promotion.constant;
|
||||
|
||||
/**
|
||||
* 用户常量
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public interface UserConstant {
|
||||
|
||||
/**
|
||||
* 盐值,混淆密码
|
||||
*/
|
||||
String SALT = "qingcheng";
|
||||
|
||||
/**
|
||||
* 用户默认头像
|
||||
*/
|
||||
String USER_DEFAULT_AVATAR = "";
|
||||
|
||||
|
||||
/**
|
||||
* 默认角色
|
||||
*/
|
||||
String DEFAULT_ROLE = "user";
|
||||
|
||||
/**
|
||||
* 管理员角色
|
||||
*/
|
||||
String ADMIN_ROLE = "admin";
|
||||
|
||||
/**
|
||||
* Boss
|
||||
*/
|
||||
String BOSS_ROLE = "boss";
|
||||
|
||||
/**
|
||||
* 被封号
|
||||
*/
|
||||
String BAN_ROLE = "ban";
|
||||
|
||||
}
|
Reference in New Issue
Block a user