package com.ruoyi.common.core.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * Treeselect通用树结构实体类
 * 
 * @author ruoyi
 */
@Data
public class TreeSelectCommon implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 节点ID */
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;

    /** 节点名称 */
    private String label;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    /** 祖级列表 */
    private String ancestors;

    /** 子节点 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<TreeSelectCommon> children;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    /** 目录或内容 (字典:sys_dir_classify) */
    private String dirOrContent;
}
