package io.wdd.server.beans.po;

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;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 
 * @TableName script_scheduler
 */
@TableName(value ="script_scheduler")
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder(toBuilder = true)
@ApiModel("定时脚本任务-持久化-实体类")
public class ScriptSchedulerPO implements Serializable {
    /**
     * 
     */
    @TableId(value = "scheduler_uuid")
    private String schedulerUuid;

    /**
     * 
     */
    @TableField(value = "name")
    private String name;

    /**
     * 
     */
    @TableField(value = "cron_express")
    private String cronExpress;

    /**
     * 
     */
    @TableField(value = "description")
    private String description;

    /**
     * 脚本任务的内容
     */
    @TableField(value = "script_content")
    private String scriptContent;

    /**
     * 执行目标机器agent_topic_name列表，使用, 分隔
     */
    @TableField(value = "target_machine")
    private String targetMachine;

    /**
     * 与 execution_log表的主键对应,方便查询执行日志
     */
    @TableField(value = "last_execution_id")
    private Long lastExecutionId;

    /**
     * 与 execution_log表的 result_key 对应,方便查询执行日志
     */
    @TableField(value = "last_execution_result_key")
    private String lastExecutionResultKey;

    /**
     * 任务上次执行状态
     */
    @TableField(value = "last_execution_status")
    private Integer lastExecutionStatus;

    /**
     * 定时脚本任务创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 上次更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 任务下次计划执行时间
     */
    @TableField(value = "next_schedule_time")
    private LocalDateTime nextScheduleTime;

    /**
     * 任务上次计划执行时间
     */
    @TableField(value = "last_schedule_time")
    private LocalDateTime lastScheduleTime;

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