12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- /*
- * <<
- * Davinci
- * ==
- * Copyright (C) 2016 - 2019 EDP
- * ==
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * >>
- *
- */
- package edp.davinci.dto.cronJobDto;
- import edp.core.utils.DateUtils;
- import lombok.Data;
- import javax.validation.constraints.Min;
- import javax.validation.constraints.NotBlank;
- import javax.validation.constraints.NotNull;
- import javax.validation.constraints.Pattern;
- @Data
- @NotNull(message = "Cron job info cannot be null")
- public class CronJobBaseInfo {
- @NotBlank(message = "任务名称不能为空")
- private String name;
- @Min(value = 1L, message = "项目id 无效")
- private Long projectId;
- @NotBlank(message = "任务id不能为空")
- private String jobType;
- // @NotBlank(message = "任务配置不能为空")
- private String config;
- @NotBlank(message = "任务表达式不能为空")
- private String cronExpression;
- @NotBlank(message = "开始日期不能为空")
- @Pattern(regexp = DateUtils.DATE_HMS_REGEX, message = "开始日期格式转换错误")
- private String startDate;
- @NotBlank(message = "结束日期不能为空")
- @Pattern(regexp = DateUtils.DATE_HMS_REGEX, message = "结束日期格式转换错误")
- private String endDate;
- private String description;
- }
|