package com.mortals.xhx.module.base.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.base.model.vo.BaseRuleVo;
import lombok.Data;
/**
* 数据公共规则实体对象
*
* @author zxfei
* @date 2023-07-15
*/
@Data
public class BaseRuleEntity extends BaseRuleVo {
    private static final long serialVersionUID = 1L;

    /**
    * 规则名称
    */
    @Excel(name = "规则名称")
    private String name;
    /**
    * 检测对象
    */
    @Excel(name = "检测对象")
    private String testItem;
    /**
    * 检测指标(1.规范性,2.一致性,3.正确性,4.及时性)
    */
    @Excel(name = "检测指标", readConverterExp = "1=规范性,2.一致性,3.正确性,4.及时性")
    private String indicators;
    /**
    * 规则类型(1.SQL规则,2.正则规则,3.值域规则,4.标准包)
    */
    @Excel(name = "规则类型", readConverterExp = "1=SQL规则,2.正则规则,3.值域规则,4.标准包")
    private String type;
    /**
    * 规则内容
    */
    @Excel(name = "规则内容")
    private String content;
    /**
    * 规则描述
    */
    @Excel(name = "规则描述")
    private String description;
    /**
    * 备注
    */
    private String remark;
    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof BaseRuleEntity) {
            BaseRuleEntity tmp = (BaseRuleEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

            this.name = "";

            this.testItem = "";

            this.indicators = "";

            this.type = "";

            this.content = "";

            this.description = "";

            this.remark = "";
    }
}