package com.mortals.xhx.module.quality.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.quality.model.vo.QualityAnalysisVo;
import lombok.Data;
/**
* 数据质量分析实体对象
*
* @author zxfei
* @date 2023-07-15
*/
@Data
public class QualityAnalysisEntity extends QualityAnalysisVo {
    private static final long serialVersionUID = 1L;

    /**
    * 任务名称
    */
    @Excel(name = "任务名称")
    private String taskName;
    /**
    * 任务描述
    */
    @Excel(name = "任务描述")
    private String taskDescription;
    /**
    * 数据源名称
    */
    @Excel(name = "数据源名称")
    private String dataSourceName;
    /**
    * 源表
    */
    @Excel(name = "源表")
    private String sourceTable;
    /**
    * 源字段
    */
    @Excel(name = "源字段")
    private String sourceField;
    /**
    * 目标表
    */
    @Excel(name = "目标表")
    private String targetTable;
    /**
    * 目标字段
    */
    @Excel(name = "目标字段")
    private String targetField;
    /**
    * 任务状态(0.新建,1.执行中,2.执行成功,3.执行失败)
    */
    @Excel(name = "任务状态", readConverterExp = "0=新建,1.执行中,2.执行成功,3.执行失败")
    private String statuses;
    /**
    * 执行次数
    */
    @Excel(name = "执行次数")
    private Integer executionsNumber;
    /**
    * 备注
    */
    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 QualityAnalysisEntity) {
            QualityAnalysisEntity tmp = (QualityAnalysisEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

            this.taskName = "";

            this.taskDescription = "";

            this.dataSourceName = "";

            this.sourceTable = "";

            this.sourceField = "";

            this.targetTable = "";

            this.targetField = "";

            this.statuses = "0";

            this.executionsNumber = 0;

            this.remark = "";
    }
}