package iet.ustb.sf.domain; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import java.util.Date; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; /** * * @author hyy * @TableName mbgk_target */ @TableName(value ="mbgk_target") @Data @Builder @AllArgsConstructor @NoArgsConstructor public class Target { /** * 主键 */ private String id; /** * 规则名称 */ @TableField(value = "name") private String name; /** * 主题/组织 名称 */ @TableField(value = "parent_name") private String parentName; /** * 分类ID */ @TableField(value = "category_id") private String categoryId; /** * 单位 */ @TableField(value = "unit") private String unit; /** * 类型,0:原子指标,1:衍生指标,2:聚合指标 */ @TableField(value = "type") private Integer type; /** * 是否重点指标,1:是,0:不是 */ @TableField(value = "is_key") private Integer isKey; /** * 指标说明 */ @TableField(value = "target_info") private String targetInfo; /** * 结果查询SQL */ @TableField(value = "result_sql") private String resultSql; /** * 指标层级 */ @TableField(value = "level_") private Integer level; /** * 上级指标 */ @TableField(value = "parent") private String parent; /** * 备注 */ @TableField(value = "remark") private String remark; /** * 表名 */ @TableField(value = "table_name") private String tableName; /** * 周期 */ @TableField(value = "cycle") private String cycle; /** * 状态,1:启用,0:停用 */ @TableField(value = "status") private Integer status; /** * 查询SQL */ @TableField(value = "search_sql") private String searchSql; /** * 创建时间 */ @TableField(value = "create_time") private Date createTime; /** * 更新时间 */ @TableField(value = "update_time") private Date updateTime; /** * 主题名 */ @TableField(value = "topic") private String topic; /** * 组织 */ @TableField(value = "organization") private String organization; /** * 定时任务SQL */ @TableField(value = "job_sql") private String jobSql; /** * 历史数据SQL */ @TableField(value = "his_sql") private String hisSql; @Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } Target other = (Target) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) && (this.getParentName() == null ? other.getParentName() == null : this.getParentName().equals(other.getParentName())) && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId())) && (this.getUnit() == null ? other.getUnit() == null : this.getUnit().equals(other.getUnit())) && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) && (this.getIsKey() == null ? other.getIsKey() == null : this.getIsKey().equals(other.getIsKey())) && (this.getTargetInfo() == null ? other.getTargetInfo() == null : this.getTargetInfo().equals(other.getTargetInfo())) && (this.getResultSql() == null ? other.getResultSql() == null : this.getResultSql().equals(other.getResultSql())) && (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel())) && (this.getParent() == null ? other.getParent() == null : this.getParent().equals(other.getParent())) && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark())) && (this.getTableName() == null ? other.getTableName() == null : this.getTableName().equals(other.getTableName())) && (this.getCycle() == null ? other.getCycle() == null : this.getCycle().equals(other.getCycle())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getSearchSql() == null ? other.getSearchSql() == null : this.getSearchSql().equals(other.getSearchSql())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) && (this.getTopic() == null ? other.getTopic() == null : this.getTopic().equals(other.getTopic())) && (this.getOrganization() == null ? other.getOrganization() == null : this.getOrganization().equals(other.getOrganization())) && (this.getJobSql() == null ? other.getJobSql() == null : this.getJobSql().equals(other.getJobSql())) && (this.getHisSql() == null ? other.getHisSql() == null : this.getHisSql().equals(other.getHisSql())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); result = prime * result + ((getParentName() == null) ? 0 : getParentName().hashCode()); result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode()); result = prime * result + ((getUnit() == null) ? 0 : getUnit().hashCode()); result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); result = prime * result + ((getIsKey() == null) ? 0 : getIsKey().hashCode()); result = prime * result + ((getTargetInfo() == null) ? 0 : getTargetInfo().hashCode()); result = prime * result + ((getResultSql() == null) ? 0 : getResultSql().hashCode()); result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode()); result = prime * result + ((getParent() == null) ? 0 : getParent().hashCode()); result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode()); result = prime * result + ((getTableName() == null) ? 0 : getTableName().hashCode()); result = prime * result + ((getCycle() == null) ? 0 : getCycle().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getSearchSql() == null) ? 0 : getSearchSql().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getTopic() == null) ? 0 : getTopic().hashCode()); result = prime * result + ((getOrganization() == null) ? 0 : getOrganization().hashCode()); result = prime * result + ((getJobSql() == null) ? 0 : getJobSql().hashCode()); result = prime * result + ((getHisSql() == null) ? 0 : getHisSql().hashCode()); return result; } @Override public String toString() { return getClass().getSimpleName() + " [" + "Hash = " + hashCode() + ", id=" + id + ", name=" + name + ", parentName=" + parentName + ", categoryId=" + categoryId + ", unit=" + unit + ", type=" + type + ", isKey=" + isKey + ", targetInfo=" + targetInfo + ", resultSql=" + resultSql + ", level=" + level + ", parent=" + parent + ", remark=" + remark + ", tableName=" + tableName + ", cycle=" + cycle + ", status=" + status + ", searchSql=" + searchSql + ", createTime=" + createTime + ", updateTime=" + updateTime + ", topic=" + topic + ", organization=" + organization + ", jobSql=" + jobSql + ", hisSql=" + hisSql + "]"; } }