package com.zcloud.modules.sys.entity;

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

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 *
 * @TableName sys_dictionaries
 */
@Data
@TableName("sys_dictionaries")
public class SysDictionariesEntity implements Serializable,Comparable<SysDictionariesEntity> {
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_UUID)
    @ApiModelProperty(value = "主键")
    private String dictionariesId;

    /**
     * 名称
     */
    @ApiModelProperty(value = "字典名称")
    private String name;

    /**
     * 字典英文名称
     */
    @ApiModelProperty(value = "字典英文名称")
    private String name_en;

    /**
     * 编码
     */
    @ApiModelProperty(value = "字典编码")
    private String bianma;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer orderBy;

    /**
     * 父id
     */
    @ApiModelProperty(value = "父ID")
    private String parentId;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String bz;

    /**
     * 排查表
     */
    @ApiModelProperty(value = "排查表")
    private String tbsname;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String tbfield;

    /**
     * 是否删除
     */
    @ApiModelProperty(value = "是否删除")
    private String yndel;

    //子集数量
    @TableField(exist=false)
    @ApiModelProperty(value = "子集数量")
    private Integer hasChildren;

    /**
     * ztree属性
     */
    @TableField(exist=false)
    @ApiModelProperty(value = "子集列表")
    private List<SysDictionariesEntity> list=new ArrayList<>();
    @Override
    public int compareTo(SysDictionariesEntity o) {
        return this.getOrderBy()-o.getOrderBy();
    }
}
