package cn.ey.biz.module.system.controller.admin.code.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
public class CodeCustomerVO {

    @ApiModelProperty(value = "客户ID", required = true)
    @NotNull(message = "客户ID字段不能为空")
    @Valid
    private ClientID clientID;

    @ApiModelProperty(value = "用户名称", required = true)
    @NotNull(message = "用户名称配置项必须存在")
    @Valid
    private ClientName clientName;

    @ApiModelProperty(value = "更新说明", required = true)
    @Size(max = 200, message = "更新说明不能超过200个字符")
    private String explanation;

    @Data
    @Valid
    public static class ClientID {
        @Max(value = 1, message = "客户ID字段不为空 0:未选择 1:已选择")
        @Min(value = 0, message = "客户ID字段不为空 0:未选择 1:已选择")
        private Integer notNull; // 客户ID字段不为空 0:未选择 1:已选择
    }

    @Data
    @Valid
    public static class ClientName {

        @Max(value = 1, message = "用户名称必须是英文 0:未选择 1:已选择")
        @Min(value = 0, message = "用户名称必须是英文 0:未选择 1:已选择")
        private Integer mustEn; // 用户名称必须是英文 0:未选择 1:已选择
    }

}
