package com.erp.task.dto;

import jakarta.validation.constraints.NotBlank;
import lombok.Data;

/**
 * 任务创建请求
 */
@Data
public class TaskCreateRequest {

    @NotBlank(message = "任务名称不能为空")
    private String taskName;

    private String description;

    @NotBlank(message = "任务分组不能为空")
    private String taskGroup;

    @NotBlank(message = "Cron表达式不能为空")
    private String cronExpression;

    @NotBlank(message = "任务类名不能为空")
    private String taskClass;

    private String methodName;

    private String taskParams;

    private Boolean concurrent = true;

    private Boolean sync = false;

    @NotBlank(message = "任务类型不能为空")
    private String taskType;

    private Long xxlJobId;

    private Integer maxRetries = 3;

    private Integer retryInterval = 60;

    private Integer timeout;

    private String alertEmails;

    private String alertPhones;

    private Boolean alertEnabled = false;

    private String misfirePolicy = "DO_NOTHING";

    private String owner;

    private String remark;
}
