package com.qqchen.deploy.backend.schedule.query;

import com.qqchen.deploy.backend.framework.annotation.QueryField;
import com.qqchen.deploy.backend.framework.enums.QueryType;
import com.qqchen.deploy.backend.framework.query.BaseQuery;
import com.qqchen.deploy.backend.schedule.enums.JobStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 定时任务执行日志查询条件
 * 
 * @author qichen
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "定时任务执行日志查询条件")
public class ScheduleJobLogQuery extends BaseQuery {

    @QueryField(field = "jobId", type = QueryType.EQUAL)
    @Schema(description = "任务ID")
    private Long jobId;

    @QueryField(field = "jobName", type = QueryType.LIKE)
    @Schema(description = "任务名称（模糊查询）")
    private String jobName;

    @QueryField(field = "status", type = QueryType.EQUAL)
    @Schema(description = "执行状态")
    private JobStatusEnum status;

    @QueryField(field = "executeTime", type = QueryType.GREATER_EQUAL)
    @Schema(description = "执行时间起始")
    private LocalDateTime executeTimeStart;

    @QueryField(field = "executeTime", type = QueryType.LESS_EQUAL)
    @Schema(description = "执行时间结束")
    private LocalDateTime executeTimeEnd;
}

