package com.njzscloud.common.sichen.support;

import com.njzscloud.common.sichen.contant.ScheduleType;
import com.njzscloud.common.sichen.contant.TaskLogLevel;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import lombok.extern.slf4j.Slf4j;

@Setter
@Getter
@Slf4j
@ToString
@Accessors(chain = true)
public class TaskInfo {
    private long id;
    private String taskName;
    private String fn;
    private ScheduleType scheduleType;
    private String scheduleConf;
    private long criticalTiming;
    private boolean disabled;
    /**
     * 是否为内内置任务
     */
    private boolean builtin;
    private String memo;

    /**
     * 日志等级
     */
    private TaskLogLevel logLevel;

    public TaskInfo() {
    }

    public TaskInfo(TaskInfo taskInfo) {
        this.id = taskInfo.id;
        this.taskName = taskInfo.taskName;
        this.fn = taskInfo.fn;
        this.scheduleType = taskInfo.scheduleType;
        this.scheduleConf = taskInfo.scheduleConf;
        this.criticalTiming = taskInfo.criticalTiming;
        this.disabled = taskInfo.disabled;
        this.builtin = taskInfo.builtin;
        this.memo = taskInfo.memo;
        this.logLevel = taskInfo.logLevel;
    }
}
