package cn.cslg.pas.domain;

import cn.cslg.pas.common.model.BaseEntity;
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
 */
@TableName(value ="web_task")
public class WebTask extends BaseEntity<WebTask> {
    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 任务状态
     */
    private Integer taskState;

    /**
     * 网络id
     */
    private Integer webId;

    /**
     * 成功条数
     */
    private Integer successNum;

    /**
     * 失败条数
     */
    private Integer defaultNum;

    /**
     * 查询条件
     */
    private String searchCondition;

    /**
     * 任务进度
     */
    private Double taskProcess;

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

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

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

    /**
     * 任务状态
     */
    public Integer getTaskState() {
        return taskState;
    }

    /**
     * 任务状态
     */
    public void setTaskState(Integer taskState) {
        this.taskState = taskState;
    }

    /**
     * 网络id
     */
    public Integer getWebId() {
        return webId;
    }

    /**
     * 网络id
     */
    public void setWebId(Integer webId) {
        this.webId = webId;
    }

    /**
     * 成功条数
     */
    public Integer getSuccessNum() {
        return successNum;
    }

    /**
     * 成功条数
     */
    public void setSuccessNum(Integer successNum) {
        this.successNum = successNum;
    }

    /**
     * 失败条数
     */
    public Integer getDefaultNum() {
        return defaultNum;
    }

    /**
     * 失败条数
     */
    public void setDefaultNum(Integer defaultNum) {
        this.defaultNum = defaultNum;
    }

    /**
     * 查询条件
     */
    public String getSearchCondition() {
        return searchCondition;
    }

    /**
     * 查询条件
     */
    public void setSearchCondition(String searchCondition) {
        this.searchCondition = searchCondition;
    }

    /**
     * 任务进度
     */
    public Double getTaskProcess() {
        return taskProcess;
    }

    /**
     * 任务进度
     */
    public void setTaskProcess(Double taskProcess) {
        this.taskProcess = taskProcess;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WebTask other = (WebTask) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTaskState() == null ? other.getTaskState() == null : this.getTaskState().equals(other.getTaskState()))
            && (this.getWebId() == null ? other.getWebId() == null : this.getWebId().equals(other.getWebId()))
            && (this.getSuccessNum() == null ? other.getSuccessNum() == null : this.getSuccessNum().equals(other.getSuccessNum()))
            && (this.getDefaultNum() == null ? other.getDefaultNum() == null : this.getDefaultNum().equals(other.getDefaultNum()))
            && (this.getSearchCondition() == null ? other.getSearchCondition() == null : this.getSearchCondition().equals(other.getSearchCondition()))
            && (this.getTaskProcess() == null ? other.getTaskProcess() == null : this.getTaskProcess().equals(other.getTaskProcess()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTaskState() == null) ? 0 : getTaskState().hashCode());
        result = prime * result + ((getWebId() == null) ? 0 : getWebId().hashCode());
        result = prime * result + ((getSuccessNum() == null) ? 0 : getSuccessNum().hashCode());
        result = prime * result + ((getDefaultNum() == null) ? 0 : getDefaultNum().hashCode());
        result = prime * result + ((getSearchCondition() == null) ? 0 : getSearchCondition().hashCode());
        result = prime * result + ((getTaskProcess() == null) ? 0 : getTaskProcess().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(", taskState=").append(taskState);
        sb.append(", webId=").append(webId);
        sb.append(", successNum=").append(successNum);
        sb.append(", defaultNum=").append(defaultNum);
        sb.append(", searchCondition=").append(searchCondition);
        sb.append(", taskProcess=").append(taskProcess);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}