package com.common.core.domain; /** * @description: 脱敏参数 * @author: holden * @time: 2022-01-20 10:50 */ public enum DesensitiveType { /** * 中文名 */ CHINESE_NAME(1,0, 3,null), /** * 身份证号 */ ID_CARD(8,3,10,null), /** * 手机号 */ MOBILE_PHONE(3,2,11,null), /** * 地址 */ ADDRESS(6,0,10,null), /** * 电子邮件 */ EMAIL(0,0,5,"@"), /** * 银行卡 */ BANK_CARD(6,4,10,null), /** * 公司开户银行联号 */ CNAPS_CODE(2,0,10,null), /** * 邮政编码 */ ZIP_CODE(1,1,6,null), /** * 年龄 */ AGE(1,1,2,null), /** * 职务 */ TITLE_TYPE(1,1,5,null), /** * 其他文本字段类型 */ BASIC(1,1,10,null), /** * 日期 */ Date(1,1,6,null), /** * 性别 */ SEX(1,0, 1,null); private Integer retainLeft; private Integer retainRight; private Integer padSize; private String separator; DesensitiveType(Integer retainLeft, Integer retainRight, Integer padSize, String separator) { this.retainLeft = retainLeft; this.retainRight = retainRight; this.padSize = padSize; this.separator=separator; } public void setRetainLeft(Integer retainLeft) { this.retainLeft = retainLeft; } public void setRetainRight(Integer retainRight) { this.retainRight = retainRight; } public Integer getRetainLeft() { return retainLeft; } public Integer getRetainRight() { return retainRight; } public Integer getPadSize(){ return padSize; } public void setPadSize(Integer padSize){ this.padSize = padSize; } public String getSeparator() { return separator; } public void setSeparator(String separator) { this.separator = separator; } }