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

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

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

@ApiModel("RPC 服务 - 字典分类数据 Request")
@Data
public class CategoryDataV2ReqDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "分类编码", required = true)
    @NotBlank(message = "分类编码不能为空")
    private String categoryCode;

    @ApiModelProperty(value = "父级节点")
    private Long dataPid;

    @ApiModelProperty(value = "父级节点唯一值")
    private String dataParentIdentifier;

    @ApiModelProperty(value = "编码")
    private String dataCode;

    @ApiModelProperty(value = "编码唯一值")
    private String dataIdentifier;

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

    @ApiModelProperty(value = "分类版本号")
    private Integer categoryVersion;

    @ApiModelProperty(value = "值版本号")
    private Integer dataVersion;

    @ApiModelProperty(value = "语言")
    private String acceptLanguage;

    @ApiModelProperty(value = "状态")
    private Integer status = 0;

    private boolean nonCacheable;

    @Override
    public String toString() {
        return "CategoryDataV2ReqDTO(categoryCode=" + this.getCategoryCode() + ", dataPid=" + this.getDataPid() + ", dataCode=" + this.getDataCode() + ", hasChildren=" + this.getHasChildren() + ", categoryVersion=" + this.getCategoryVersion() + ", dataVersion=" + this.getDataVersion() + ", acceptLanguage=" + this.getAcceptLanguage() + ")";
    }


}
