package com.storlead.sales.pojo.vo.dispatch;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * 定时任务VO
 *
 * @author YPZ
 * @date 2022-5-19
 */
@ApiModel(value = "定时任务")
@Data
@EqualsAndHashCode(callSuper = false)
public class TaskInfoVO implements Serializable {


    private static final long serialVersionUID = -6336362431659428008L;

    private String keyId;

    @ApiModelProperty(value = "定时任务名", required = true, example = "com.storlead.sales.service.AutoTaskStatuChangeJob")
    private String jobName;
    /**
     * 定时任务组名
     */
    @ApiModelProperty(value = "定时任务组名", required = true, example = "sync")
    private String jobGroup;
    /**
     * 定时任务描述
     */
    @ApiModelProperty(value = "定时任务描述", example = "每天上午1点执行一次同步OA任务")
    private String jobDescription;
    /**
     * 定时任务启用状态
     */
    @ApiModelProperty(value = "定时任务启用状态 {NORMAL 正常 PAUSED 暂停 }", example = "NORMAL")
    private String jobStatus;
    /**
     * 定时任务 CRON 表达式
     */
    @ApiModelProperty(value = "定时任 CRON 表达式", example = "0 0 1 * * ?")
    private String cronExpression;
    /**
     * 定时任务创建时间
     */
    @ApiModelProperty(value = "定时任务创建时间", readOnly = true, example = "2019-04-02 14:24:33")
    private String createTimeStr;
    /**
     * 定时任务上一次执行时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "定时任务上一次执行时间", example = "2019-04-02 14:24:33")
    private Date previousFireTime;
    /**
     * 定时任务下一次执行时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "定时任务下一次执行时间", example = "2019-04-02 14:24:33")
    private Date nextFireTime;

    @TableField(exist = false)
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @ApiModelProperty(value = "页码", example = "1")
    private Integer pageIndex;

    @TableField(exist = false)
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @ApiModelProperty(value = "页面大小", example = "10")
    private Integer pageSize;

}
