package com.njcn.gather.aireport.clientunit.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;

/**
 * 委托单位请求参数。
 */
public class ClientUnitParam {

    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class QueryParam extends BaseParam {
        @ApiModelProperty("单位名称关键字")
        private String name;

        @ApiModelProperty("创建开始时间，yyyy-MM-dd HH:mm:ss")
        private String searchBeginTime;

        @ApiModelProperty("创建结束时间，yyyy-MM-dd HH:mm:ss")
        private String searchEndTime;
    }

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

        @ApiModelProperty("联系人")
        @Size(max = 200, message = "联系人不能超过200个字符")
        private String contactName;

        @ApiModelProperty("联系方式")
        @Size(max = 32, message = "联系方式不能超过32个字符")
        private String phonenumber;

        @ApiModelProperty("地址")
        @Size(max = 128, message = "地址不能超过128个字符")
        private String address;
    }

    @Data
    public static class UpdateParam extends AddParam {
        @ApiModelProperty("委托单位ID")
        @NotBlank(message = "委托单位ID不能为空")
        private String id;
    }
}
