package ${domain}.module.wsys.req;

import ${domain}.frame.base.BaseUpdateRequest;
import ${domain}.frame.validation.Dict;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * TaskSqlUpdateRequest - SQL任务更新
 *
 * @author author
 * @version 0.0.1
 * @since 2020-05-24
 */
public class TaskSqlUpdateRequest extends BaseUpdateRequest {

    /**
     * 主键
     */
    @NotNull(message = "[id]主键不能为NULL")
    private Long id;

    /**
     * 任务名称
     */
    @NotBlank(message = "[taskName]任务名称不能为空")
    @Length(min = 0, max = 50, message = "[taskName]任务名称长度不合法(0-50)")
    private String taskName;

    /**
     * 详细注释
     */
    @Length(min = 0, max = 255, message = "[taskNote]详细注释长度不合法(0-255)")
    private String taskNote;

    /**
     * 任务类型
     */
    @NotNull(message = "[taskType]任务类型不能为NULL")
    @Dict(name = "TASK_TYPE")
    private String taskType;

    /**
     * 任务类型值
     */
    @NotBlank(message = "[typeValue]任务类型值不能为空")
    @Length(min = 0, max = 50, message = "[typeValue]任务类型值长度不合法(0-50)")
    private String typeValue;

    /**
     * 任务SQL
     */
    @NotBlank(message = "[taskSql]任务SQL不能为空")
    @Length(min = 0, max = 2500, message = "[taskSql]任务SQL长度不合法(0-2500)")
    private String taskSql;

    /**
     * 是否有效
     */
    @NotNull(message = "[valid]是否有效不能为NULL")
    private Boolean valid;

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTaskName() {
        return this.taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getTaskNote() {
        return this.taskNote;
    }

    public void setTaskNote(String taskNote) {
        this.taskNote = taskNote;
    }

    public String getTaskType() {
        return this.taskType;
    }

    public void setTaskType(String taskType) {
        this.taskType = taskType;
    }

    public String getTypeValue() {
        return this.typeValue;
    }

    public void setTypeValue(String typeValue) {
        this.typeValue = typeValue;
    }

    public String getTaskSql() {
        return this.taskSql;
    }

    public void setTaskSql(String taskSql) {
        this.taskSql = taskSql;
    }

    public Boolean getValid() {
        return this.valid;
    }

    public void setValid(Boolean valid) {
        this.valid = valid;
    }
}
