package com.mortals.xhx.module.scheduled.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.scheduled.model.vo.ScheduledTaskVo;
import lombok.Data;
/**
* 数据定时查探实体对象
*
* @author zxfei
* @date 2023-07-15
*/
@Data
public class ScheduledTaskEntity extends ScheduledTaskVo {
    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;
    /**
    * 定时类型(1.年,2.月,3.日)
    */
    @Excel(name = "定时类型", readConverterExp = "1=年,2.月,3.日")
    private String type;
    /**
    * 开始时间
    */
    @Excel(name = "开始时间")
    private String startTime;
    /**
    * 结束时间
    */
    @Excel(name = "结束时间")
    private String endTime;
    /**
    * 任务状态(0.新建,1.执行中,2.执行成功,3.执行失败)
    */
    @Excel(name = "任务状态", readConverterExp = "0=新建,1.执行中,2.执行成功,3.执行失败")
    private String statuses;
    /**
    * 备注
    */
    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 ScheduledTaskEntity) {
            ScheduledTaskEntity tmp = (ScheduledTaskEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

            this.taskName = "";

            this.taskDescription = "";

            this.dataSourceName = "";

            this.sourceTable = "";

            this.sourceField = "";

            this.type = "";

            this.startTime = "";

            this.endTime = "";

            this.statuses = "0";

            this.remark = "";
    }
}