package cn.ey.biz.module.system.api.category.dto;

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

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
public class DictCatalogDTO {
    // Todo 不清楚作用
    @ApiModelProperty(value = "")
    private String type;

    // Todo 不清楚作用
    @ApiModelProperty(value = "")
    private String sysFlag;

    @ApiModelProperty(value = "父级节点")
    @NotNull(message = "父级节点不能为空")
    private String pcode;

    @ApiModelProperty(value = "分类编码")
    @NotBlank(message = "编码不能为空")
    @Size(max = 32, message = "字典标签长度不能超过32个字符")
    private String categoryCode;

    @ApiModelProperty(value = "编码")
    @Size(max = 100, message = "字典编码标签长度不能超过100个字符")
    private String code;

    @ApiModelProperty(value = "名称")
    @Size(max = 100, message = "字典标签长度不能超过100个字符")
    private String name;

    @ApiModelProperty(value = "字段值")
    private String value;

    @ApiModelProperty(value = "是否有子节点")
    private Integer hasChildren;

    @ApiModelProperty(value = "状态（0正常 1停用）", required = true)
    @NotNull(message = "状态（0正常 1停用）不能为空")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "多语言列表", required = true)
    @NotNull(message = "多语言列表不能为空")
    private List<Lang> langs;

    @ApiModelProperty(value = "")
    private List<String> appIds;

    @Data
    public static class Lang {
        @ApiModelProperty(value = "显示值")
        private String label;

        @ApiModelProperty(value = "语言种类", required = true)
        private String lang;
    }
}
