package com.kcim.vo;

import cn.hutool.core.lang.Assert;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@ApiModel("通用是否选择视图对象")
public class CommonSelectVO extends CommonVO {

    @ApiModelProperty(name = "isSelect",value = "是否选中，true选中")
    private Boolean isSelect;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private List<CommonSelectVO> children;

    @JsonIgnore
    private Long parentId;

    public CommonSelectVO(CommonVO commonVO,Boolean isSelect) {
        Assert.notNull(commonVO,"父类不能为空");
        this.isSelect = isSelect;
    }
}
