class DictionaryItemEntity extends GenericTreeSortSupportEntity<String> implements EnumDict<String> {
    //字典id
    @Column(name = "dict_id", length = 64, updatable = false, nullable = false)
    @Schema(description = "数据字典ID")
    private String dictId;
    //名称
    @Column
    @Schema(description = "选项名称")
    private String name;
    //字典值
    @Column
    @Schema(description = "值")
    private String value;
    //字典文本
    @Column
    @Schema(description = "文本内容")
    private String text;
    //字典值类型
    @Column(name = "value_type")
    @Schema(description = "值类型")
    private String valueType;
    //是否启用
    @Column
    @Schema(description = "状态，0禁用，1启用")
    @DefaultValue("1")
    private Byte status;
    //说明
    @Column
    @Schema(description = "说明")
    private String describe;

    //快速搜索码
    @Column(name = "search_code")
    @Schema(description = "检索码")
    private String searchCode;

    @Column(name = "ordinal", nullable = false, updatable = false)
    @Schema(description = "序列号,同一个字典中的选项不能重复,且不能修改.")
    private Integer ordinal;

    @Override
    public int ordinal() {
        return ordinal == null ? 0 : ordinal;
    }

    @Schema(description = "子节点")
    private List<DictionaryItemEntity> children;

    public void generateId() {
        if (StringUtils.hasText(this.getId())) {
            return;
        }
        this.setId(generateId(this.getDictId(), this.getOrdinal()));
    }

    public static String generateId(String dictId, Integer ordinal) {
        return DigestUtils.md5Hex(String.join("|", dictId, ordinal.toString()));
    }

    @Override
    public Object getWriteJSONObject() {<FILL_FUNCTION_BODY>}
}

        JSONObject jsonObject = new JSONObject();
        jsonObject.put("id", getId());
        jsonObject.put("name", getName());
        jsonObject.put("dictId", getDictId());
        jsonObject.put("value", getValue());
        jsonObject.put("text", getText());
        jsonObject.put("ordinal", getOrdinal());
        jsonObject.put("sortIndex", getSortIndex());
        jsonObject.put("parentId", getParentId());
        jsonObject.put("path", getPath());
        jsonObject.put("mask", getMask());
        jsonObject.put("searchCode", getSearchCode());
        jsonObject.put("status", getStatus());
        jsonObject.put("describe", getDescribe());
        return jsonObject;
    
<methods>public non-sealed void <init>() <variables>private java.lang.Integer level,private java.lang.String parentId,private java.lang.String path,private java.lang.Long sortIndex