package com.njcn.gather.aireport.reportmodel.pojo.param;

import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * Report model request parameters.
 */
public class ReportModelParam {

    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class QueryParam extends BaseParam {
        @ApiModelProperty("Template name keyword")
        private String name;

        @ApiModelProperty("Template state")
        private String state;

        @ApiModelProperty("Create time begin, yyyy-MM-dd HH:mm:ss")
        private String searchBeginTime;

        @ApiModelProperty("Create time end, yyyy-MM-dd HH:mm:ss")
        private String searchEndTime;
    }

    @Data
    public static class AddParam {
        @ApiModelProperty("Template name")
        @NotBlank(message = "模板名称不能为空")
        @Size(max = 32, message = "模板名称不能超过32个字符")
        private String name;
    }

    @Data
    public static class UpdateParam {
        @ApiModelProperty("Template ID")
        @NotBlank(message = "模板ID不能为空")
        private String id;

        @ApiModelProperty("Template name")
        @NotBlank(message = "模板名称不能为空")
        @Size(max = 32, message = "模板名称不能超过32个字符")
        private String name;
    }

    @Data
    public static class SubmitAuditParam {
        @ApiModelProperty("Template ID")
        @NotBlank(message = "模板ID不能为空")
        private String id;
    }
}
