package cn.cslg.pas.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * 网络任务字段
 * @TableName web_task_field
 */
@TableName(value ="web_task_field")
public class WebTaskField implements Serializable {
    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 网络任务ID
     */
    private Integer webTaskId;

    /**
     * 字段名
     */
    private String fieldName;

    /**
     * 字段解释
     */
    private String fieldExplain;

    /**
     * 字段进度
     */
    private Double fieldProcess;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 网络任务ID
     */
    public Integer getWebTaskId() {
        return webTaskId;
    }

    /**
     * 网络任务ID
     */
    public void setWebTaskId(Integer webTaskId) {
        this.webTaskId = webTaskId;
    }

    /**
     * 字段名
     */
    public String getFieldName() {
        return fieldName;
    }

    /**
     * 字段名
     */
    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    /**
     * 字段解释
     */
    public String getFieldExplain() {
        return fieldExplain;
    }

    /**
     * 字段解释
     */
    public void setFieldExplain(String fieldExplain) {
        this.fieldExplain = fieldExplain;
    }

    /**
     * 字段进度
     */
    public Double getFieldProcess() {
        return fieldProcess;
    }

    /**
     * 字段进度
     */
    public void setFieldProcess(Double fieldProcess) {
        this.fieldProcess = fieldProcess;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WebTaskField other = (WebTaskField) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getWebTaskId() == null ? other.getWebTaskId() == null : this.getWebTaskId().equals(other.getWebTaskId()))
            && (this.getFieldName() == null ? other.getFieldName() == null : this.getFieldName().equals(other.getFieldName()))
            && (this.getFieldExplain() == null ? other.getFieldExplain() == null : this.getFieldExplain().equals(other.getFieldExplain()))
            && (this.getFieldProcess() == null ? other.getFieldProcess() == null : this.getFieldProcess().equals(other.getFieldProcess()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getWebTaskId() == null) ? 0 : getWebTaskId().hashCode());
        result = prime * result + ((getFieldName() == null) ? 0 : getFieldName().hashCode());
        result = prime * result + ((getFieldExplain() == null) ? 0 : getFieldExplain().hashCode());
        result = prime * result + ((getFieldProcess() == null) ? 0 : getFieldProcess().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", webTaskId=").append(webTaskId);
        sb.append(", fieldName=").append(fieldName);
        sb.append(", fieldExplain=").append(fieldExplain);
        sb.append(", fieldProcess=").append(fieldProcess);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}