package com.ruoyi.notification.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;

/**
 * 定时任务对象 dc_scheduled_task
 * 
 * @author ruoyi
 * @date 2025-12-19
 */
public class ScheduledTask extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 任务ID */
    private Long taskId;

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

    /** 任务类型 */
    @Excel(name = "任务类型")
    private String taskType;

    /** 任务状态 */
    @Excel(name = "任务状态")
    private String taskStatus;

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

    /** 目标对象 */
    @Excel(name = "目标对象")
    private String targetObject;

    /** 目标方法 */
    @Excel(name = "目标方法")
    private String targetMethod;

    /** 方法参数 */
    @Excel(name = "方法参数")
    private String methodParams;

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

    /** 上次执行时间 */
    @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 Long executeCount;

    /** 失败次数 */
    @Excel(name = "失败次数")
    private Long failureCount;

    /** 最大重试次数 */
    @Excel(name = "最大重试次数")
    private Long maxRetryCount;

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

    /** 是否启用 */
    @Excel(name = "是否启用")
    private String enabled;

    public void setTaskId(Long taskId) 
    {
        this.taskId = taskId;
    }

    public Long getTaskId() 
    {
        return taskId;
    }
    public void setTaskName(String taskName) 
    {
        this.taskName = taskName;
    }

    public String getTaskName() 
    {
        return taskName;
    }
    public void setTaskType(String taskType) 
    {
        this.taskType = taskType;
    }

    public String getTaskType() 
    {
        return taskType;
    }
    public void setTaskStatus(String taskStatus) 
    {
        this.taskStatus = taskStatus;
    }

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

    public String getCronExpression() 
    {
        return cronExpression;
    }
    public void setTargetObject(String targetObject) 
    {
        this.targetObject = targetObject;
    }

    public String getTargetObject() 
    {
        return targetObject;
    }
    public void setTargetMethod(String targetMethod) 
    {
        this.targetMethod = targetMethod;
    }

    public String getTargetMethod() 
    {
        return targetMethod;
    }
    public void setMethodParams(String methodParams) 
    {
        this.methodParams = methodParams;
    }

    public String getMethodParams() 
    {
        return methodParams;
    }
    public void setNextExecuteTime(Date nextExecuteTime) 
    {
        this.nextExecuteTime = nextExecuteTime;
    }

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

    public Date getLastExecuteTime() 
    {
        return lastExecuteTime;
    }
    public void setExecuteCount(Long executeCount) 
    {
        this.executeCount = executeCount;
    }

    public Long getExecuteCount() 
    {
        return executeCount;
    }
    public void setFailureCount(Long failureCount) 
    {
        this.failureCount = failureCount;
    }

    public Long getFailureCount() 
    {
        return failureCount;
    }
    public void setMaxRetryCount(Long maxRetryCount) 
    {
        this.maxRetryCount = maxRetryCount;
    }

    public Long getMaxRetryCount() 
    {
        return maxRetryCount;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }
    public void setEnabled(String enabled) 
    {
        this.enabled = enabled;
    }

    public String getEnabled() 
    {
        return enabled;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("taskId", getTaskId())
            .append("taskName", getTaskName())
            .append("taskType", getTaskType())
            .append("taskStatus", getTaskStatus())
            .append("cronExpression", getCronExpression())
            .append("targetObject", getTargetObject())
            .append("targetMethod", getTargetMethod())
            .append("methodParams", getMethodParams())
            .append("nextExecuteTime", getNextExecuteTime())
            .append("lastExecuteTime", getLastExecuteTime())
            .append("executeCount", getExecuteCount())
            .append("failureCount", getFailureCount())
            .append("maxRetryCount", getMaxRetryCount())
            .append("description", getDescription())
            .append("enabled", getEnabled())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}