package com.ruoyi.robot.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 任务对象 ld_task
 * 
 * @author ruoyi
 */
public class LdTask extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 所属地图名称 */
    @Excel(name = "所属地图名称")
    private String mapName;

    /** 任务名称 */
    @Excel(name = "任务名称")
    private String taskName;

    /** 任务描述 */
    @Excel(name = "任务描述")
    private String taskDesc;

    /** Cron表达式 */
    @Excel(name = "Cron表达式")
    private String cronExpression;

    /** 执行时间 */
    @JsonFormat(pattern = "HH:mm:ss")
    @Excel(name = "执行时间", width = 30, dateFormat = "HH:mm:ss")
    private String executeTime;

    /** 执行日期（逗号分隔的周几） */
    @Excel(name = "执行日期")
    private String executeWeekdays;

    /** 重复次数 */
    @Excel(name = "重复次数")
    private Integer repeatCount;

    /** 坐标类型 */
    @Excel(name = "坐标类型")
    private String coordType;

    /** 目标点ID列表 */
    private String waypointIds;

    /** 目标点坐标列表 */
    private String waypointCoords;

    /** 目标点类型列表 */
    private String waypointTypes;

    /** 目标点动作列表 */
    private String waypointActions;

    /** 任务状态 */
    @Excel(name = "任务状态", readConverterExp = "idle=空闲,running=运行中,paused=已暂停,completed=已完成,failed=失败")
    private String status;

    /** 上次执行时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "上次执行时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date lastExecuteTime;

    /** 上次执行状态 */
    @Excel(name = "上次执行状态")
    private String lastExecuteStatus;

    /** 下次执行时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "下次执行时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date nextExecuteTime;

    /** 累计执行次数 */
    @Excel(name = "累计执行次数")
    private Integer totalExecuteCount;

    /** 关联设备ID */
    @Excel(name = "关联设备ID")
    private String deviceId;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setMapName(String mapName)
    {
        this.mapName = mapName;
    }

    public String getMapName()
    {
        return mapName;
    }

    public void setTaskName(String taskName)
    {
        this.taskName = taskName;
    }

    public String getTaskName()
    {
        return taskName;
    }

    public void setTaskDesc(String taskDesc)
    {
        this.taskDesc = taskDesc;
    }

    public String getTaskDesc()
    {
        return taskDesc;
    }

    public void setCronExpression(String cronExpression)
    {
        this.cronExpression = cronExpression;
    }

    public String getCronExpression()
    {
        return cronExpression;
    }

    public void setExecuteTime(String executeTime)
    {
        this.executeTime = executeTime;
    }

    public String getExecuteTime()
    {
        return executeTime;
    }

    public void setExecuteWeekdays(String executeWeekdays)
    {
        this.executeWeekdays = executeWeekdays;
    }

    public String getExecuteWeekdays()
    {
        return executeWeekdays;
    }

    public void setRepeatCount(Integer repeatCount)
    {
        this.repeatCount = repeatCount;
    }

    public Integer getRepeatCount()
    {
        return repeatCount;
    }

    public void setCoordType(String coordType)
    {
        this.coordType = coordType;
    }

    public String getCoordType()
    {
        return coordType;
    }

    public void setWaypointIds(String waypointIds)
    {
        this.waypointIds = waypointIds;
    }

    public String getWaypointIds()
    {
        return waypointIds;
    }

    public void setWaypointCoords(String waypointCoords)
    {
        this.waypointCoords = waypointCoords;
    }

    public String getWaypointCoords()
    {
        return waypointCoords;
    }

    public void setWaypointTypes(String waypointTypes)
    {
        this.waypointTypes = waypointTypes;
    }

    public String getWaypointTypes()
    {
        return waypointTypes;
    }

    public void setWaypointActions(String waypointActions)
    {
        this.waypointActions = waypointActions;
    }

    public String getWaypointActions()
    {
        return waypointActions;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setLastExecuteTime(Date lastExecuteTime)
    {
        this.lastExecuteTime = lastExecuteTime;
    }

    public Date getLastExecuteTime()
    {
        return lastExecuteTime;
    }

    public void setLastExecuteStatus(String lastExecuteStatus)
    {
        this.lastExecuteStatus = lastExecuteStatus;
    }

    public String getLastExecuteStatus()
    {
        return lastExecuteStatus;
    }

    public void setNextExecuteTime(Date nextExecuteTime)
    {
        this.nextExecuteTime = nextExecuteTime;
    }

    public Date getNextExecuteTime()
    {
        return nextExecuteTime;
    }

    public void setTotalExecuteCount(Integer totalExecuteCount)
    {
        this.totalExecuteCount = totalExecuteCount;
    }

    public Integer getTotalExecuteCount()
    {
        return totalExecuteCount;
    }

    public void setDeviceId(String deviceId)
    {
        this.deviceId = deviceId;
    }

    public String getDeviceId()
    {
        return deviceId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("mapName", getMapName())
            .append("taskName", getTaskName())
            .append("taskDesc", getTaskDesc())
            .append("cronExpression", getCronExpression())
            .append("executeTime", getExecuteTime())
            .append("executeWeekdays", getExecuteWeekdays())
            .append("repeatCount", getRepeatCount())
            .append("coordType", getCoordType())
            .append("status", getStatus())
            .append("lastExecuteTime", getLastExecuteTime())
            .append("lastExecuteStatus", getLastExecuteStatus())
            .append("nextExecuteTime", getNextExecuteTime())
            .append("totalExecuteCount", getTotalExecuteCount())
            .append("deviceId", getDeviceId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
