package com.zy.crm.manager.entity;
|
|
import com.baomidou.mybatisplus.annotations.TableField;
|
import com.baomidou.mybatisplus.annotations.TableId;
|
import com.baomidou.mybatisplus.annotations.TableName;
|
import com.baomidou.mybatisplus.enums.IdType;
|
import com.core.common.Cools;
|
import com.core.common.SpringUtils;
|
import com.zy.crm.system.entity.User;
|
import com.zy.crm.system.service.UserService;
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
|
import java.io.Serializable;
|
|
@Data
|
@TableName("sys_rule")
|
public class Rule implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* ID
|
*/
|
@ApiModelProperty(value= "ID")
|
@TableId(value = "id", type = IdType.AUTO)
|
private Long id;
|
|
/**
|
* 规则方式(默认1:当前日期时间戳)
|
*/
|
@ApiModelProperty(value= "规则方式(默认1:当前日期时间戳)")
|
@TableField("rule_type")
|
private Integer ruleType;
|
|
/**
|
* 规则头
|
*/
|
@ApiModelProperty(value= "规则头")
|
@TableField("rule_header")
|
private String ruleHeader;
|
|
/**
|
* 规则体
|
*/
|
@ApiModelProperty(value= "规则体")
|
@TableField("rule_body")
|
private String ruleBody;
|
|
/**
|
* 连接符(默认“-”)
|
*/
|
@ApiModelProperty(value= "连接符(默认“-”)")
|
@TableField("rule_connector")
|
private String ruleConnector;
|
|
/**
|
* 连接符是否启用(0:启用;1:不启用。默认1)
|
*/
|
@ApiModelProperty(value= "连接符是否启用(0:启用;1:不启用。默认1)")
|
@TableField("rule_connector_type")
|
private Integer ruleConnectorType;
|
|
/**
|
* 备注
|
*/
|
@ApiModelProperty(value= "备注")
|
@TableField("rule_memo")
|
private String ruleMemo;
|
|
/**
|
* 预览
|
*/
|
@ApiModelProperty(value= "预览")
|
@TableField("rule_preview")
|
private String rulePreview;
|
|
/**
|
* 备用字段1
|
*/
|
@ApiModelProperty(value= "备用字段1")
|
@TableField("rule_standby1")
|
private String ruleStandby1;
|
|
/**
|
* 备用字段2
|
*/
|
@ApiModelProperty(value= "备用字段2")
|
@TableField("rule_standby2")
|
private String ruleStandby2;
|
|
public Rule() {}
|
|
public Rule(Integer ruleType, String ruleHeader, String ruleBody, String ruleConnector, Integer ruleConnectorType, String ruleMemo, String rulePreview, String ruleStandby1, String ruleStandby2) {
|
this.ruleType = ruleType;
|
this.ruleHeader = ruleHeader;
|
this.ruleBody = ruleBody;
|
this.ruleConnector = ruleConnector;
|
this.ruleConnectorType = ruleConnectorType;
|
this.ruleMemo = ruleMemo;
|
this.rulePreview = rulePreview;
|
this.ruleStandby1 = ruleStandby1;
|
this.ruleStandby2 = ruleStandby2;
|
}
|
|
public String getRuleType$(){
|
if (null == this.ruleType){ return null; }
|
switch (this.ruleType){
|
case 1:
|
return "生成当前日期时间戳";
|
case 2:
|
return "生成长度为10的随机字符串";
|
case 3:
|
return "生成日期时间字符串";
|
default:
|
return String.valueOf(this.ruleType);
|
}
|
}
|
|
public String getRuleConnectorType$(){
|
if (null == this.ruleConnectorType){ return null; }
|
switch (this.ruleConnectorType){
|
case 1:
|
return "不启用";
|
case 0:
|
return "启用";
|
default:
|
return String.valueOf(this.ruleConnectorType);
|
}
|
}
|
|
public String getRuleConnector$(){
|
if (null == this.ruleConnector){ return null; }
|
switch (this.ruleConnector){
|
case "-":
|
return "默认:-";
|
default:
|
return String.valueOf(this.ruleConnector);
|
}
|
}
|
|
// Rule rule = new Rule(
|
// null, // 规则方式(默认1:当前日期时间戳)[非空]
|
// null, // 规则头[非空]
|
// null, // 规则体[非空]
|
// null, // 连接符(默认“-”)[非空]
|
// null, // 连接符是否启用(0:启用;1:不启用。默认1)[非空]
|
// null, // 备注
|
// null, // 预览
|
// null, // 备用字段1
|
// null // 备用字段2
|
// );
|
|
|
}
|