# ScheduleSchedulerDTO.java

    package cloud.wconnect.workperformance.pojo.dto.schedule;

    import lombok.Data;
    import org.hibernate.validator.constraints.Range;

    import jakarta.validation.constraints.NotBlank;
    import jakarta.validation.constraints.NotNull;

    /**
     * DTO：scheduler
     *
     * @author: yyt
     * 2024-03-15
     */
    @Data
    public class ScheduleSchedulerDTO {

        /**
         * 定时任务 id
         */
        private String id;

        /**
         * 类型（1：员工报告缺失，3：history and forecast 报告缺失）
         */
        @NotNull(message = "the category must not be null")
        @Range(min = 1, max = 3, message = "the category must in [1:employee report missing, 3:history and forecast report missing]")
        private Integer category;

        public static final int MISSING_EMPLOYEE_REPORT = 1;

        public static final int MISSING_HISTORY_AND_FORECAST_REPORT = 3;

        /**
         * 触发时间规则（1：员工报告缺失，目前只支持按照天执行；3：history and forecast 报告缺失，只支持按照天执行；样例：{"everyDay":{"hour":1,"minute":2}
         */
        @NotBlank(message = "the scheduler must not be blank")
        private String scheduler;

        /**
         * 开始时间，0表示立即生效
         */
        @NotNull(message = "the startDate must not be null")
        private Long startDate;

        /**
         * 0:停止；1:启动；
         */
        @NotNull(message = "the status must not be null")
        @Range(min = 0, max = 1, message = "the status must in [0:stop, 1:start]")
        private Integer status;

        /**
         * 拓展参数
         * category 为员工报告缺失，该json为：{"threshold": 1439 } threshold表示数据过期条件，单位为分钟。
         * category 为 history and forecast 报告缺失，该json为：{"threshold": 1420 } threshold表示数据过期条件，单位为分钟。
         */
        private String parameters;

    }